Cette page a Γ©tΓ© consultΓ©e 2Β 430 fois.
Acceuil
bonhommes Fleurs crayon

Calendar help : DiffΓ©rence entre versions

De Γ‰cole Libre du Soleil Levant

Aller Γ  : Navigation, rechercher
(Page créée avec « <!-- * Readme.txt * Place this data in a wiki page and link with your calendar * Calendar Help information * Contact: Eric Fortin: kenyu73@gmail.com * MediaWiki: http://w... »)
 
 
Ligne 1 : Ligne 1 :
βˆ’
<!--
+
Simple calendar extension for mediawiki.
βˆ’
* Readme.txt
+
βˆ’
* Place this data in a wiki page and link with your calendar
+
Released under the GPL. Copyright 2005 by Christof Damian
βˆ’
* Calendar Help information
+
(christof@damian.net)
βˆ’
* Contact: Eric Fortin: kenyu73@gmail.com
+
βˆ’
* MediaWiki: http://www.mediawiki.org/wiki/User:Kenyu73/Calendar
+
I wrote this for http://krass.com/ where I have simple event
βˆ’
-->
+
calendar. Examples are at http://krass.com/wiki/Current_events and
βˆ’
__TOC__
+
http://krass.com/wiki/Calendar
βˆ’
==Setup==
+
βˆ’
 
+
The idea was to keep the calendar as simple as possible and leave all
βˆ’
* 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 editing and page creation to mediawiki. It doesn't require any new
βˆ’
* The easist way to create a new calendar page is to type "Calendars:PageName" in the search box
+
database tables or files.
βˆ’
* Add a <nowiki><calendar /></nowiki> extension tag to the newly create page (or existing page)
+
βˆ’
* Add parameters as required (see below listing)
+
To use this on your mediawiki site, copy the "calendar" directory into your
βˆ’
 
+
extension directory and put this somewhere at the end of your
βˆ’
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...
+
"LocalSettings.php":
βˆ’
 
+
βˆ’
 
+
  require_once("$IP/extensions/calendar/Calendar.php");
βˆ’
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! :)
+
βˆ’
+
Then you can use the calendar on any page like this:
βˆ’
<nowiki><calendar /> </nowiki>
+
βˆ’
<nowiki><calendar name="Team Calendar" /> </nowiki>
+
<calendar>
βˆ’
 
+
name=mycalendar
βˆ’
<div style="color:red">'''Important:'''</div>
+
view=year
βˆ’
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.<br/>
+
</calendar>
βˆ’
[[image:namespaces example.gif]]
+
βˆ’
 
+
The parameters work like this:
βˆ’
 
+
βˆ’
 
+
"view"
βˆ’
The following are examples of how an ('''Namespace:Page/Name/EventDate''') event will look:
+
      can be "days" days from today, "rdays" (reverse days),
βˆ’
 
+
      "week","month","threemonths", "year" (default), "weeks" and "months".
βˆ’
<nowiki><calendar name="Sales" /></nowiki>
+
"name"
βˆ’
    '''Calendars:Acme Company/Sales/12-1-2008 -Event 1'''
+
      is a name for the calendar and changes the names of the day pages.
βˆ’
 
+
"format"
βˆ’
<nowiki><calendar name="Support" /></nowiki>
+
      defaults to '%name_%year_%month_%day' and describes the names
βˆ’
    '''Calendars:Acme Company/Support/12-1-2008 -Event 1'''
+
      of the day pages.
βˆ’
 
+
"formattitle"
βˆ’
=== Sharing Calendars ===
+
      formats the titles in today/days/week view
βˆ’
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.
+
"day","month","year"
βˆ’
'''Namespace not used:'''
+
      you can specify the date of the calendar, it defaults to today.
βˆ’
<nowiki><calendar name="Support" subscribe="Acme Company/Sales" /></nowiki>
+
      currently this doesn't work with "view=week"
βˆ’
 
+
"date"
βˆ’
'''Namespace is used:'''
+
      this takes a php strtotime ( http:://www.php.net/strtotime )
βˆ’
<nowiki><calendar name="Support" subscribe="Calendars:Acme Company/Sales" /></nowiki>
+
      option and overrides the "day","month","year" option
βˆ’
 
+
      above. examples are:
βˆ’
'''To share more than one calender'''
+
βˆ’
<nowiki><calendar name="Support" subscribe="Calendars:Acme Company/Sales, Calendars:Acme Company/Marketing" /></nowiki>
+
      date="+1 week"
βˆ’
 
+
      date="next monday"
βˆ’
=== Parameters ===
+
      date="+7 days"
βˆ’
Please use quotes for any parameter that may contain a space
+
"enddate"
βˆ’
{| border=1 cellpadding="5" class="prettytable"
+
      just used for the weeks view, this is the last date to display in the
βˆ’
! Parameters
+
      weeks
βˆ’
! Description
+
"weekstart"
βˆ’
! Example
+
      week starts on 1=monday ... 7=sunday. default is 1
βˆ’
! Default
+
"skipempty"
βˆ’
! Version
+
      skip empty days in week view
βˆ’
|-
+
"showempty"
βˆ’
|'''name=<"value">'''
+
      show inivitation to add entries when a day is empty, default is 1
βˆ’
|Name of your calendar
+
"weekformat"
βˆ’
|name="Family Events"
+
      format of the week, days, rdays and today view.
βˆ’
|Public
+
βˆ’
|2.0.4
+
      - "text" (default), simple wikitext format
βˆ’
|-
+
      - "list" a layout that uses <dl>, <dt> and <dd> (definition
βˆ’
|'''disableaddevent'''
+
        list) tags with the 'calendar' class added to the <dl>
βˆ’
|The "Add Event" link is removed from the calendar.
+
        tag and the calendarToday class to the span tag that
βˆ’
|disableaddevent
+
        contains the weekday title. Merged calendar
βˆ’
|enabled
+
        entries are added as sub lists with the name part of the
βˆ’
|2.0.4
+
        merged calendar as a link to the page of that
βˆ’
|-
+
        calendar.
βˆ’
|'''yearoffset=<value>'''
+
      - "table" a layout that uses table tags with also the name of
βˆ’
|Sets the year dropdown +/- value.
+
        merged calendars as a link to the page of those
βˆ’
|yearoffset=3
+
        calendars. The 'calendar' class is added to the table tag and
βˆ’
|2  (+/- years)
+
        the 'calendarToday' class to the span tag that contains the
βˆ’
|2.0.4
+
        weekday title.
βˆ’
|-
+
"months"
βˆ’
|'''date=<value>'''
+
        number of months for the "months" view
βˆ’
|Display a single day listing. <br />Values can be: '''yesterday''', '''today''', '''tomorrow''' or a '''datevalue'''
+
"mergemonth"
βˆ’
|date=tomorrow or date=1-1-2010
+
include the day page in the month, months and year views
βˆ’
|off - normal month view
+
βˆ’
|nowrap|2.0.4<br>mod: 3.7.2
+
format & formattitle accept these substitutions:
βˆ’
|-
+
        %name
βˆ’
|'''defaultedit'''
+
        %day,%month,%year
βˆ’
|Whenever a user clicks an event, the event defaults to edit mode.
+
        any php date() substitution prefixed with '%', like '%m','%d','%Y'
βˆ’
|defaultedit
+
βˆ’
|off - page view
+
Thanks go to these contributors:
βˆ’
|3.0
+
βˆ’
|-
+
- Amador amador@tiscali.nl (localization, weekformat, showempty)
βˆ’
|'''charlimit=<value>'''
+
- Austin Che (cache fix)
βˆ’
|Sets the calendar event name max length
+
- Dexter Samida <dextersamida@gmail.com> (today view)
βˆ’
|charlimit=30
+
- Kai Sommer (months view)
βˆ’
|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
+
βˆ’
|-
+
βˆ’
|<s>usemultievent</s><br>'''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=<value>'''
+
βˆ’
|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=<value>'''
+
βˆ’
|Enables event summaries to display below the eventname; value is max character length of the summary
+
βˆ’
|enablesummary=100
+
βˆ’
|disabled
+
βˆ’
|3.4.2
+
βˆ’
|-
+
βˆ’
|'''useeventlist=<value>'''
+
βˆ’
|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 <calendar /> options together, but the <calendar /> options overwrites the ''config page'' options.
+
βˆ’
|useconfigpage<br/>useconfigpage=disablelink
+
βˆ’
|off
+
βˆ’
|3.4.2
+
βˆ’
|-
+
βˆ’
|'''css=<value>'''
+
βˆ’
|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=<value>'''
+
βˆ’
|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<br>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<br>mod: 3.6
+
βˆ’
|-
+
βˆ’
|'''disablemodes'''
+
βˆ’
|This removes the 'year', 'month', 'week' buttons from the top of the respective pages.
+
βˆ’
|disablemodes
+
βˆ’
|enabled
+
βˆ’
|3.6
+
βˆ’
|-
+
βˆ’
|'''5dayweek'''
+
βˆ’
|This sets the 'week' mode calendar to not display weekends
+
βˆ’
|5dayweek
+
βˆ’
|full week
+
βˆ’
|3.6
+
βˆ’
|-
+
βˆ’
|'''week or year'''
+
βˆ’
|These parameters default the calendar into that requested mode
+
βˆ’
|year
+
βˆ’
|month mode
+
βˆ’
|3.6
+
βˆ’
|-
+
βˆ’
|'''ical=<value>'''
+
βˆ’
|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 <nowiki><table></nowiki> tag to create "mini-calendar" views.
+
βˆ’
|simplemonth
+
βˆ’
|normal mode
+
βˆ’
|3.7
+
βˆ’
|-
+
βˆ’
|'''monday'''
+
βˆ’
|Sets the calendar to begin on '''Monday''' (Mon-Sun)
+
βˆ’
|monday
+
βˆ’
|Sat-Sun
+
βˆ’
|3.7.4
+
βˆ’
|-
+
βˆ’
|'''disableredirects'''
+
βˆ’
|disables event redirects to other pages...ie, so you can use the page "move" without duplicating events
+
βˆ’
|disableredirects
+
βˆ’
|redirects enabled
+
βˆ’
|3.7.7
+
βˆ’
|-
+
βˆ’
|'''disablesectionevents'''
+
βˆ’
|disables the calendar from using sections (==event==) as calendar events
+
βˆ’
|disablesectionevents
+
βˆ’
|section events enabled
+
βˆ’
|3.8.2
+
βˆ’
|-
+
βˆ’
|'''style'''
+
βˆ’
|sets a default '''style''' for all events (ie: font-size, color, etc)... keyword styles via the "style" button override this default style
+
βˆ’
|style="font-size:10px; color: green; font-style:italic"
+
βˆ’
|style=""
+
βˆ’
|3.8.2
+
βˆ’
|-
+
βˆ’
|'''dayofyear'''
+
βˆ’
|displays the day of the year (1-365)
+
βˆ’
|dayofyear
+
βˆ’
|disabled
+
βˆ’
|3.8.3
+
βˆ’
|-
+
βˆ’
|'''weekofyear'''
+
βˆ’
|displays the week of the year
+
βˆ’
|weekofyear
+
βˆ’
|disabled
+
βˆ’
|3.8.3
+
βˆ’
|}
+
βˆ’
 
+
βˆ’
== 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. <br />
+
βˆ’
 
+
βˆ’
Events are listed on the calendar with the information on the first line of the page if created via "'''add event'''". <br />  
+
βˆ’
 
+
βˆ’
In this example, '''Summer Picnic''' will appear on the calendar.
+
βˆ’
Summer Picnic<br>
+
βˆ’
Our department will be holding a summer picnic at the park.  Bring your families and your appetites!
+
βˆ’
 
+
βˆ’
* Note: Events can also be wiki images. Either '''<nowiki>[[Image:Picture.jpg]]</nowiki>''' or '''<nowiki>Picture.jpg</nowiki>''' formats can be used.
+
βˆ’
 
+
βˆ’
 
+
βˆ’
=== Section Based 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''. You can force all new events into one page by using the ''usesectionevent'' parameter.
+
βˆ’
 
+
βˆ’
In this example, '''Picnic''' and '''Party''' will show up on the same day.
+
βˆ’
<nowiki>
+
βˆ’
==Picnic==
+
βˆ’
Bring food!
+
βˆ’
==Party==
+
βˆ’
Bring drinks
+
βˆ’
</nowiki>
+
βˆ’
 
+
βˆ’
 
+
βˆ’
* '''The body requires some entry or the event will NOT save...'''
+
βˆ’
 
+
βˆ’
* If you're forcing users to reuse pages '''(usesectionevents)''', the addevent defaults to a page simular to the discussion (+) page. Ensure users use the Subject textbox and enter something in the body for the event to save. Using this method eliminates the <nowiki>==event==</nowiki> manual entry. However, you can omit the subject and still manually add section events in the body.
+
βˆ’
 
+
βˆ’
* use the '''disablesectionevents''' preference to diable the calendar from using sections as events.
+
βˆ’
 
+
βˆ’
=== Repeating Events ===
+
βˆ’
Repeating events (''if enabled'') allow an easy way to add the same event over multiple days. The below example will create 5 repeating Vacation events in the calendar. You MUST enable the functionality by adding '''enablerepeatevents''' to your parameter tag or config page. Enabling repeating events causes the calendar to look back 15 days into the previous month for any carry over events. If by chance you have a repeating event prior to the 15th, it will not carry over to the next month.
+
βˆ’
5# Vacation
+
βˆ’
 
+
βˆ’
=== Recurrence Event ===
+
βˆ’
Recurrence type events are traditional repeating yearly events like holidays, birthdays, etc. To create a recurrence event, choose 'add event' and add the following trigger syntax:
+
βˆ’
##My Birthday
+
βˆ’
 
+
βˆ’
This will convert the event into an vCalendar RRULE event and store it into the 'page/name/recurrence' wiki page. This is also where any ical recurrence events are stored.
+
βˆ’
 
+
βˆ’
=== 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
+
βˆ’
 
+
βˆ’
<nowiki>
+
βˆ’
1# Vacation
+
βˆ’
2# Holiday
+
βˆ’
7# Election Day
+
βˆ’
7# Office Closed
+
βˆ’
31# Half Day
+
βˆ’
19# Appointment
+
βˆ’
20-25# Hiking Trip <-- multiple day event
+
βˆ’
</nowiki>
+
βˆ’
 
+
βˆ’
=== Colors and Formatting ===
+
βˆ’
# The calendar supports most of the basic MediaWiki text/font properties including the 'ticks' for italic and bold.
+
βˆ’
#* <nowiki>'''<font color=red>vacation</font>'''</nowiki>
+
βˆ’
#* <span style="color:red;background:yellow">Vacation time!!</span> --> <nowiki><span style="color:red;background:yellow">Vacation time!!</span></nowiki>
+
βˆ’
# Setup the ''event style''' page by adding as many 'styles' as you wish. These styles are based on keyword matches, so be wary of what words you choose... The styles follow standard html/css style properties.
+
βˆ’
#* '''syntax:''' keyword:: style1; style2; etc
+
βˆ’
#** myStyle:: color:green; text-decoration:line-through; --> <s><span style="color:green">Whatever</span></s>
+
βˆ’
#** birthday:: color:red; font-style: bold; --> '''<font color=red>My Birthday</font>'''
+
βˆ’
#** sick:: color: green;background-color: yellow --> <span style="color:green;background-color:yellow">Out Sick today</span> <br/>
+
βˆ’
#** vacation:: color: red; font-style: italic --> ''<font color=red>Vacation to Florida!</font>''<br/>
+
βˆ’
 
+
βˆ’
 
+
βˆ’
I'm not sure how far and how many variation of the css and/or Wiki formatting will go, but I've tested a good portion of the standard text properties. (<nowiki><div></nowiki> is giving me an issue at this time though... but <nowiki><span></nowiki> works just fine!)
+
βˆ’
 
+
βˆ’
 
+
βˆ’
* you can default all events to your style preference by using the '''style="..."''' preference. However, individual keyword event styles override the global default.
+
βˆ’
 
+
βˆ’
=== Time Tracker ===
+
βˆ’
You can keep simple time tracking of events by formatting the event as below. This will track any dynamically created event in a simple table below the calendar in full mode only. The event is triggered by prefixing (2) colons followed by the event then (1) colon or (1) dash followed by a numeric value to add.
+
βˆ’
::Vacation: 8 or ::Vacation -8
+
βˆ’
::Team Project 1 - 3
+
βˆ’
::Sick : 4
+
βˆ’
 
+
βˆ’
Note that events created using the 'add event' link only track time for that month. If you want to track a years total, you need to enable and use month templates ('''usetemplates''')
+
βˆ’
 
+
βˆ’
== vCalendar (iCal) Support ==
+
βˆ’
The calendar supports the basic importing of vCalendar formatted files. The import utility is enabled by adding '''ical''' or '''ical=overwrite''' to your parameter string or ''config'' file settings.<br>
+
βˆ’
<br>
+
βˆ’
The calendar accepts the following vCalendar formats
+
βˆ’
:DTSTART
+
βˆ’
:DTEND
+
βˆ’
:SUMMARY
+
βˆ’
:DESCRIPTION (not with RRULEs though)
+
βˆ’
:RRULE
+
βˆ’
 
+
βˆ’
The RRULE evaluates basic calendar event logic only... nothing complex like "every 3rd Monday of every-other month". It does handle typical repeats like Thanksgiving, Mothers Day, etc that required logic like "the 4th Thursday of November" or "the last Monday of March" kinda logic. Basically, it should capture most repeating events like birthdays and holidays.
+
βˆ’
 
+
βˆ’
 
+
βˆ’
The RRULE (repeating) events are stored in a subpage called '''recurrence'''. Basically, in the following format ''page/calendarname/recurrence''. You can manually edit or delete these as needed. If you use the ''ical=overwrite'' option, it deletes the data before writing in the new ical data.
+
βˆ’
 
+
βˆ’
 
+
βˆ’
Imported single day events, without the RRULE, are created in the calendar as normal pages in the -Event 0 page for the respective day.
+
βˆ’
 
+
βˆ’
== Internationalization (i18n)==
+
βˆ’
The calendar months and weekday names will display in any MediaWiki language selected in the user preferences. However, the custom buttons and other calendar specific information has only been converted to French (fr), Spanish (es), German (de), Hungarian (hu),Polish (nl) and Finnish(fi).
+
βˆ’
 
+
βˆ’
 
+
βˆ’
If any other languages are required, new messages structures will have to be created in the ''calendar.i18n.php'' file as needed by the user. It's not hard really, just copy an existing message structure in that file and update the required translations. It would take all of 15 minutes to add additional languages. The calendar logic is coded as such that any new message structures added will auto-load and be available right away! If you '''post''' the newly created language to the '''google issue tracker''', I'll add it into the language file below.
+
βˆ’
 
+
βˆ’
 
+
βˆ’
I update the trunk code everytime someone posts a language translation. Please check here for the latest [http://code.google.com/p/mw-calendar/source/browse/trunk/calendar.i18n.php calendar.i18n.php] file.
+
βˆ’
 
+
βˆ’
<br>
+
βˆ’
 
+
βˆ’
== Quick Sheet ==
+
βˆ’
<table border=1 cellpadding=5>
+
βˆ’
<th>method</th>
+
βˆ’
<th>example</th>
+
βˆ’
<th>results</th>
+
βˆ’
<tr>
+
βˆ’
  <td>repeating event (add event method)</td>
+
βˆ’
  <td>5#Vacation</td>
+
βˆ’
  <td>Creates 5 repeating event days</td>
+
βˆ’
</tr>
+
βˆ’
<tr>
+
βˆ’
  <td>repeating event (template method)</td>
+
βˆ’
  <td>5-10#Vacation</td>
+
βˆ’
  <td>Creates event days starting on the 5th continuing until the 10th</td>
+
βˆ’
</tr>
+
βˆ’
<tr>
+
βˆ’
  <td>create a reoccurring yearly event (add event)</td>
+
βˆ’
  <td>##My Birthday</td>
+
βˆ’
  <td>Creates this event on this day every year</td>
+
βˆ’
</tr>
+
βˆ’
<tr>
+
βˆ’
  <td>create multiple events for one day using one page</td>
+
βˆ’
  <td>== event 1 ==<br>== event 2 ==</td>
+
βˆ’
  <td>Creates two events on one page</td>
+
βˆ’
</tr>
+
βˆ’
</table>
+
βˆ’
 
+
βˆ’
== Tips/Tricks! ==
+
βˆ’
* Create a new calendar event and use '''<nowiki>#REDIRECT[[page]]</nowiki>''' to forward the new event to a new non-calendar page!
+
βˆ’
* Click "add event", create the event title on line one and use '''<nowiki>{{:page}}</nowiki>''' to copy a remote page into a calendar event body!
+
βˆ’
* have alot of calendar preferences...? Use the ''<nowiki><calendar name=SomeName useconfigpage /></nowiki>'' 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 [http://www.mediawiki.org/wiki/Help:Namespaces 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:'''<br/>
+
βˆ’
<br/>
+
βˆ’
''Simple'':
+
βˆ’
require_once("$IP/extensions/Calendar/Calendar.php");<br/>
+
βˆ’
+
βˆ’
''Recommended'':
+
βˆ’
require_once("$IP/extensions/Calendar/Calendar.php");<br/>
+
βˆ’
+
βˆ’
// 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.
+
βˆ’
 
+
βˆ’
==== Optional LocalSetting.php Settings ====
+
βˆ’
{| border=1 width=75%
+
βˆ’
!Override
+
βˆ’
!Description
+
βˆ’
!Version
+
βˆ’
|-
+
βˆ’
| nowrap | $wgRestrictCalendarTo = 'sysop';
+
βˆ’
| You can put the whole wiki site into ''Calendar Lockdown'' with the following entry. The value can be any defined group in your wiki site.
+
βˆ’
| &nbsp;
+
βˆ’
|-
+
βˆ’
| nowrap | $wgCalendarURLPath="/w/extensions/Calendar";
+
βˆ’
| if for any reason, the calendar CSS file path is invalid, please set the calendar root URL manually
+
βˆ’
| &nbsp;
+
βˆ’
|-
+
βˆ’
| nowrap | $wgCalendarDisableRedirects=true
+
βˆ’
| disables calendar event redirects globally
+
βˆ’
| &nbsp;
+
βˆ’
|-
+
βˆ’
| nowrap | $wgCalendarForceNamespace='Calendar'
+
βˆ’
| only allow calendars to be created in the required namespace
+
βˆ’
| &nbsp;
+
βˆ’
|-
+
βˆ’
| nowrap | $wgCalendarDateFormat=YYYYMMDD
+
βˆ’
| use YYYY, MM, DD, M, D, SM, LM in any format <br>''(SM D, YYYY --> Jul 1, 2009)'' <br>(''YYYYMMDD --> 20090701)''<br>'''Note:''' Previous events will not display if you change date formats.
+
βˆ’
| 3.8
+
βˆ’
|}
+
βˆ’
 
+
βˆ’
== Date Conversion Tool (v3.8.1) ==
+
βˆ’
'''Please <u>'''TEST'''</u> 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...
+
βˆ’
<dateConverter pagename='Calendars:TeamPage' calname='Team Calendar' newFormat='YYYYMMDD' /> -- 20090805
+
βˆ’
<dateConverter pagename='Calendars:TeamPage' calname='Team Calendar' newFormat='SD D, YYYY' /> -- Jul 1, 2009
+
βˆ’
 
+
βˆ’
Once you test the script, you MUST add ''''go'''' to the tag to acutally convert the events to the new format
+
βˆ’
<dateConverter pagename='Calendars:TeamPage' calname='Team Calendar' newFormat='YYYYMMDD' '''go''' />
+
βˆ’
 
+
βˆ’
== Troublehooting ==
+
βˆ’
* If you have an issue with the calendar display, try setting '''<code>$wgUseTidy = false;</code>''' in LocalSettings.php.
+

Version actuelle en date du 30 janvier 2013 Γ  00:03

Simple calendar extension for mediawiki.

Released under the GPL. Copyright 2005 by Christof Damian (christof@damian.net)

I wrote this for http://krass.com/ where I have simple event calendar. Examples are at http://krass.com/wiki/Current_events and http://krass.com/wiki/Calendar

The idea was to keep the calendar as simple as possible and leave all the editing and page creation to mediawiki. It doesn't require any new database tables or files.

To use this on your mediawiki site, copy the "calendar" directory into your extension directory and put this somewhere at the end of your "LocalSettings.php":

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

Then you can use the calendar on any page like this:

<calendar> name=mycalendar view=year </calendar>

The parameters work like this:

"view" can be "days" days from today, "rdays" (reverse days), "week","month","threemonths", "year" (default), "weeks" and "months". "name" is a name for the calendar and changes the names of the day pages. "format" defaults to '%name_%year_%month_%day' and describes the names of the day pages. "formattitle" formats the titles in today/days/week view "day","month","year" you can specify the date of the calendar, it defaults to today. currently this doesn't work with "view=week" "date" this takes a php strtotime ( http:://www.php.net/strtotime ) option and overrides the "day","month","year" option above. examples are:

date="+1 week" date="next monday" date="+7 days" "enddate" just used for the weeks view, this is the last date to display in the weeks "weekstart" week starts on 1=monday ... 7=sunday. default is 1 "skipempty" skip empty days in week view "showempty" show inivitation to add entries when a day is empty, default is 1 "weekformat" format of the week, days, rdays and today view.

- "text" (default), simple wikitext format - "list" a layout that uses

,
and
(definition list) tags with the 'calendar' class added to the
tag and the calendarToday class to the span tag that contains the weekday title. Merged calendar entries are added as sub lists with the name part of the merged calendar as a link to the page of that calendar. - "table" a layout that uses table tags with also the name of merged calendars as a link to the page of those calendars. The 'calendar' class is added to the table tag and the 'calendarToday' class to the span tag that contains the weekday title. "months" number of months for the "months" view "mergemonth" include the day page in the month, months and year views

format & formattitle accept these substitutions:  %name  %day,%month,%year any php date() substitution prefixed with '%', like '%m','%d','%Y'

Thanks go to these contributors:

- Amador amador@tiscali.nl (localization, weekformat, showempty) - Austin Che (cache fix) - Dexter Samida <dextersamida@gmail.com> (today view) - Kai Sommer (months view)