It's better when it's simple

User Tools

Site Tools


iCalEvents Plugin

Compatible with DokuWiki

Frusterick Manners, Elenor of Tsort, Detritus

plugin Displays a calendar in iCalendar format according to a template

Last updated on

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to davcal, ical, icalendar

Tagged with calendar


This plugin is unmaintained, and it's not recommended to use it or rely on it. At some point in time (which may be in the past), it will stop working or be insecure. See for details.


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.

This plugin is almost a complete rewrite, integrating the features of the unmaintained fork icalendar.


The current release requires at least PHP 5.5.5 or newer.

Running older PHP versions is a security risk anyway. Even PHP 5.5 and has already reached end of life and does not receive security patches anymore since July 2016.


Example with template "table_without_summary" Example with default template


To use the plugin, put the following line into any page of your wiki:

You can also add parameters:

  • {{iCalEvents>https://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>https://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}}


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 or off Whether events should be sorted chronologically ascending or descending. If set to off, sorting is disabled and the events are displayed in the order in which they appear in the input file. This is good for performance if the events are already sorted. asc
dformat, tformat string Custom date / time format to display events (as accepted by strftime). (global default in plugin 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.


Caching of the wiki page will be disabled if one of the following conditions holds:

  • One of the from or to parameters is a relative to the current time, e.g., +30 days. Note that 30 days is the default value for to.
  • The rendered calendar is a local media file. This is necessary for security. It prevents users not having read access to the media file from seeing a cached rendered calendar which was rendered in a security context of a user with read access to the media file.

If you need caching for performance reasons, make sure to use a fixed time range and an external URL, which can of course point to a media file your DokuWiki installation.

Disable Caching

Even if none of the above conditions is true, it can make sense to disable caching, e.g., if a calendar at an external URL is updated often. In this case add ~~NOCACHE~~ to the page.

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 2017-06-16:
    • Don't fail if there are no events to display
    • Fail gracefully if the from/to string is invalid
  • Version 2017-05-07:
    • Fix sorting
    • Use fruux/sabre-vobject as a backend (requires PHP >= 5.5.5)
  • Version 2017-04-26:
    • Restore compatibility with PHP 5.5
  • Version 2017-04-16:
    • Use fruux/sabre-vobject as a backend (requires PHP >= 5.5)
    • Fix recurring events
    • Fix icon path
    • Improve compatibility with non-default renderers, e.g., ODT export
    • Fix HTTP header for export of events
  • 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-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 glen
    • 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 glen
    • 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: 2022-03-05 13:06 by

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki