Difference between revisions of "Test calendar"

From FollowTheScore
Jump to: navigation, search
m
m
Line 3: Line 3:
  
 
How to use it for your websites:
 
How to use it for your websites:
#Download the following templates, and create them into your wiki:
+
===Download the following templates, and create them into your wiki===
#*[[Template:CalendarSingle]]
+
 
#*[[Template:Calendar link]]
+
These templates are needed to know how to display properly the month calendar. Months are categorized by the day of the week of the first day:
#*[[Template:Calendar/MonthStartMon]]
+
#*[[Template:Calendar/MonthStartMon]] // all months that start on a Monday
#*[[Template:Calendar/MonthStartTue]]
+
#*[[Template:Calendar/MonthStartTue]] // etc...
 
#*[[Template:Calendar/MonthStartWed]]
 
#*[[Template:Calendar/MonthStartWed]]
 
#*[[Template:Calendar/MonthStartThu]]
 
#*[[Template:Calendar/MonthStartThu]]
Line 13: Line 13:
 
#*[[Template:Calendar/MonthStartSat]]
 
#*[[Template:Calendar/MonthStartSat]]
 
#*[[Template:Calendar/MonthStartSun]]
 
#*[[Template:Calendar/MonthStartSun]]
 +
 +
This template calls the proper template above, with a parameter input for each day:
 +
#*[[Template:CalendarSingle]]
 +
 +
Finally this is the template that calculates the parameter for each day for above template (based on DPL):
 +
#*[[Template:Calendar link]]
 +
 +
This template is not mandatory, it is designed to ease the creation of an event, although it can be done by other means:
 
#*[[Event template]]
 
#*[[Event template]]
#Download the extensions "parserfunctions" and "inputbox" from mediawiki website.
+
 
#Now, create the base page where the current month calendar will be created (like "Current events"), and insert below code in it:
+
===Download additional extensions===
 +
download "parserfunctions" and "inputbox" from mediawiki website.
 +
 
 +
===Create a page for each month===
 +
Now, create the base page where the current month calendar will be created (like "Current events"), and insert below code in it:
 +
 
 
<pre>
 
<pre>
 
{{:Test calendar {{#time: F Y}}}}
 
{{:Test calendar {{#time: F Y}}}}
Line 32: Line 45:
 
|}
 
|}
  
{{CalendarSingle|year=2007|month=02|show_year=yes|basepage=Test calendar}}
+
{{CalendarSingle|year=2007|month=04|show_year=yes|basepage=Test calendar}}
  
 
{{#dpl:category=Events
 
{{#dpl:category=Events

Revision as of 14:01, 4 April 2007

Installation

This is a calendaring application based on DPL functionality.

How to use it for your websites:

Download the following templates, and create them into your wiki

These templates are needed to know how to display properly the month calendar. Months are categorized by the day of the week of the first day:

This template calls the proper template above, with a parameter input for each day:

Finally this is the template that calculates the parameter for each day for above template (based on DPL):

This template is not mandatory, it is designed to ease the creation of an event, although it can be done by other means:

Download additional extensions

download "parserfunctions" and "inputbox" from mediawiki website.

Create a page for each month

Now, create the base page where the current month calendar will be created (like "Current events"), and insert below code in it:

{{:Test calendar {{#time: F Y}}}}
  1. Finally, create one page per month with the format "base page Month year" (example: "Current events April 2007"), insert below code and make sure to replace "2007/04" below by the month and year from the current page name (as well as the year and month parameters from CalendarSingle template):
{|
|<inputbox>
  type=create
  buttonlabel=create new Event
  width=25
  default=2007/04/05 my event name
  preload=Event template
  break=no
</inputbox>
|}

{{CalendarSingle|year=2007|month=04|show_year=yes|basepage=Test calendar}}

{{#dpl:category=Events
  |titlematch=2007/04%
  |include=#Summary,#Participants
  |mode=userformat
  |resultsheader=There are %PAGES% events planned this month.
  |noresultsheader=No events planned so far for this month.
  |listseparators=¶{¦ class="wikitable" ¶!Date / Event name ¶!Categories ¶!Event summary ¶!Participants,¶¦-¶¦<h5>[[%PAGE%]]</h5>¶¦ %CATLIST%,,¶¦}
  |secseparators=¶¦
  |ordermethod=title
  |addcategories=true
  |order=descending
}}

  1. To create a custom event, edit the template Event template, and edit the above DPL.

Demo

Test calendar June 2024