Friday, 27 September 2002

Usage:

The CalendarPlugin can be used to generate a monthly calendar in a wiki page. It's handy for PersonalWikis.

Individual dates in the calendar link to specially named wiki pages. The names for the "day pages" are by default formed by appending the date to the pagename on which the calendar appears.

<em>This feature was inspired by Manila, and first implemented by GaryBenson. It was later implemented as a WikiPlugin by JeffDairiki.</em>

<?plugin Calendar?>

wil get you:


Plugin Arguments

Selection of Month

year
Specify the year for the calendar. (Default: current year.)
month
Specify the month for the calendar. (Default: current month.)
month_offset
Added to <em>month</em>. Can be used to include several months worth of calendars on a single wiki page.

"Day Page" Names

date_format
Strftime style format string used to generate page names for the "day pages." The default value is '%Y-%m-%d'.
prefix
Prepended to the date (formatted per <em>date_format</em>) to generate the "day page" names. The default value is '[pagename]:'.

Appearance

month_format
Strftime style format string used to generate the title of the calendar. (Default: '%B, %Y'.)
wday_format
Strftime style format string used to generate the day-of-week names at the top of the calendar.
start_wday
What day of the week does the calendar start on. This should be specified as an integer in the range zero (Sunday) through six (Saturday), inclusive.

Patch for 1.2

GaryBenson wrote the first calendar implementation for PhpWiki 1.2. (Since 1.2 doesn't support plugins, it uses a ###CALENDAR### token as a trigger.) Gary provides a screenshot at http://inauspicious.org/files/screenshots/calender.png, a patch (on 1.2.0), and calendar.php (which renders a view of the year.)


PhpWikiDocumentation