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

Description

The Days Since Posted plugin adds meta-data to a blog entry to indicated how many days have passed since the entry was posted.

Installation and Setup

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

<bean id="days-since-posted" class="org.blojsom.plugin.statistics.DaysSincePostedPlugin" init-method="init"
          destroy-method="destroy"/>

You may then add "days-since-posted" to one of the flavor-based plugin chains.

Usage and URL Parameters

There are no URL parameters to control the operation of the Days Since Posted 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-days-since-posted.

<p>$entry.getDescription()</p>
<p>This entry was posted $!entry.getMetaData().get("blojsom-plugin-days-since-posted") day(s) ago.</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-days-since-posted java.lang.Integer Indication of how many days have passed since the entry was posted.

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