DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:icalevents

iCalEvents Plugin

Compatible with DokuWiki

  • 2016-06-26 "Elenor Of Tsort" yes
  • 2015-08-10 "Detritus" yes
  • 2014-09-29 "Hrun" unknown
  • 2014-05-05 "Ponder Stibbons" unknown

plugin Displays a calendar in iCalendar format according to a template

Last updated on
2016-09-26
Provides
Syntax
Repository
Source

Similar to davcal, ical, icalendar

Tagged with calendar

Description

Many calendars can export their entries in the iCalendar (RFC 2445) format. This plugin can read such an iCalendar file (typically named *.ics) from an URL or a mediafile and display events according to a template, e.g., as an HTML table.

The current release 2016-08-17 is almost a complete rewrite, integrating the features of the unmaintained fork icalendar. It uses the iCalcreator library.

Screenshots

Example with template "table_without_summary" Example with default template

Usage

To use the plugin, put the following line into any page of your wiki:
{{iCalEvents>http://host/myCalendar.ics}}

You can also add parameters:

  • {{iCalEvents>http://host/myCalendar.ics#from=today&to=+10 days&maxNumberOfEntries=100}} Display all events from today within the next 10 days, but at most 100 events
  • {{iCalEvents>http://host/myCalendar.ics#to=-1 day}} Only display events starting before today

Instead of a URL, it is also possible to specify a local media file:

  • {{iCalEvents>myCalendar.ics#from=today}}

Parameters

Parameter Type Description Default
to datetime Hide events starting after this time. Accepts values accepted by strtotime. Set this to a value far in the future if you would like all events to be displayed, e.g., +10 years. (This parameter cannot be unset. Some values is necessary to limit the displayed occurrences of infinitely recurring events.) +30 days
from datetime If present, hide events starting before this time. Accepts values accepted by strtotime. (none)
maxNumberOfEntries integer Maximal number of events to display. (none)
showAs string Select template to display events. Default templates are table, tableWithoutSummary, list. You can modify these templates and add your own in /conf/dokuwiki.php. table
showEndDates boolean Whether the end date of an event should be displayed if it is the same as the start date. false
sort asc or desc Whether events should be sorted chronologically ascending or descending. asc
dformat, tformat string Custom date / time format to display events (as accepted by strftime). (global default in plugin configuration)

Configuration

The plugin can be configured in the configuration manager. You can specify templates there. In a template, the following magic strings will be recognized and replaced for each event:

  • {summary}: Summary
  • {description}: Description
  • {location}: Location
  • {location_link}: Location text with link to map service. The URL can be configured.
  • {summary_link}: Summary text with download link this single event.

Backwards Compatibility

The following deprecated parameters are supported for backwards compatibility with older versions and compatibility with the deprecated icalendar plugin. Please use the new syntax as above.

  • previewDays: If some integer n is specified, this is equivalent to to=+n days.
  • numberOfEntries: Equivalent to maxNumberOfEntries.
  • showAsList: If set to true, this is equivalent to showAs=list.

Moreover, it is possible to {{iCalendar>… instead of {{iCalEvents>

Version History

  • Version 2016-09-26:
    • Fix timezone handling for events specified in UTC
  • Version 2016-08-18:
    • Introduce dformat and tformat parameters
    • Restore PHP 5.3 compatibility
  • Version 2016-08-17
    • new maintainer real-or-randomreal-or-random

      : re-merged forked plugin icalendar and rewritten almost all parts
    • date-based versioning
    • switch to iCalcreator library
    • use template system from icalendar plugin
    • don't cache if event filter depends on date
    • make map service configurable
    • local media files can be used instead of files fetched via HTTP
    • lots of small fixes and improvements
  • Version 2.0.2: Another unofficial release by glenglen

    • use lowercase plugin name for better compatibility with new dokuwiki
    • NB! after upgrade you need manually to remove old lib/plugins/iCalEvents dir (new version installs into lib/plugins/icalevents)
  • Version 2.0.1: Unofficial release by glenglen

    • bugfix for multiple calendars on page (error state was overwriting first calendar error state)
    • showEndDates, dformat configurable via wiki page as well, not only config
    • from can also accept any strtotime parameter, i.e last thursday
    • showCurrentWeek option to highlight active week in output
  • Version 2.0: Fullfilled customer requests:
    • start and end date can be shown
    • configurable date format
  • Version 1.3: timezone id bugfix, little speed optimization and nasty bugfix for parsing descriptions
  • Version 1.2: updated zip file
  • Version 1.1: DokuWiki Links are rendered within iCal description texts.
  • Version 1.0: Added localization for German and English.
  • Version 0.9: First public release
plugin/icalevents.txt · Last modified: 2016-11-27 21:40 by glen