Help:Calendar

From WikiLou
Jump to: navigation, search

Calendars can be made by any user, for any use, on any page. The main use of this code will probably be for the events calendar on the Current events page.

The simplest calendar is made like this:

<calendar>
name=fill in
view=year
</calendar>

Just replace "fill in" with the name of your choice. If you're making a personal calendar, you may want to use your username and post it on your user page. If it is for a business, name it after the business, etc.

Basic Paramaters

The parameters work like this:

"name"

Is a name for the calendar and changes the names of the day pages.

"view"

can be "days" days from today, "rdays" (reverse days), "week", "month", "threemonths" and "year" (default).

Advanced Paramaters

These can be added to the calendar to make it more customized.

"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"

"weekstart"

Week starts on 1=monday ... 7=sunday. Default is 1.

"skipempty"

Skips 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 <dl>, <dt> and <dd> (definition list) tags with the 'calendar' class added to the <dl> tag and the calendarToday class to the span tag thatcontains 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.

Notes

"format" & "formattitle" accept these substitutions:

  • %name
  • %day,%month,%year
  • Any php date() substitution prefixed with '%', like '%m','%d','%Y'

Credits

All credit for WikiLou's calendar abilities, and for most of this help page, is due to Christof Damian of Krass.com.


WikiLou Help Pages
IntroductionStarting a New PageTablesLinksCategoriesImagesVideoTemplatesInputboxVariablesCalendarsRevertingStubsUser PagesNPOVPolicyGuidelinesFAQUserboxes