Extension:EasyTimeline/installation

This section deals with issues on how to activate EasyTimeline in other MediaWiki installations.

EasyTimeline is part of the MediaWiki software. However you need to do a few things in order to activate it.

Note: when you run MediaWiki on another platform than Linux, the following may not apply or be incomplete.

Download Ploticus
EasyTimeline uses open source program Ploticus, which is not included in the MediaWiki installation. Download the proper version for your OS here.

If you can't put the Ploticus executable pl in /usr/local/bin, or any of the other suggested locations, just make sure it's executable and put the appropriate location in LocalSettings.php.

Download PHP/PERL scripts
EasyTimeline.pl is the actual plug-in, written in perl.

Timeline.php is the MediaWiki php wrapper that invokes the perl script with proper arguments, and feeds generated image and image map (if applicable) to the html output.

Follow these links to get the latest revision of both files : php file:, perl file:

Do not use the EasyTimeline.pl script, or its compiled version, from the authors support page. These are meant for offline usage (= outside WikiMedia).

Settings
Some rename the php file from Timeline.php to EasyTimeline.php to match the perl file name. In any case make sure to refer to it correctly in the LocalSettings.php file:

include("extensions/EasyTimeline.php"); $wgTimelineSettings->ploticusCommand = "/usr/local/bin/pl"; $wgTimelineSettings->perlCommand = "/usr/local/bin/perl";
 * 1) Add support for EasyTimeline extension

Obviously, the path specified is just an example, you may need to set these parameters differently.

Script location
EasyTimeline.pl needs to be installed in WIKIDIR/extensions/timeline/EasyTimeline.pl (or make a symlink, of course)

Image directory
Create a directory for timeline images:

mkdir WIKIDIR/images/timeline chmod 777 WIKIDIR/images/timeline

Charts not clickable
For some reason several reports have been received that EasyTimeline charts are not clickable on other MediaWiki installations.

The generated html will look like this:  

The empty  tag signals that the php wrapper [Easy]Timeline.php was not able to find a .map file that EasyTimelne should have generated. You might check if the temp dir passed by the php wrapper actually does exist and has proper access rights. In order to find out which path the wrapper uses you might this temporary debug code: echo $fname.".map" ;

Until this is explained completely, see also below at Hacks for a suggested workaround.

Image map workaround
Suggested by Twhite: "This mostly worked for me under 1.4beta6, but the imagemaps weren't working. I traced this down to the fact that EasyTimeline.pl was spitting out the imagemaps on stdout, while (Easy)Timeline.php expected them in a file called $fname.map. I patched up my EasyTimeline.php as follows to stuff the expected lines into the expected file:"

[twhite@home]$ diff EasyTimeline.php Timeline-1.7.php 48,58d47 <                else { <                   $lines = split("\n", $ret); <                   $handle = fopen($fname.".map", "w"); <                   for($i=0;$i < count($lines);$i++) { <                      // check if string is area part <                      if(strpos($lines[$i], "area shape") == 1) { <                         fwrite($handle, $lines[$i] . "\n"); <                      } <                    } <                    fclose($handle); <                }

Text flow
Hack for Timeline.php, suggested by Jan Steinman: "I've found the following hack to be useful. It allows one to have text flow around a timeline without having to build a table, and is much easier to maintain than a table."

$wgParser->setHook( 'timelinel', 'renderTimelineLeft' ); $wgParser->setHook( 'timeliner', 'renderTimelineRight' ); } function renderTimelineLeft($timelinesrc) { return renderTimeline($timelinesrc, 'style="float:left"'); } function renderTimelineRight($timelinesrc) { return renderTimeline($timelinesrc, 'style="float:right"'); } function renderTimeline( $timelinesrc, $style='' ) ... $txt = "{$map} ". "";