Skip to topic | Skip to bottom
Home
Plugins
Note: Included topic WebLeftBar? does not exist yet
Plugins.CalendarPluginr1.1 - 06 Dec 2004 - 20:51 - TWikiGuesttopic end

Start of topic | Skip to actions

Calendar Plugin version 1.005

The CalendarPlugin handles the new tag %CALENDAR% that inserts a monthly calendar in the page.

Moreover, the Calendar highlights dates corresponding to a list of Events.

Usage example

You type:You get:If correctly installed:
A list of Events is just a bullet list like this:
  • 2 Feb - Andrea's birthday
  • 7 Mar - Nicoletta's birthday
  • 29 May 1996 - Maria Teresa is born!
  • 29 Sep 1998 - Davide is born!

%CALENDAR{month="2" year="2002" bgcolor="cyan"}% %CALENDAR{month="3" year="2002" showweekdayheaders="1"}%

February 2002
          2
Andrea's birthday 
10  11  12  13  14  15  16 
17  18  19  20  21  22  23 
24  25  26  27  28     

March 2002
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
         
7
Nicoletta's birthday 
10  11  12  13  14  15  16 
17  18  19  20  21  22  23 
24  25  26  27  28  29  30 
31             

February 2002
          1 2
Andrea's birthday
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28    

March 2002
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
          1 2
3 4 5 6 7
Nicoletta's birthday
8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            

Syntax

You type you get
%CALENDAR% a monthly calendar for the current month/year, with events taken from the current topic
%CALENDAR{<attributes>}% is the full syntax

Attributes recognized

attribute meaning default
year="yyyy" the year current year
year="+yy" ("+yy") relative year current year
month="mm" the month current month
month="+mm" ("-mm") relative month current month
bgcolor="color" the bgcolor of the header the web bgcolor
topic="TopicName" topic containig events the topic containing the tag
web="Webname" web containing the event topic the current web
format how to highlight a date see above
and all attributes of HTML::CalendarMonthSimple

Event Syntax

Normal Event <tab>* dd MMM yyyy - description
Interval Event <tab>* dd MMM yyyy - dd MMM yyyy - description
Recurring Event <tab>* dd MMM - description

If an event falls in the selected month then the corresponding day is (by default):

  • highlighted (font size +2)
  • linked to the topic containing the event list
  • marked with an icon whose ALT string is the event's description
I.e. format is:
<A HREF="%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/$web/$topic"><FONT size="+2">$old</FONT><IMG ALT="$description" SRC="%PUBURLPATH%/$installWeb/CalendarPlugin/exclam.gif"/></A>

Default settings

  • One line description, shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = This plugin shows a monthly calendar with highlighted events.
  • How the cell content is formatted
      * Set FORMAT = $old <br> $description

Istallation

The plugin uses the HTML::CalendarMonthSimple CPAN package (see http://www.cpan.org).

  • Install HTML::CalendarMonthSimple
  • Unzip the CalendarPlugin.zip package in your TWiki installation directory

If the installation is correct you should see two calendars near the Event list above.

Bugs

  • because the CALENDAR tag is expanded after the INCLUDE tag, an included %CALENDAR% tag will look for events in the INCLUDING topic. This can be avoided if the topic="%TOPIC%" attribute is always explicitly used.

TODO

  • Document all options and format parameters (see the code)

Changes

  • V. 1.005: TWiki:Main.AkimDemaille: support for date intervals
  • V. 1.004: uses only HTML::CalendarMonthSimple, ISO dates, all possible settings
  • V. 1.003: introducing HTML::CalendarMonthSimple
  • V. 1.002: TWiki:Main.ChristianSchultze: highlight today, relative month/year and debugging (thanks!)
  • V. 1.001: delayed load of used packages
  • V. 1.000: first release using only HTML::CalendarMonth

-- AndreaSterbini - 27 Feb 2001

to top


You are here: Plugins? > CalendarPlugin

to top

Copyright © 1999-2008 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback