Dashboard > blojsom > ... > Available Plugins > Word Count Plugin
  blojsom Log In   View a printable version of the current page.  
  Word Count Plugin
Added by David Czarnecki, last edited by David Czarnecki on Oct 21, 2004  (view change)
Labels: 
(None)

Description

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

Installation and Setup

In your global /WEB-INF/plugin.properties file, add the following line:

word-count=org.blojsom.plugin.statistics.WordCountPlugin

You may then add "word-count" to one of the flavor-based plugin chains. These plugin chains can be found in the individual user's plugin.properties file. For example:

html.blojsom-plugin-chain=meta, word-count, ...

Usage and URL Parameters

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

Usage

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

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

Meta-Data Attributes and Types

The following table describes the meta-data 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