Extension:Calendar (Kenyu73)/Readme

Setup

 * It's recommended to create a custom calendar type Namespace, like Calendars, but can be whatever Namespaces defined in LocalSettings.php or standard MediaWiki namespaces (like user namespaces) however, it's not required. It is recommended though so seaches in the main wiki do not included calendar events.
 * The easist way is to enter "Calendars:My Calendar Name" in the search box to create the main base calendar page.
 * Add a extension tag to the newly create page (or existing page)
 * Add parameters as required (see below listing)

Note: You can have more then one calendar per page. It's fun to find unique combinations of how to use "full" calendar view and "day" only view. Don't forget, since this is a tagged extension, you could always wrap the calendar in a table to shrink it down or justify it...

The calendar has many advanced features; below is a simple basic way to setup the calendar. This calendar will create a standard calendar named "Public" if no name parameter is given, but it's recommended that, at minimun, you create a 'name' parameter. This will give you a good all around full featured calendar. Read and use the advanced parameters at you own risk! :) 

Important: To gain the ability of Parent/Subpage linking, place the calender in an existing namespace (Help:Namespaces) or create a new one. Create a wiki page as shown above and then add your calendar extension tag to that page. This will populate a "quick" shortcut link back to the calendar after the event is entered and saved. The calendar will still work fine if not added to a namespace, but you will not get a "quick link" back to the main calender page.

The following are examples of how an (Namespace:Page/Name/EventDate) event will look:

 Calendars:Acme Company/Sales/12-1-2008 -Event 1

 Calendars:Acme Company/Support/12-1-2008 -Event 1

You can also "share" or subscribe to other calendars by using the "subscribe" or "fullsubscribe" parameter. This will create a calendar of your own, but you'll also have all the events listed from "Sales". Remember to use the full "wiki page/calendar name" format Namespace not used: 

Namespace is used: 

Events
Events can be entered either by the "add event" link or via the "template load" button (if enabled). Both work together seemlessly, but clicking each of them will bring you back to the respective method of creation. Once you save the event, you can easily go back to the calendar via the Subpage/Parent link right above the page body.

Events are listed on the calendar with the information on the first line of the page if created via "add event".

In this example, Summer Picnic will appear on the calendar. Summer Picnic Our department will be holding a summer picnic at the park. Bring your families and your appetites!

Multiple Events
In this example, two calendar events are created using the same page. The == event == can be used to create these mulitple events per page. However, you can still create new page events by clicking Add Event.

In this example, Picnic and Party will show up on the same day.

Picnic
Bring food!

Party
Bring drinks

Template Events
The template button (if enabled) allows users to add a bunch of events into one page. Only one template is created per month/year. This can be used along with all other event types.

The day and the event must be seperated by an '#' as shown in the example. You can also create duplicated days. The days do not have to be in order

1# red::Vacation 2# Holiday 7# Election Day 7# Office Closed 31# Half Day 19# Appointment 20-25# Hiking Trip <-- multiple day event

Colors and Formatting
Add HTML style parameters to the event styles page according to HTML style rules. The colors and formatting are identified by the keyword and the style parameter option.

First, setup the event styles style page by clicking the 'event styles' button. Syntax - keyword:: < option1; option2; etc; > red:: color:red green:: color:green yellow:: color:yellow myStyle:: color:green; backgroud-color:yellow; text-decoration:line-through;

Second, create calendar events. There are two ways for the event to get captured by the styles you just created... 1) prefixing the calendar event (red::SomeEvent, style1::Another Event). This is the default behavior red:: Holiday Party - 12pm <-- this line will be 'red' and the 'red::' tag will be removed from the calendar display 2) setting the style="search" parameter. This searches the complete event title for any of the defined styles you created... be selective if you use this search mode. If you happen to define 'sick:: color:green' as a style, it will also match up with 'sickly' Targets red-tag sale today! <-- this line will be 'red' if 'red' is defined in your style page.

Inline text and background colors are direct html color codes and are still supported, but a matching 'style' will override the inline preference. red::green::Christmas <-- this will stick no matter red::Vacation <--  the following could get overwritten by a style because 'red' could be redefined in a style page

Here's a list of some of the various text/font properties that might be used. However, not all may work as it depends on MediaWiki, your web browser and other factors. Basically, any HTML text based style has the potential to work.


 * font
 * font-family
 * font-size
 * font-size-adjust
 * font-stretch
 * font-style
 * font-variant
 * font-weight
 * letter-spacing
 * line-height
 * color
 * background-color
 * text-align
 * text-decoration
 * text-indent
 * text-shadow
 * text-transform

Installation
The following are details of the administrator installation of this calendar extension. If you dont have any custom Namespaces, then 100 and 101 are fine, if you do have existing custom Namespaces, just bump the numbers up accordingly. See Help:Namespaces for more information. The $wgNamespacesWithSubpages values must match the values assigned to the $wgExtraNamespaces. Folder Path: /extensions/Calendar Localsettings.php: require_once("$IP/extensions/Calendar/Calendar.php"); // Puts events into their own namesspace/group (not included in 'main' searches... etc) $wgExtraNamespaces[100] = "Calendars"; $wgExtraNamespaces[101] = "Calendars_talk"; //Note: 'Calendars' is an example, please feel free to use whatever name you wish // Puts the events into Subpages (allows a quick link back to primary calendar) $wgNamespacesWithSubpages[100] = true; $wgNamespacesWithSubpages[101] = true; The additional namespaces move all the events outside the "main" group... should clean the mess up some. If you have custom namespaces installed already, make sure you bump up the [100][101] values up accordingly.

optional overrides $extensionPath = "/var/www/extensions/Calendar/"; or $extensionPath = "c:\extensions\";