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:
lib/plugins/eventline/
See the plugin in action here: Glocal Focal Wiki.
An example using some of the updates from 03/2013 such as a hotzone, colored icons, and html can be seen here Road to the Big Game. The hotzone is in August where the timeframe goes from month to weeks to allow more events.
This plugin requires the following minimum syntax.
<eventline>&file=filename&</eventline>
Save the page and clear the cache. The page should now display an empty timeline with a “Go to filename data” link. The link shows by default to all. You can set $conf['showlink']=0
in the conf/default.php
if you only want to show that link when the user can edit the data file.
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.) When done using the example the example folder can be removed from the plugin folder.
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.
Update: The update on June 01 2013 added the ability to create a timeline in french. To do this add the following keyword to the page that contains the timeline data. You would need the Keywords plugin to do that.
{{keywords>eventline_fr}}
In addition when using french you must use double quotes when specifying event parameters and use single quotes when quoting anything in the description. Here is an example of an event listed in french
<event start="April 1 2011" end="May 30 2011" latestStart="April 15 2011" earliestEnd="May 15 2011" durationEvent="true" title=" Les protestations s'intensifient "> Les protestations s'intensifient et des sanctions sont imposées. L'ambassadeur a réitéré 'Nous devons tous travailler pour rétablir la paix'. </event>
Basic syntax:
<eventline>&file=filename&</eventline>
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 their 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 | 0,1 | Display filter/highlight selectors (1) | 1 |
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% |
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 |
hotzone | on, off | Creates a hotzone | off |
hzStart, hzStart2, hzStart3 | date (mmm dd yyyy) | hotzone start date | none |
hzEnd, hzEnd2, hzEnd3 | date (mmm dd yyyy) | hotzone end date | none |
hzMagnify, hzMagnify2, hzMagnify3 | integer | amount the hotzone will be stretched out | none |
hzUnit, hzUnit2, hzUnit3 | MILLISECOND, SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, YEAR, DECADE, CENTURY, MILLENNIUM, EPOCH, ERA | the time interval that is stretched out | none |
All parameters must be preceded and succeeded with an ampersand symbol (&). The format of a parameter is <eventline>¶meter=value&</eventline>. 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>
A hotzone can be specified. A hotzone is a place in the timeline that would focus in to a smaller time interval for that zone. This allows you to avoid crowding the timeline for an interval in which a lot of events would occur. You need to specify the start and end date of the hotzone, the time unit to use in the hotzone and the magnification size. For example a magnification of 2 would double the interval size. You can specify up to three hotzones by adding the parameters with a 2 or 3 at the end for the others. You do not need to specify hotzones that you are not using they will default to null.
The following html feature does not work on dokuwiki versions after Adora Belle.
The plugin allows limited use of html in your timeline data page. The user can specify the event description using dokuwiki syntax or some html. Currently not all dokuwiki syntax will work. It has been tested for the following dokuwiki syntax
Colored bubble pings were added in the 3/2013 update. These can now be referred to in the data file using the icon parameter. An example would be icon='dark-green-circle.png'. See simile documentation at Simile Event Attributes
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.
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.
<!– comment –>
does not work in the xml-dokuwiki page.Celano, 2013-08-08
There is a bug when dokuwiki “typography” setting is set to 1 or 2 : XML syntax is broken.
Another problem with XML syntax : xml comments in events file are transformed and break the render because of spaces added inside xml comment tag.
result example : <! – Faire les liens vers le Blog – > <event…
Added an issue : https://github.com/TomCafferty/dokuwiki-plugin-eventline/issues/11
— Cyrille37 2014/02/19 12:12