Repository navigation
Plugin_Events
This plugin lets the user define a list of events and then show them on a dedicated section of the site.
In the /data folder stored inside the plugin folder, there are 3 elements:
-
/next: where the future events files are stored. -
/past: where the past events files are stored. -
permalink.txt: where are defined the events permalinks.
Event File
An event file is named in a fixed way:
20100609_test_next_event.txt
Where the first 8 characters are the event date in this format: AAAAMMDD.
The ninth character is an underscore and then there is a free text.
Event File Data Structure
In the single event data file, the information is stored this way:
<evn:title>test next event</evn:title>
<evn:dl_link>/download/file.pdf</evn:dl_link>
<evn:date>09 June 2010</evn:date>
<evn:location>Dagobah</evn:location>
<evn:desc>Enjoy our planet!</evn:desc>
Where the fields are:
-
title: the event title. -
dl_link: an optional file download for this event (the path is relative to the site base url). -
date: the event date (must be the same as written in the file name). -
location: the event location. -
desc: the event complete description. HTML can also be used.
Permalink File
Simply add to this file a line for each event, like the one showed below, that works for the example given before:
::test_next::20100609_test_next_event.txt
The first part is the permalink, the second the event data file.
So, if the plugin has been activated on the http://yoursite.com/events path, the event permalink is http://yoursite.com/events/test_next.
The available template files are:
-
event_banner.php: used when showing the next event info on any page, using the autoloaded version of the plugin. -
event_for_list.php: used to show any event on the list page. -
event_single.php: used on the single event page.