| 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"}% |
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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 |
| 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 |
| lang="language" | language | "English" |
| daynames="headings" | custom day names | "Monday¦Tuesday¦Wednesday¦Thursday¦Friday¦Saturday¦Sunday" |
| format | how to highlight a date | see above |
| and all attributes of HTML::CalendarMonthSimple | ||
| Syntax | Example | |
|---|---|---|
| Normal Event | <3 spaces>* dd MMM yyyy - description | 09 Dec 2002 - Expo |
| Interval Event | <3 spaces>* dd MMM yyyy - dd MMM yyyy - description | 02 Feb 2002 - 04 Feb 2002 - Vacation |
| Yearly Event | <3 spaces>* dd MMM - description | 05 Jun - Every 5th of June |
| Yearly Event | <3 spaces>* [ w ¦ L] DDD MMM - description | 2 Tue Mar - Every 2nd Tuesday of March L Mon May - The last Monday of May |
| Monthly Event | <3 spaces>* w DDD - description | 1 Fri - Every 1st Friday of the month |
| Monthly Event | <3 spaces>* dd - description | 14 - The 14th of every month |
| Weekly Event | <3 spaces>* E DDD - description | E Wed - Every Wednesday |
| Periodic Event | <3 spaces>* En dd MMM yyyy - description | E3 02 Dec 2002 - Every three days starting 02 Dec 2002 |
| Exception | X { dd MMM yyyy, dd MMM yyyy - dd MMM yyyy } | 1 Fri X { 01 Dec 2002, 06 Dec 2002 - 14 Dec 2002 } - Every first Friday except on the 01 Dec 2002 and between 06 Dec 2002 and 14 Dec 2002 |
format is:
<A HREF="%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/$web/$topic"><FONT size="+2">$old</FONT> <IMG ALT="$description" SRC="%PUBURLPATH%/$installWeb/CalendarPlugin/exclam.gif"/></A>
* Set FORMAT = $old <br> $description
HTML::CalendarMonthSimple and Date::Calc CPAN packages (see http://www.cpan.org).
* Install Date::Calc
* Install HTML::CalendarMonthSimple
* Unzip the CalendarPlugin.zip package in your TWiki installation directory
* Change line 197 of CalendarMonthSimple.pm as follows to avoid an annoying log message.
if ($self->year == $todayyear && $self->month == $todaymonth && defined $thisday && $thisday == $todaydate)If the installation is correct you should see two calendars near the Event list above.
%CALENDAR% tag will look for events in the INCLUDING topic. This can be avoided if the topic="%TOPIC%" attribute is always explicitly used.
* During preview, a calendar with events in the same page shows events from the (old) saved page instead than from the current text
| Plugin Author: | AndreaSterbini |
| Plugin Version: | V. 1.010 |
| CPAN Dependencies: | CPAN:HTML::CalendarMonthSimple, CPAN:Date::Calc |
| Other Dependencies: | none |
| Perl Version: | 5.000 and up |
| Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/CalendarPlugin |
| Feedback: | http://TWiki.org/cgi-bin/view/Plugins/CalendarPluginDev |
| Topic CalendarPlugin . { Edit | Attach | Ref-By | Printable | Diffs | r1.1 | More } |
| Revision r1.1 - 03 Dec 2003 - 18:53 GMT - TWikiGuest |
Content copyright © 1999-2007 by the contributing authors. All material on this collaboration platform is the property of the contributing authors. |