Table of Contents

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
2017-06-16
Provides
Syntax
Repository
Source

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

WARNING

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 https://github.com/real-or-random/dokuwiki-plugin-icalevents/issues/28#issuecomment-1059750388 for details.

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.

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

Requirements

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.

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>https://host/myCalendar.ics}}

You can also add parameters:

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

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 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)

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:

Caching

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

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.

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

Version History