DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:eventline

EventLine Plugin

Compatible with DokuWiki

2010-11-07, Adora Belle, Weatherwax, Binky, Ponder Stibbons

plugin Integrates the MIT Simile Timeline with DokuWiki

Last updated on
2013-04-18
Provides
Syntax, Action
Repository
Source
Requires
tools

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 tline

Tagged with diagram, media, time, timeline

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.

External requirements

This plugin requires the following additional components that must be installed separately:

Installation

  1. Install the required plugin of Tools (if not already installed).
  2. Install the eventline plugin using the Plugin Manager and the download URL above. If you install this plugin manually, make sure it is installed in lib/plugins/eventline/

Examples/Usage

See the plugin in action here: Glocal Focal Wiki. FIXME

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. FIXME 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>
  • The filename can be any valid filename without the file extension. The file would not exist when creating the timeline. This file will be populated by the user with data for timeline events.

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> 

Syntax

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

Configuration and Settings

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>&parameter=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

  • new lines,
  • links,
  • bold and italics,
  • and sup and sub html tags

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.

Acknowledgements

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.

Development

Change Log

Known Bugs and Issues

  1. When using a dash (or minus sign, -) this can cause an odd special character in the xml file if the wrong dash/minus sign is used. This will cause the timeline not to processs and show blank. Not sure what the bad symbol is but by retyping a dash it can clear the error.
  2. Wikihtml feature does not work on dokuwiki versions after Adora Belle.

ToDo/Wish List

  • more timelines in 1 page would be kind ;) – Celano, 2013-08-08

FAQ

Discussion

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.
  • I tried several times before I understood tools-plugin does not work in your playground. So you have to make it elsewhere, and it works very well!
  • comments like <!– comment –> does not work in the xml-dokuwiki page.

Celano, 2013-08-08

Xml syntax

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

Cyrille37Cyrille37

2014/02/19 12:12

plugin/eventline.txt · Last modified: 2015-03-19 06:28 by 37.200.79.25