User:Simsong/Calendar

Update: I have made an update to this extension to make it work on a broader variety of installations. You can find a list of changes in the readme file included in the download.

Description
This extension implements a calendar in PHP, designed to integrate into the MediaWiki wiki. This calendar supports custom themes (via a template), generation of wiki articles for events, listing the events for a day including a "summary" of the events, and allows you to name calendars to make them unique or to share them within multiple articles.

Note: This extension has only been tested on a couple versions of MediaWiki (1.5.0, 1.7.1 and 1.8.2) so I'm not sure how compatible it is with other version. This has also been tested under Windows using IIS and under Linux using Apache.

Installation
Download the zip file below and extract the files into the extensions folder of your MediaWiki install, or subfolder if you wish. You will need to add the following line to your LocalSettings.php file located in the root of your MediaWiki install.

include("");

Typically, it will look something like this:

include("extensions/Calendar.php");

Basic
To use this calendar, simply place a calendar tag into an article:

If you wish to name your calendar, you can add a name attribute.  By giving a calendar a name, the events won't show up on other calendars with different names or no name. Note, the names have to be simple and valid for article titles. Some characters will cause the attribute to be ignored completely, like an apostrophe.

You can also set two other attributes in the calendar tag:

startyear - The first year to shown on the calendar, defaults to this year.

yearsahead - The number of years to include ahead of the current year, defaults to 3. For example, you could have the tag: 

Events
Events are listed on the calendar in two different ways. The calendar will try to build a title for the event from the first section heading in the article. The text under that should would appear when you put your mouse over the name. An example of an event article would be:

== Summer Picnic == Our department will be holding a summer picnic at the park. Bring your families and your appetites!

In the above example, Summer Picnic will appear on the calendar, and the text within the section will appear if you were to hold your mouse over the link.

If you don't put a section in your article, the calendar will show the word Event, with the text in the article displayed when you have your mouse over the link.

More Info
You can find more information in the readme.txt file included with the download, as well as in the source code and calendar template file.

Download
Calendar Extension Download

Questions or Comments
If you have any questions or comments, feel free to email me at the email address listed in the readme.txt and source files.

Screen Shots
Here's a screen capture of the calendar using the default template. You can of course edit the template and style to make the calendar the way you want it to look.