This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

The CalendarListPlugin provides a view into a schedule of events. (x past days, y futures days)

Using this plugin you can have a calendar of the the year's events, recording them as you discover them, and the plugin will display a list of the most recent and upcoming events.

Here are two screen shots. The first shows the page with the complete schedule. The second shows a wiki page called 'HomePage' with a small section of the schedule displayed as a list.

The schedule pages uses wiki markup to build the schedule list. Currently the date format must be precise - exactly the date, or exactly the date, a space, and the time with leading zero if the hour is under 10. I'm working on making the formatting more flexible and the date/time entry lest strict. I'd also like to be able to show unscheduled events.

CalendarListPlugin syntax:#

[{INSERT com.hurlbert.jspwiki.plugin.CalendarList listpagename='SVSchedule' futuredays='15' format=WEEKLY}]

Parameters#

listpagename (mandatory)
This is the name of the wiki page containing the schedule events. The must be in a table, as described below.
format
Default: list
This defines the output format. Valid values are LIST or WEEKLY. (More may be added later.)
futuredays
Default: 3
This is the number of days of events to show on the output. futuredays=21 will show 3 weeks worth of events.
pastdays
Default: 1
This is the number of past days events. pastdays=7 will show a weeks worth of past events.
hotcolor
Default: red
If the events are within 'hotdays' of today, they will show up as this color.
warmcolor
Default: brown
If the events are within 'warmdays' of today, they will show up as this color.
coldcolor
Default: black
If the events are within 'colddays' of today, they will show up as this color.
hotdays
Default: 1
The number of days worth of events to show with the hotcolor.
warmdays
Default: 7
The number of days worth of events to show with the warmcolor.
colddays
Default: 14
The number of days worth of events to show with the coldcolor.
pastcolor
Default: #999999
Events that are in the past will show as pastcolor.
listcolor
Default: lightgrey
Events that are in the future and not covered by the other colors will show as listcolor.
todaybgcolor
Default: lightblue
'Today' has todaybgcolor as the background color. This allows today to be seen easily.
headerbgcolor
Default: #FOFOFO
The header is the "Mon Tue Wed..." part at the top of the weekly calendar list. This color is used for the background of the header.
daybgcolor
Default: #FOFOFO
Each day will have daybgcolor as the background color, except for today. That will have todaybgcolor.
boldtoday
Default: true
If this is true, the event text for today will be bold.

Format of the schedule page (not the output page). #

The schedule format is pretty strict right now. Build a page anyway you like, lines with the following format will be picked up and put in the schedule.
|02/01/04 03:00 PM|Superbowl
|02/02/04 08:00 PM|Antiques Roadshow SF
|02/09/04 08:00 PM|Antiques Roadshow SF
|02/29/04 05:00 PM|[The Oscars - 76th Annual|http://www.oscar.com]
|03/09/04 10:00 PM|The Shield, Season 3 premier

Using CalendarListPlugin#

Display a weekly calendar, with a header like this screenshot (Generated from these events

%%( font-family: Arial; font-size: 60%; )
[{INSERT com.hurlbert.jspwiki.plugin.CalendarList listpagename='SVSchedule' pastdays='7' futuredays='15' 
hotdays=1 warmdays=2 colddays=7 listcolor=BLUE hotcolor=darkgreen warmcolor=maroon coldcolor=blue 
format=WEEKLY headerbgcolor='lightblue'}]
%%

Display a simlpe list with the default coloring

[{INSERT com.hurlbert.jspwiki.plugin.CalendarList listpagename='SVSchedule'}]

Bugs, unfinished items.#

  • todaybold is not working.
  • The date parsing is very strict. It currently generates a PluginException if the format is wrong. It should ignore or warn.

Some possible enhancements (feel free to add others)#

  • More formats.
  • Move the defaults to the jspwiki.properties file.
  • Add categories to the events.

Enjoy - Scott Hurlbert


PS - Now that all that is out of the way, let me add a disclaimer. I have no freaking idea how to code like this! I seem to have a hard time making HTML generation clean. The code always seems to be getting in it's own way. So please, take this program with a grain of salt. I plan on cleaning it up here and there.

If you have any suggestions on how to write such a plugin with a better seperation of event handling vs HTML generation, please share. Thanks, Scott

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
zip
CalendarListPlugin v2.zip.zip 11.6 kB 1 06-Jul-2006 14:13 24.4.113.204
jpg
CalendarListPlugin.JPG 75.2 kB 1 03-Feb-2004 12:42 24.4.112.168
zip
CalendarListPlugin.zip 29.8 kB 2 11-Oct-2011 19:53 Jerry Andrews version 3
jpg
SVSchedule.JPG 105.6 kB 1 03-Feb-2004 12:42 24.4.112.168
jpg
calendarplugin1.jpg 100.5 kB 1 08-Jun-2009 18:48 198.204.133.208
jpg
calendarplugin2.jpg 66.1 kB 1 08-Jun-2009 18:48 198.204.133.208
« This particular version was published on 03-Feb-2004 12:49 by 24.4.112.168.