Extension talk:EasyTimeline/installation

A couple more items are needed on this page:

1. Need to download/install EasyTimeline.pl

2. Need to download/install EasyTimeline.php. Problem: where to get this file?

--Chris 19:19, 13 Jan 2005 (UTC)

Ditto. Where do I get EasyTimeline.php? And where do I put the Ploticus files for Linux, now that I've got them?

Nick

Answering my own questions:

You can get EasyTimeline.php from CVS in the extensions module, 'cept it's actually called Timeline.php. I picked up a version at []. I renamed mine EasyTimeline.php but I'm just compulsive that way. :) Make sure you make the appropriate changes to LocalSettings.php, no matter what you call it.

If you can't put the Ploticus script, 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.

Works like a charm.

--Roadnick 20:27, 24 Jan 2005 (UTC)

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

Hope this hack is helpful.

--Twhite Fri Feb 11 15:20:38 PST 2005


 * See article for further details and pre-patched file. Erik Zachte 22:29, Mar 24, 2005 (UTC)

possible to replace the word "pre-patched" it was confusing for me especially when "Timeline.php (version 1.7)" was mentioned since as far as I could tell, we should only be using Ploticus 2.31. I inserted patch into and somehow it didnt work for me. 65.219.4.2 01:22, 6 Apr 2005 (UTC)
 * It is easy to patch the file in the wrong place. I made that mistake and others too. That is why I added a link to a version of Timeline.php 1.7 with the patch already applied. Did you try it? I rephrased the sentence slightly, not sure if that helps. Erik Zachte 09:12, Apr 6, 2005 (UTC)

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} ". "";

Update, also by Jan: "It is probably best to wait for 1.5, when I've been assured the enhancement request I put in for extension parameters will be part of MediaWiki, so you could do: for example. In fact, that bug is marked as "complete," so it is probably already in CVS HEAD."