Custom Markup for PmWiki Recipe PL Event List

Get markup and documentation: Cookbook.PLEventList
Try basic features: PLCal.HomePage

Show the lastest 5 events from page group PLCal using full textual representations of day and month:

(:pagelist group=PLCal fmt=#eventlistshortweekday order=$:StartYear,$:StartMonth,$:StartDay,$:StartTime list=normal name=-Template,-HomePage,-PLTemplates count=-5:)

(:if false:)
[[#eventlistshortweekday]]
{(ftime fmt="%A %B %d, %Y" when={=$:StartYear}-{=$:StartMonth}-{=$:StartDay}T{=$:StartTime}:00)}: [[({=$Group}/){=$Name}|{=$Title}]] [[<<]]
[[#eventlistshortend]]
(:ifend:)

Thursday January 01, 2015: New Year 2015
Tuesday December 22, 2015: December Solstice
Monday July 15, 2019: Get
Wednesday January 01, 2020: New Year 2020
Saturday June 20, 2020: June Solstice

List all events of a certain month:

Note: Please don't forget leading zeros in {$:ListMonth}.

(:ListMonth: 12:)
(:ListYear: 2013:)
'''Events in {(ftime fmt="%B %Y" when={$:ListYear}-{$:ListMonth}-01T00:00:00)}:'''
(:pagelist group=PLCal $:StartYear={$:ListYear} $:StartMonth={$:ListMonth} fmt=PLCal/PLTemplates#eventlistshort order=$:StartDay,$:StartTime list=normal name=-Template,-HomePage,-PLTemplates:)

Events in December 2013:

Notfiy me of all events that happen today:

Note: If the list is empty, please feel free to create a custom test event for today at PLCal.HomePage.

(:pagelist group=PLCal if="date {=$:StartYear}{=$:StartMonth}{=$:StartDay}" fmt=#eventlistshorttoday order=$:StartTime list=normal name=-Template,-HomePage,-PLTemplates:)

(:if false:)
[[#eventlistshorttoday]]
'''Today: ''' [[({=$Group}/){=$Name}|{=$Title}]] [[<<]]
[[#eventlistshorttodayend]]
(:ifend:)

List all events that happen today or within 30 days:

Note: If the list is empty, please feel free to create a custom test event at PLCal.HomePage.

'''Upcoming events for the next 30 days:'''
(:pagelist group=PLCal if="date {(ftime fmt='%F')}..{(ftime fmt='%F' when='+30 days')} '{=$:StartYear}-{=$:StartMonth}-{=$:StartDay}'" fmt=PLCal/PLTemplates#eventlistshort order=$:StartTime list=normal name=-Template,-HomePage,-PLTemplates:)

Upcoming events for the next 30 days:

2020-01-01, 00:00: New Year 2020

Notfiy me of yearly recurring events (birthdays, anniversaries...):

Note: This requires an extra page text variable {$:RecurringYearly} in the event page set to RecurringYearly: yes
Sample page (please feel free to change StartDay: and StartMonth: to today's date for testing): PLCal.RecurringTestEvent?action=edit
Caution: Those events won't be repeated in the normal event lists. They will appear there only for the first year.

(:pagelist group=PLCal if="[ date {(ftime fmt="%Y")}{=$:StartMonth}{=$:StartDay} and equal {=$:RecurringYearly} yes ]" fmt=#eventlistshorttoday order=$:StartTime list=normal name=-Template,-HomePage,-PLTemplates:)

(:if false:)
[[#eventlistshorttoday]]
'''Today: ''' [[({=$Group}/){=$Name}|{=$Title}]] [[<<]]
[[#eventlistshorttodayend]]
(:ifend:)

Display input form for creating new pages, allowing the user to select any existing event as a template from a dropdown menu:

(:if auth edit PLCal.NewPage:)(:input form {$ScriptUrl} get:)
(:input hidden action edit:)'''New event:''' (:input text pagename "PLCal." size=25:) '''based on template:''' (:pagelist fmt=#plcaldropdownlist group=PLCal name=-HomePage,-PLTemplates list=normal wrap=inline:)
(:input submit value="Create":)(:input end:)
(:ifend:)

(:if false:)
[[#plcaldropdownlist]]
(:input select name=template value={=$FullName} label="{=$Name}":)
[[#plcaldropdownlistend]]
(:ifend:)

New event: based on template:

List all events in which StartDay, StartMonth, StartYear or StartTime aren't properly formatted (useful for admins):

'''Please recheck the following event announcements for formatting errors:'''
(:pagelist group=PLCal fmt=#eventlistshortcheck list=normal name=-Template,-HomePage,-PLTemplates:)

(:if false:)
[[#eventlistshortcheck]]
(:if2 [ ! equal {(strlen '{=$:StartDay}')} 2 || ! equal {(strlen '{=$:StartMonth}')} 2 || ! equal {(strlen '{=$:StartYear}')} 4 || ! equal {(strlen '{=$:StartTime}')} 5 || ! equal {(substr '{=$:StartTime}' 2 1)} ':' ]:)
{=$:StartYear}-{=$:StartMonth}-{=$:StartDay}, {=$:StartTime}: [[({=$Group}/){=$Name}|{=$Title}]] [[<<]]
(:if2end:)
[[#eventlistshortcheckend]]
(:ifend:)

Please recheck the following event announcements for formatting errors: