Test Calendar

From FortWiki
Jump to: navigation, search


There are a number of parameters which allow calendars for different specific purposes.

title: The name of the article which each day in a calendar table links to is by default the date, eg 27 Jan 2008. If you want to have different calendars for different purposes, then the title parameter will preceed the names with a separating slash character, for example, setting title to "Harry" will cause the dates to format as Harry/27 Jan 2008.

year: This changes the year of the calendar table, the default if no year is specified is the current year.

month: If a month is supplied, then only a single month will be rendered instead of a table containing all twelve months.

query: This allows extra query-string information to be appended to the links for days which don't exist. The main use for this would be to allow some preloaded content in the newly created calendar articles. See examples below - the syntax looks a little strange because it has two equals characters in it.

format: The default date format for date-articles linked to from the days in the calendar tables is, eg. 2 February 1972, but can be adjusted by supplying a PHP date format in the format parameter. See PHP-Manual/strftime for details about how to specify a date format.

dayformat: This sets the format of the titles of each day of the week at the top of the month tables. The default setting is M T W T F S S, but can be set to %a for abbreviated names in the current language such as Mon Tue..., or %A for full names in the current language.

{{#calendar: query=preload=Template:NewDay|year=2007 | month=May | title=Portland Tech }}

{{#calendar: query=preload=Template:NewDay|title=Template:CURRENTUSER }}

{{#calendar: query=preload=Template:NewDay|title=Template:CURRENTUSER | year=2001 }}

{{#calendar: query=preload=Template:NewDay|year=2007 | month=jan | title=Template:CURRENTUSER }}

Personal tools