Difference between revisions of "WikiCalendar"

From TestWiki
Jump to: navigation, search
(Documented the current state of the extension)
(Note about extension availability)
Line 1: Line 1:
 
[[Image:Calendar icon.png|right]]
 
[[Image:Calendar icon.png|right]]
  
The wiki calendar extension is currently very primitive, and is mainly for personal use only.  The code is not ready for release yet, but as it is in use on a couple of my private wikis I am documenting usage and features here.
+
The wiki calendar extension is currently very primitive, and is mainly for personal use only.  The code is not ready for release yet, but as it is in use on a couple of my private wikis I am documenting usage and features here
 +
 
 +
Feel free to contact me if you have any interest in this extension.  Note that there are several [[mw:Calendar extensions|more developed calendar extensions on the MediaWiki website]].
  
 
== Usage ==
 
== Usage ==

Revision as of 14:09, 9 September 2008

Calendar icon.png

The wiki calendar extension is currently very primitive, and is mainly for personal use only. The code is not ready for release yet, but as it is in use on a couple of my private wikis I am documenting usage and features here.

Feel free to contact me if you have any interest in this extension. Note that there are several more developed calendar extensions on the MediaWiki website.

Usage

To create a calendar, you enclose a set of appointments in calendar tags. Each line is a single appointment. All dates currently need to be in SQL format, but I hope to make this more flexible in the future.

Arguments:

  • style: Set the format of display. Allowed values: "weeks" or "months" (default). "weeks" is a bit experimental and probably best avoided...
  • start: Sets the start date for the calendar. If omitted it will use the date of the first appointment, rounded to the start of the month/week (depending on chosen style). "now" is a valid start date.
  • end: Sets the end date for the calendar. If omitted uses the latest appointment end date, rounded to the end of the month/week (depending on chosen style).
  • dateformat: The format for displaying dates, using the PHP strftime() format.

Appointment rows

Appointment rows are any rows that begin with a recognised date. Currently only MySQL dates are allowed. Any other lines are ignored, so blank lines may be used to separate appointments, and comments may be added by starting a line with #. (It currently doesn't need to begin with #, but for forward-compatibility purposes it is recommended that you use this character.)

The row contains the following elements separated by colons, in this order, with only the start date being required:

  • DATE - Either a single date in MySQL format (YYYY-MM-DD) indicating a start date, or two dates separated by commas (YYYY-MM-DD,YYYY-MM-DD) indicating a start and end date.
  • DESCRIPTION - Text description of the appointment. May contain any characters except a colon.
  • TYPE - One of 'busy' or 'tentative'. These modify the item's COLOR (busy, the default, leaves it as is, and tentative makes it paler) but this is liable to change greatly in the future.
  • COLOR - One of 'red', 'green' or 'blue' (default). Changes the base color. Liable to change in the future.

Example

<calendar start="2007-12-01">
2007-12-13:Buy turkey::red
2007-12-19,2008-01-03:Christmas hols
2007-12-26:Visit the relatives?:tentative:green
</calendar>