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 searches in the main wiki do not included calendar events. You can also force this rule by setting an optional localsetting global (see below).
 * The easist way to create a new calendar page is to type "Calendars:PageName" in the search box
 * 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

Sharing Calendars
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 namespace:wiki page/calendar name format. Be sure to include usetemplates or other special parameters in your calendar if the subscibed calendar uses them. Namespace not used: 

Namespace is used: 

To share more than one calender 

Parameters
Please use quotes for any parameter that may contain a space {| border=1 cellpadding="5" class="prettytable" ! Parameters ! Description ! Example ! Default ! Version Values can be: yesterday, today, tomorrow or a datevalue
 * name=<"value">
 * Name of your calendar
 * name="Family Events"
 * Public
 * 2.0.4
 * disableaddevent
 * The "Add Event" link is removed from the calendar.
 * disableaddevent
 * enabled
 * 2.0.4
 * yearoffset= 
 * Sets the year dropdown +/- value.
 * yearoffset=3
 * 2 (+/- years)
 * 2.0.4
 * date= 
 * Display a single day listing.
 * 2.0.4
 * date= 
 * Display a single day listing.
 * Display a single day listing.
 * date=tomorrow or date=1-1-2010
 * off - normal month view
 * nowrap|2.0.4 mod: 3.7.2
 * defaultedit
 * Whenever a user clicks an event, the event defaults to edit mode.
 * defaultedit
 * off - page view
 * 3.0
 * charlimit= 
 * Sets the calendar event name max length
 * charlimit=30
 * 20 charactors
 * 3.0
 * subscribe=<"value">
 * Allows the calendar to subscribe to existing events from other calendar(s); subscribe to additional calendars delimited by a comma within the ; add events go to your calendar only
 * subscribe="Main Page/Name, SomePage/Name"
 * not subscribed
 * 3.2
 * usetemplates
 * This allows the use of one page to add events by storing many events in one location. The templates are identifed by the button with the month name in the lower right section of the calendar.
 * usetemplates
 * disabled
 * 3.2
 * locktemplates
 * This disables the template button and template links; template events remain visable
 * locktemplates
 * off
 * 3.2
 * fullsubscribe=<"value">
 * Allows the calendar to subscribe impersonate another calendar; add events go to the subscribed calendar only; you can use subscribe mode if needed as well
 * fullsubscribe="Tech Group/Team Calendar"
 * not subscribed
 * 3.2
 * disablelinks
 * This removes the ability to click/edit an existing event created via 'add event'; use 'locktemplates' to disable template created links
 * disablelinks
 * off - allow links/edits
 * 3.2
 * usemultievent usesectionevents
 * Users clicking 'add event' opens the last entered event; you must place each event title in ==event1==, ==event2== multiple event formatting as describle later in this help.
 * usesectionevents
 * disabled - 'add event' will create a new event pages
 * 3.2
 * maxdailyevents= 
 * Set the limit of how many "add event" unique pages are created; this doesn't include template or ==event== type entries. This in sense forces users to use ==event1==, ==event2== formatting
 * maxdailyevents=5
 * 5 events
 * 3.2
 * disablestyles
 * Disable the 'event style' button and disables keyword search styling; inline direct syles are not effected.
 * disablestyles
 * enabled, but does nothing until keyword styles are added
 * 3.2
 * lockdown
 * Basically puts the calendar into a read-only state; this includes 'disableaddevent', 'disablelinks' and 'locktemplates'
 * lockdown
 * false - no lockdown
 * 3.2
 * enablesummary= 
 * Enables event summaries to display below the eventname; value is max character length of the summary
 * enablesummary=100
 * disabled
 * 3.4.2
 * useeventlist= 
 * Enabling this displays a vertical list of all events within a defined amount of days. This hits the db alot as it must search events for every single day in the amount of future days defined... I have the code limited to 120 days, but use the least days needed.
 * useeventlist=30
 * disabled
 * 3.4.2
 * useconfigpage
 * Use alot of parameters? Use the config page instead. Enter each parameter followed by the enter key into the config page. The disablelink option removes the btn and text links to the config page. You can use the config page and options together, but the options overwrites the config page options.
 * useconfigpage useconfigpage=disablelink
 * off
 * 3.4.2
 * css= 
 * Create your own css design based off the default.css file. Rename it and load it via this parameter. I may change the default.css page during releases, so use this as long as you dont mind re-writing your custom css after an upgrade... (=
 * css="olive.css"
 * default.css
 * 3.5
 * disabletimetrack
 * Time tracking is enabled by default and looks for double colons (::vacation-8) or (::vacation:8). This will create a dynamic listing of trackable events below the calendar.
 * disabletimetrack
 * enabled
 * 3.5
 * enablerepeatevents= 
 * Repeating events are created using using (5# Vacation) within normal events. The code looks up the previous months and applies carry-over events to the current month. It may increase the calendar load time as it looks back 15 days (default) into the previous month for carry over repeating events.
 * enablerepeatevents=45
 * disabled
 * 3.5 mod:3.7.8
 * enablelegacy
 * Load events from the older "Title (12-1-2008) - Event 1" format. These older events were used in some version of 3.2 and older. This may increase calendar load times as it much search for older style events and newer events.
 * enablelegacy
 * disabled
 * 3.5.0.1 mod: 3.6
 * disablemodes
 * This removes the 'year', 'month', 'week' buttons from the top of the respective pages.
 * disablemodes
 * enabled
 * 3.6
 * 5dayweek
 * This removes Sat and Sun from all view modes
 * 5dayweek
 * full week
 * 3.6 mod: 3.8.4
 * week or year
 * These parameters default the calendar into that requested mode
 * year
 * month mode
 * 3.6
 * ical= 
 * This enables the iCalendar load tool in full calendar mode. Currently this will load 'DTSTART', 'DTEND', 'SUMMARY', 'DESCRIPTION' and most standard 'RRULE' logic. The optional value is 'overwrite'. Please see iCal readme for more info.
 * ical
 * disabled
 * 3.6
 * disablerecurrences
 * This skips any RRULE recurrences stored in the 'page/name/recurrences' page. The page contains all imported ical repeating rules (RRULE).
 * disablerecurrences
 * disabled
 * 3.6.0.2
 * simplemonth
 * Creates a simple month that displays only clickable numberic days. This would best be used wrapped in a
 * 5dayweek
 * full week
 * 3.6 mod: 3.8.4
 * week or year
 * These parameters default the calendar into that requested mode
 * year
 * month mode
 * 3.6
 * ical= 
 * This enables the iCalendar load tool in full calendar mode. Currently this will load 'DTSTART', 'DTEND', 'SUMMARY', 'DESCRIPTION' and most standard 'RRULE' logic. The optional value is 'overwrite'. Please see iCal readme for more info.
 * ical
 * disabled
 * 3.6
 * disablerecurrences
 * This skips any RRULE recurrences stored in the 'page/name/recurrences' page. The page contains all imported ical repeating rules (RRULE).
 * disablerecurrences
 * disabled
 * 3.6.0.2
 * simplemonth
 * Creates a simple month that displays only clickable numberic days. This would best be used wrapped in a
 * 3.6.0.2
 * simplemonth
 * Creates a simple month that displays only clickable numberic days. This would best be used wrapped in a
 * Creates a simple month that displays only clickable numberic days. This would best be used wrapped in a

Tips/Tricks!

 * Create a new calendar event and use  #REDIRECTpage  to forward the new event to a new non-calendar page!
 * Click "add event", create the event title on line one and use   to copy a remote page into a calendar event body!
 * have alot of calendar preferences...? Use the    option and move all your preference to the config page instead!

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.

The default date format is M-D-YYYY, please change this if needed with the $wgCalendarDateFormat override below before you go live with your calendar.

Recommended Folder Path: /extensions/Calendar Localsettings.php: Simple: require_once("$IP/extensions/Calendar/Calendar.php"); Recommended: 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; $wgCalendarForceNamespace='Calendars';

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.

Date Conversion Tool (v3.8.1)
Please TEST using a test calendar before using on a LIVE calendar.


 * Used in conjunction with global $wgCalendarDateFormat=YYYYMMDD

This tool allows admins to convert all wiki calendar pages from MM-DD-YYY to a custom user defined format. This only converts from the legacy date format to the custom format so technically can only be used to convert one time. The new format can be used in any manner or order.

This tool finds the original calendar events and moves the to new pages using the newer date format.

require_once( "$IP/extensions/calendar/dateConverter.php" );

Parameters:
 * newformat: (YYYY MM DD M D SM LM) SM=short month, LM=long month (default: YYYYMMDD)
 * pagename: wiki pagename including namespace as needed
 * calname: name of the calendar (default: Public)
 * redirect: add redirect link to old original event pages. (default: no redirect links, old page is removed)

The following examples do not convert the wiki title/pages; its more of a "test" run...  -- 20090805  -- Jul 1, 2009

Once you test the script, you MUST add 'go' to the tag to acutally convert the events to the new format 

Troubleshooting

 * If you have an issue with the calendar display, try setting   in LocalSettings.php.