Dashboard > blojsom > ... > Available Plugins > Calendar Plugin
  blojsom Log In   View a printable version of the current page.  
  Calendar Plugin
Added by David Czarnecki, last edited by David Czarnecki on Jun 09, 2006  (view change)
Labels: 
(None)

Description

There are actually two calendar plugins. The Calendar Filter plugin handles the filtering of blog entries based on the URL parameters, "year", "month", and "day". The Velocity Calendar plugin handles the ability to render a visual calendar component for use in the Velocity templates.

Installation and setup

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

calendar-filter=org.blojsom.plugin.calendar.CalendarFilterPlugin

calendar-gui=org.blojsom.plugin.calendar.VelocityCalendarPlugin

You may then add "calendar-gui" to the beginning of a flavor-based plugin chain, and "calendar-filter" after the calendar GUI plugin. These plugin chains can be found in the individual user's plugin.properties file. For example:

html.blojsom-plugin-chain=calendar-gui,calendar-filter,...

Usage and URL Parameters

URL Parameters

The following table describes the URL parameters that the Calendar Filter plugin accepts and how they affect the entries that get displayed by your blog.

URL parameter Default value Accepted values Usage
year   Users can request to see blog entries that fall under a certain date range. The "year" parameter must be a valid 4-digit year. /blog/?year=2003
month   The "month" parameter must be used in conjunction with the "year" parameter. Users cannot request blog entries for a month by itself. /blog/?year=2003&month=2
day   The "day" parameter must be used in conjunction with the "year" and "month" parameters. Users cannot request blog entries for a day by itself. /blog/?year=2003&month=2&day=14

Context Attributes and Types

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

Context key Input or Output Type Description
BLOJSOM_CALENDAR Output org.blojsom.plugin.calendar.BlogCalendar Calendar object to indicate on which days there are blog entries. This object is added by the org.blojsom.plugin.calendar.CalendarFilterPlugin
BLOJSOM_CALENDAR_VTLHELPER Output org.blojsom.plugin.calendar.VelocityHelper Helper class for creating the visual calendar output for Velocity, but this could also be used for JSPs as well. This object is added by the org.blojsom.plugin.calendar.VelocityCalendarPlugin

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