From Cimmeria AoC RP Server Wiki
The Calendar allows you to show your events to the public, as well as provide as much information as you wish about the event.
[edit] Overview
You should place each event in its own article page, with [[Category:Events]] and a category to the page for the date, in the format [[Category:2006/07/13]]
You can use any article name you like to name the event.
Each day on the calendar has a link to the Special:Events page to list all the events for that day. Beneath the calendar it shows the next 5 upcoming events. The special page shows the events for a day or month.
[edit] Adding a calendar event
Add the following to a page:
[[Category:Events]]
[[Category:2006/10/20]] (change to the date of the event)
and that's it!
[edit] Adding a calendar to a page
Add the following to a page:
<calendar/>
or
<calendar>upcoming=off</calendar>
or
<calendar>calendar=off</calendar>
- This extension is not normally active, but may be available on request.
Wikia has two Calendar extensions which individual wikis can choose to activate.
Simple Calendar
The Simple Calendar renders a table of all the months in the year with each day being a wiki article. Days which have nothing in them show up as a red link, clicking on it will create a new article as usual. It installs as a parser function, so the following syntax is used:
- {{#calendar:}}
When used like this with no parameters, a calendar of all twelve months will be rendered with each day pointing to an article using the date as its title.
There are a number of parameters which customize 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.
- 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.
Parameters should be added in the format:
- {{#calendar: title=Example | year=2001 }}
See the extension documentation on the MediaWiki site for more examples of use, and information on using CSS to customize the colors and appearance of your calendars.
Barrylb's Calendar
The other calendar option at Wikia is Barrylb's Calendar. This adds a <calendar/> tag and a new special page - Special:Events to your wiki.
Add the code <calendar/> to any page to display the contents of [[Category:Events]] for the current month in calendar format. Beneath the calendar you can optionally show the next five upcoming events.
Place each event in its own article (using any article title you like), and add [[Category:Events]] and a category for the date, in the format [[Category:yyyy/mm/dd]].
Each day on the calendar has a link to the Special:Events page to list all the events for that day, or for an entire month.
- Adding a calendar event
- Add the following to any page:
- [[Category:Events]]
- [[Category:2006/10/20]]
- Adding a calendar to a page
- Add the following to any page:
- <calendar/>
- or
- <calendar>upcoming=off</calendar>
- or
- <calendar>calendar=off</calendar>
- Using AJAX previous and next links
- Previous and next month links can use AJAX to cycle through months without going to a separate page:
- <calendar>ajaxprevnext=on</calendar>
- To combine options use a vertical bar:
- <calendar>ajaxprevnext=on|upcoming=off</calendar>
Credits
Some documentation on this page was copied from the following GFDL-licensed pages at http://www.mediawiki.org :