PL Event List

Summary: Manage event lists using native PmWiki features
Version: 2013-12-28
Maintainer: StefCT
Licence: GPL
Users: (view? / edit)
Discussion: PLEventList-Talk

Questions answered by this recipe

How can I create, manage and display event announcements in PmWiki without installing any additional PHP scripts?


This recipe helps you to create event announcements where each event has its own wiki page. Data is entered into a structured template, similar to a database, but with greater flexibility, thanks to PmWiki's page text variables feature. Page lists and group headers are used to display and format the event information.

With this recipe you can turn almost any PmWiki installation into a basic scheduling and calendar tool. You don't even need access to the server. The only thing you need is permission to create new wiki pages and groups.

This recipe's approach is similiar to PagelistCalendar, which I discovered only after creating this one. However, my recipe might be more suitable for PmWiki beginners because it provides all the tools right out of the box.

You can try the recipe here.

How to Install

  • Download pleventlist.tar.gzΔ and unpack it in your PmWiki directory (adds a new page group named PLCal to your wiki.d folder including five new wiki pages)
  • Alternatively, if you don't have access to your Wiki server, create the pages manually by copying and pasting the following code:

How to get started

  • Open <Path-to-Your-Wiki-Pages>/PLCal.HomePage
  • If you have permission to create new pages within the group PLCal, a form field should appear on top of the page (otherwise please log in first)
  • Type the name of your first event page (e.g. "PLCal.TestMeeting") into the form field and hit "Enter"

  • An edit form containing a template should appear. Enter your data after the colons and click "Save" when you're done
  • Please use leading zeros for month, day and hour
  • Please use 24 hour format for time
  • Please enter (:title :) like this: (:title First Meeting:) (please don't add a colon after "title" and don't remove the brackets either)
  • You can leave (:title :) empty too - in this case the page name will become the title
  • Additional content (text, images, links, maps...) can be added after the (:ifend:) tag - it will become part of the individual event page
  • Troubleshooting: If you're getting an error message instead of an edit form please either configure $ScriptUrl in your local config.php or try replacing (:input form {$ScriptUrl} get:) with something like (:input form pmwiki.php get:) or (:input form index.php get:) in PLCal.HomePage

  • Your event page should now look similar to this:

  • New in version 2013-12-28: If you didn't format StartDay, StartMonth, StartYear or StartTime correctly, you might get a warning (only visible to users who have permission to edit the event page)
  • If this happens please recheck your entries because otherwise event lists might not get properly sorted, future events might be listed as "past events" or other confusing outcomes might occur

How to customize

Some suggestions:

  • Change the appearance of PLCal.HomePage by editing its page list directives (e.g. limit the number of events displayed with the count= argument) and/or the corresponding page list templates at PLCal.PLTemplates
  • Change the appearance of all individual event pages by editing PLCal.GroupHeader (see also: group headers, page text variables)
  • Include event lists into other pages by copying and pasting the page list directives from PLCal.HomePage
  • Create your own templates for recurring types of events and point to your customized template in the input form at the top of PLCal.HomePage (or create additional input forms)
  • Modify or remove warnings about wrongly formatted data by editing PLCal.GroupFooter
  • For including detailed event information into pages that have a (:linebreaks:) directive, use the page list template fmt=#eventlistlonglinebreaks instead of fmt=#eventlistlong

Advanced ideas:

  • For advanced date formatting use ftime markup expression:
    • See markup with demo (using a custom page list template)
    • In PLCal.GroupHeader, set ftime attribute when={$:StartYear}-{$:StartMonth}-{$:StartDay}T{$:StartTime}:00
      • Example: {(ftime when={$:StartYear}-{$:StartMonth}-{$:StartDay}T{$:StartTime}:00)} -> "January 02, 2014, at 07:30 PM"
    • In PLCal.PLTemplates, set ftime attribute when={=$:StartYear}-{=$:StartMonth}-{=$:StartDay}T{=$:StartTime}:00
      • Example: {(ftime fmt="%A %B %d" when={=$:StartYear}-{=$:StartMonth}-{=$:StartDay}T{=$:StartTime}:00)} -> "Thursday January 02"
  • Create notifications for all events of the current day: markup with demo
  • List all events that happen within a certain time frame: markup with demo
  • List all events of a certain month: markup with demo
  • Create notifications for yearly recurring events such as birthdays or anniversaries: markup with demo
  • Create a dropdown menu for template selection: markup with demo
  • Create a list of all events in which StartDay, StartMonth, StartYear or StartTime aren't properly formatted (useful for admins): markup with demo

How to localize

This recipe can be localized by modifying

  • PLCal.GroupHeader, PLCal.PLTemplates and PLCal.HomePage - those pages generate output visible to any user
  • PLCal.Template and PLCal.GroupFooter - targeted mainly at wiki editors

Please keep in mind that the items in the first (:if false:) ... (:ifend:) section of PLCal.Template are page text variables which should not be changed.

Release Notes

  • 2013-12-28:
    • New page PLCal.GroupFooter allows (basic) data validation
    • "Create" button added to input form in PLCal.HomePage
    • Reverse sorting of past events
    • Some bugfixes
  • 2013-12-23: "New event" form is displayed when user has permission to edit the (nonexistent) page PLCal.NewPage (PLCal.HomePage can now be locked without making the form disappear)
  • 2013-12-21: Initial release

See also




See discussion at PLEventList-Talk

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.