Dashboard > blojsom 3.0 > ... > Plugins > Word Count Plugin
  blojsom 3.0 Log In   View a printable version of the current page.  
  Word Count Plugin
Added by David Czarnecki, last edited by David Czarnecki on Jul 10, 2007
Labels: 
(None)

Description

The Word Count plugin counts the number of words in an entry.

Installation and Setup

In your /WEB-INF/classes/blojsom-plugins.xml file, add the following:

<bean id="word-count" class="org.blojsom.plugin.statistics.WordCountPlugin" init-method="init" destroy-method="destroy"/>

You may then add "word-count" to one of the flavor-based plugin chains.

Usage and URL Parameters

There are no URL parameters to control the operation of the Word Count plugin.

Usage

The plugin will add metadata to the blog entry which can be retrieved in your template. The key to retrieve the word count metadata is blojsom-plugin-word-count.

<p>$entry.getDescription()</p>
<p>Total words: $!entry.getMetaData().get("blojsom-plugin-word-count")</p>

Metadata Attributes and Types

The following table describes the metadata attributes that are available and their associated type.

Meta-data key Type Description
blojsom-plugin-word-count java.lang.Integer Number of words in an entry.

Site running on a free Atlassian Confluence Open Source Project License granted to blojsom. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators