Compatible with DokuWiki
Similar to tline
The eventline plugin integrates the MIT Simile Project Timeline with dokuwiki. This provides the ability to add an interactive timeline to a wiki page. Wiki users can edit timeline data for adding events. A timeline event can have a bubble popup with description, an image and an external link.
This is a modification of the tline plugin by Dan Kreiser. I wanted to remove the javascript from the user interface and make changes to the user API.
This plugin requires the following additional components that must be installed separately:
<FilesMatch "\.(xml)$"> Order Allow,Deny Allow from all </FilesMatch>
See the plugin in action here: Glocal Focal Wiki. On that wiki the peace page also contains a timeline.
This plugin requires the following minimum syntax.
<eventline>&file=filename&</eventline>
{{keywords>timeline}}
Save the page and clear the cache. The page should now display an empty timeline with a “Go to filename data” link.
Select the filename link and Create this page. This file will contain the timeline event data in XML format. Everything is contained within a <data> element. The data element is composed of one or more <event> elements. Event elements follow a format of
<event .... event parameters such as dates, title, and optional link and image > A description </event>
A sample data file is provided in /example/exampleDataForCutAndPaste.txt. You can cut and paste the sample data into your newly created filename file. The sample folder also contains images that you can upload for your wiki events using the dokuwiki button to insert images. Insert the images within the starting event brackets (<>) and not in the description section. (Note: That while the dokuwiki format to insert images works, the link in the event parameters must be link='…' and does not use the dokuwiki link format.)
At the end of the file after the </data> end tag add the following plugin code. This will provide an export selection that is used in the next step.
~~TOOLS:both~~
When ready save the file. The file page should display the plugin Tools selection to Export To Timeline in the top and bottom right corners of the page. Select this to export the dokuwiki formatted text file into a text formatted xml file.
Return to your timeline page and upon clearing the cache the timeline should now be populated with the data. The timeline should be able to be scrolled, events selected for display and the filtering/highlighting selectors can be used to focus on any words used in the events.
Basic syntax:
<eventline>&file=filename&</eventline>
{{keywords>timeline}}
Documentation of the syntax used in the data file can be found under Event attributes and data formats at SIMILE Timeline Documentation
The following table shows the parameters that can be added to the <eventline>...</eventline> plugin to allow users to configure thier timeline.
| Parameter | Value | Meaning | Default |
|---|---|---|---|
| bubbleMaxHeight | numeric | Max bubble height in pixels | 300 |
| bubbleWidth | numeric | Bubble width in pixels | 300 |
| height | string | Height of Timeline | 300px |
| mouse | scroll, zoom, default | Scroll - scroll Timeline forward and backward in time. Zoom - change the Timeline timescale. Default - scroll the window. | default |
| center | string | Date to center timeline at initialization | January 1, 2000 00:00:00 |
| controls | on, off | Display filter/highlight selectors | on |
| bandPos | default, reverse | display smaller time bandline position | default (bottom) |
| detailPercent | string | percent of timeline height for large band | 80% |
| overPercent | string | percent of timeline height for small band | 20% |
| detailPixels | numeric | size of detailed band in px | 100 |
| overPixels | numeric | size of overview band in px | 200 |
| detailInterval | MILLISECOND, SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, YEAR, DECADE, CENTURY, MILLENNIUM, EPOCH, ERA | Timeline interval for detail section | DECADE |
| overInterval | MILLISECOND, SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, YEAR, DECADE, CENTURY, MILLENNIUM, EPOCH, ERA | Timeline interval for overview section | CENTURY |
All parameters must be preceded and succeeded with an ampersand symbol (&). The format of a parameter is ¶meter=value&. There are no quotes used and the & would not be repeated when specifying more than one parameter. An example would be
<eventline>&file=wiki&detailInterval=YEAR&overInterval=DECADE&</eventline>
{{keywords>timeline}}
All parameter defaults can be changed by modifying the /eventline/conf/default.php file.
This plugin is indebted to the tline plugin by Dan Kreiser. He provided the foundation for interfacing with the Simile code. The tline plugin contains additional localization capability.