User:Simsong/Calendar

New Developer / Mediawiki 1.11+ Support
I will no longer be maintaining this extension for Mediawiki. Another person, has graciously stepped in and will continue to develop and support this extension. His name is Simson Garfinkel and you can find more information on Simson's User Page. His first contribution is a version of the Calendar that works with Mediawiki 1.11. For anyone using that version (or newer), please download from his page.

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, 1.8.2 and 1.10.1) 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
Another person, Simson Garfinkel, has graciously stepped in to continue development and support of this calendar. It is suggested that you download the calendar from Simson's User Page. This version works with Mediawiki 1.11 and higher. Here's a direct link to his download:

Simson's Calendar Extension (Zip file)

For those who are interested in my original code, you can download it if you wish. This does NOT work on Mediawiki 1.11 or higher

Original Calendar Extension (Zip file)

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.