Extension talk:EasyTimeline/installation

'''Activation on a *nix system can be somewhat tricky. See below for a simple solution.'''

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: &lt;timeline float=right&gt; for example. In fact, that bug is marked as "complete," so it is probably already in CVS HEAD."

patches
Would it be possible to provide a link to the patched files on this site? The project site for EasyTimeLine has been down for days.

Unicode support
Could we hope for Unicode support one day? And do you have an idea in which of the modules is the problem? --Nk 14:18, 21 July 2005
 * I recently spent a week on it during my vacation and it works now on Cygwin. I had to make a patch to Ploticus so that it returns font metrics, needed to position text segments properly with a variable pitch font. Now I need to find someone who can build Ploticus for Linux, with freetype libraries and my patch. Then it can be installed in Mediawiki. Erik Zachte 00:52, July 22, 2005 (UTC)
 * Thank you for the reaction. I will ask in bg: if someone with better C-knowledge than me could help. --Nk 06:14, 22 July 2005 (UTC)

I had a pretty difficult "activation"
Only took 3 attempts and a total of probably 9 hours to "activate". Part of the problem in debugging for me was figuring out how to get the Wiki engine to re-engage the reconfigured .php and .pl scripts.

Limitations:
 * Debian GNU/Linux
 * MediaWiki 1.4.4
 * No ploticus pre-built
 * No libpng

Setup Files:
 * Ploticus 2.31 source
 * Patched Timeline.php file (v1.7)
 * Default EasyTimeline.pl file

Different findings:
 * I commented out the $wg variable settings in LocalSettings.php, because I found identical directives within Timeline.php.

Extended instructions:

Ploticus Makefile Changes

 * 1) Commented out lines 126-130 (to disable png)
 * 2) Uncommented line 135 (for pseudo-GIF)
 * 3) Uncommented lines 210-211 (for compressed svg files)
 * 4) Uncommented lines 215-217 (for no X11)
 * 5) Uncommented line 221 (for no PostScript)

Compiled per Ploticus build instructions.

EasyTimeline.pl

 * 1) Changed line 163 to reflect my Wiki's URL and article naming convention (I use "beautified" URLs).
 * 2) Changed line 233 to gif (to force gif usage)
 * 3) Changed line 237 to gif (to force gif usage)

Timeline.php
(line numbers for patched version (1.7))
 * 1) Changed lines 11 and 12 to suit my environment (11: full path to ploticus executable, 12: full path to perl)
 * 2) Changed line 30 to gif (to force gif usage)
 * 3) Changed line 72 to gif (to force gif usage)

The rest of the time was spent figuring out what was going on.

Useful troubleshooting steps:
 * Ran tests provided in pltestsuite of ploticus source package to make sure ploticus was installed and configured correctly.
 * Ran EasyTimeline.pl command from command line based on its dynamic construction in Timeline.php. This was very useful in determining whether my paths were right (e.g. finding out that I didn't need to put the entire path in line 25 (because it was already there - the verbose feedback from EasyTimeline.pl is quite useful).
 * Figured out (duh) that I had to change text in the within the &lt;timeline&gt;&lt;/timeline&gt; directive to retest configuration changes in Timeline.php or EasyTimeline.pl. A good candidate for a safe change if using the sample scripts is to change something in the legend, like adding a letter or number.

Hope this helps. I can write it up a bit more thoroughly if need by. Let me know.

--Peri 12:42, 30 July 2005 (UTC)

Executable not found.
ça marche pas :

Timeline error: Executable not found.

What can I do ? Léonard 09:53, 25 August 2005 (UTC)

I don't know wether you solved your Problem. I got a similar error:

Timeline error: Executable not found. Command line was: 'perl'

In my case the problem resulted from a crappy encoding of my EasyTimeline.pl, because i copied and pasted it. This doesn't work - you'll have to download the actual file in order to keep the formatting. Anyway, if you wanna do some troubleshooting it seems useful to get this file and try running

perl EasyTimeline.pl -i SovietLeaders.txt

...on a GNU/Linux system, that is.

--84.138.170.41 22:58, 1 October 2005 (UTC)

On windows installation I am getting this error:

Timeline error: Executable not found. Command line was: "d:\Perl\bin\perl.exe" "D:\mediawiki\extensions\EasyTimeline\EasyTimeline.pl" -i "D:\mediawiki\images\EasyTimeline\679b623bca84b196eef58d937b1a243e" -m -P "d:\pl233win32\bin\pl.exe" -T "D:\mediawiki/images/tmp" -A "/CustomerCareWiki/index.php?title=$1"

for some reason the

$ret = `{$cmdline}`;

is not executing. I tried adding the `"{$cmdline}"` but that won't work either, Please help!

--12.152.10.63 20:49, 28 June 2007 (UTC)

Charts not clickable
I think the information on the main page may be out of date.

In EasyTimeline.pl (CVS version 1.13, header says 1.11 and 1.9!), find: $map = ($MapPNG && $linkmap) ? "-csmap" : ""; and replace it with: $map = ($MapPNG && $linkmap) ? "-csmap -mapfile ". $file_htmlmap : "";

--ProgMania 19:03, 9 September 2005 (UTC)
 * Clickable Images still not working...
 * --User:kyle (not a member), Oct 15, 2005

Problems installing with FTP (no shell account)
I've tried installing ploticus, Timeline.php, EasyTimeline.pl and making all the recommended changes, to no avail.

This is how things are right now:
 * 1) I have downloaded and made executable pl, which is sitting in the /tools directory, off the root of my hosted space
 * 2) Timeline.php and EasyTimeline.pl are in extensions/timeline
 * 3) I have added the require_once( "extensions/timeline/Timeline.php" ); line to /wiki/LocalSettings.php</tt>
 * 4) I tried adding the following recommended additions to LocalSettings.php, but every time I get an error saying: Fatal error: Cannot redeclare class timelinesettings in /home/www/arseneault.ca/wiki/extensions/timeline/EasyTimeline.php on line 7

Additions to LocalSettings.php Add support for EasyTimeline extension include("extensions/timeline/Timeline.php"); $wgTimelineSettings->ploticusCommand = "../tools/pl"; $wgTimelineSettings->perlCommand = "/usr/local/bin/perl";

So I disable the lines above, but then, my page shows nothing at all, no error msg.

The problem is I don't have shell access, to I can only upload and try different permutations or enabling/disabling things, and without error logs or testing tools, it makes it difficult to troubleshoot.

Can anyone detect a problem in my installation above?

-[mailto:jeanfars@gmail.com jfa]

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)

Linux EasyTimeline installation

 * A major problem arises when trying to install pre-configured binaries...


 * If you can, download the 2.32 Source Code and compile it (cd /directory/of/makefile && make clean && make).

If you do not have the required libraries, get them

If you cannot compile an executable file, check the above discussion for help. I never had luck with the EasyTimeline.pl file.


 * Put the executable file that is produced in the extensions/timeline/ folder (make it).


 * Download or 'Save As' (to preserve formatting) the correct Timeline.php extension script unzip and put it in the extensions/ folder.


 * This is the most recent patched file that works.
 * You do not need to rename the file.

include("extensions/Timeline.php"); $wgTimelineSettings->ploticusCommand = "extensions/timeline/pl"; #Or path to ploticus exec. $wgTimelineSettings->perlCommand = "/usr/local/bin/perl"; #Or path to perl.
 * Add the following to your localsettings.php file:
 * 1) Add support for EasyTimeline extension


 * Edit your Timeline.php file to include the same information as above (located near the top of the file)


 * Make sure your $wgUpload/tmp (or whatever you have chosen) directory is configured so that Timeline can write to it!

data.
 * Edit a wiki page and insert tags. Between the timeline tags, put your info, such as the  SovietLeaders.txt


 * --User:Kyle (not a member) Oct. 15, 2005

Executable not found error in Windows
I'm hitting a roadblock here. When I use the EasyTimeline syntax in the Wiki, I'm getting:

Timeline error: Executable not found. Command line was: "C:/Perl/bin/perl.exe" "C:/Apache2/htdocs/wiki/extensions/timeline/EasyTimeline.pl" -i "C:/Apache2/htdocs/wiki/images/timeline/bebc64ea32049f9fe1f251640849a318" -m -P "C:/pl232win32/bin/pl.exe" -T "C:/Apache2/htdocs/wiki/images/tmp" -A "/wiki/$1"

The strange thing is that when I copy this EXACT line into a standard windows shell (and I create a text file with the timeline script at C:/Apache2/htdocs/wiki/images/timeline/bebc64ea32049f9fe1f251640849a318), it generates the files without a problem.

Is this a permissions problem? Anyone seen something simmilar before?


 * I'm having the same error on my windows installation. Research shows that request for file C:\cygwin\bin\perl C:\web\wiki\extensions\timeline\EasyTimeline.pl -i C:\web\wiki\images\timeline\7fe2fd7769626e5cdb6b6565414b6034 -m -P c:\web\ploticus\bin\pl -T C:\web\wiki\images\tmp -A \index.php\ returns "NAME INVALID"
 * Fixed! Change $ret = `{$cmdline}`; into $ret = `"{$cmdline}"`; for windows to find the "file".

Spiko-carpediem 10:44, 29 December 2005 (UTC)


 * Just for documentation's sake, I did all of the above as I was getting similar messages on my wiki since installing it almost a year ago. Finally after editing the php file and having no luck with that fix, I moved my installation of Ploticus from "C:\Program Files\xampp\Ploticus" to a simpler "C:\Ploticus" and it worked right away.  My perl path remained "C:\Program Files\xampp\perl" but moving Ploticus to a simpler path solved my problem. --Billdorr 03:26, 11 October 2006 (UTC)

No text shows up on otherwise very nice timeline charts.
I've had a very easy installation on Linux - Debian, using Ploticus from apt and following activation instructions. The only problem is that I get blank charts!

The charts appear, and are clickable - everything's fine, but no text shows up, and I'm getting no errors. Has anyone else had this experience?

Cheers

Saul.


 * Yes, this has been reported before. Some months ago someone added a fix, so that unicode was enabled (not in a good way I will provide a better one when I find the opportunity). If easytimeline.pl mentions FreeSans.ttf you have this recent version and maybe do not have that font in a directory where Ploticus looks. You might try to find where that is on your system: see Ploticus docs online, or revert to previous EasyTimeline.pl 1.13 at http://cvs.sourceforge.net/viewcvs.py/wikipedia/extensions/timeline/EasyTimeline.pl. Erik Zachte 23:38, 19 April 2006 (UTC)

EasyTimeline on a private wiki with only FTP access
I got it working, finally !

My host and software:
 * A linux machine somewher
 * Mediawiki version 1.6.6 installed
 * only FTP access to it

Backround:
 * Mediawiki's extensions are 'php' that go to the extnesions directory
 * EasyTimeline extension creats an image-map out of the appropriate code between tags

What you need:
 * (Easy/)Timeline.php - this is the extension that the wiki communicates with and goes to the "extensions" directory. Include by adding a line to the LocalSettings.php file like this: require_once("extensions/EasyTimeline.php");
 * "require_once" can be replaced with "include" (this is true, right? i have the "recuire_once")


 * EasyTimeline.pl - this is to be copied to "extensions/timeline" folder ("timeline" you create yourself)
 * the entire Ploticus software package, which is an archive. From the "bin" folder the "pl" file is actually needed, and this has to be referred to from the LocalSettings.php like this: $wgTimelineSettings->ploticusCommand = "/loacation/of/where/you/have/the/file/pl"; The ending is supposed to be just "pl", but before that is the path/location. For example I have it like this: $wgTimelineSettings->ploticusCommand = "extensions/timeline/pl233linux/bin/pl";

Beside the files, perl has also be referred to from LocalSettings.php like this: $wgTimelineSettings->perlCommand = "/usr/local/bin/perl"; This example location is usually correct (at least for me it is, and i have no idea which linux it's running).

Now theres one more thing which needs to be done: you have to change the article-path variable in the "EasyTimeline.pl" file (yes, the one you copy to "extensions/timeline" folder afterwards). Do to this open it with notepad (or some IDE if you're a programmer) and find the line $articlepath= "http://en.wikipedia.org/wiki/\$1"; (this is on line number 152, at least on mine) and replace it with your own wiki's address.
 * For some reason I haven't dealt with yet (because it has not really been a problem) the article path on my wiki is like this: "http://mywiki.ee/index.php/articlename" - the index.php is there also, so see how it is on your wiki (this appears on your browsers addressbar, when browsing it).

So to sum up:
 * three downloads: the Timeline.php, EasyTimeline.pl and the Ploticus package
 * three added lines to LocalSettings.php
 * 'article path' variable change in EasyTimeline.pl

When editing the files be careful with the syntax. On LocalSettings.php add the lines in the end of the file, but before the php closing tag ('?>'). And on EasyTimeline.pl you just need to modify the article path between the quotes, and leave the '\$1' at the end of the path. I have it like this: $articlepath= "http://mywiki.ee/index.php/\$1"; (And don't mess with any of the brackets, or you'll break it !)

If you had the same sitation (ftp only access and a feeling that getting this great extension to work is impossible), write me at markus here-goes-the-at-sign hot here-the-dot ee.

No errors and no image
I've installed the EasyTimeline extension and Ploticus 2.32 but now I get no image whatsoever. The sourcecode of the generated page does say <map name="4ab20f4bdd3457ae128de765e9da8294"> <img usemap="#4ab20f4bdd3457ae128de765e9da8294" src="/images/timeline/4ab20f4bdd3457ae128de765e9da8294.png"> but the image does not exist. The timeline directory does exist and is 777.

Any ideas?

--GrandiJoos 13:22, 7 August 2006 (UTC)

Same here! I also tried Ploticus 2.33 with the same result. It seems that the Imagefile can't created. Any hints how i can debug this? Where can I get the lastest working files EasyTimeline.php and EasyTimeline.pl?


 * Well, I finally asked my little brother to look at it (he has more *nix knowledge). The problem is nog entirely solved, we get an error now, but the solution to the 'no error no image'-problem was that the perl path was not correct. You migth want to look at that. --GrandiJoos 13:01, 23 September 2006 (UTC)
 * It seems to be a problem with symlinks. perl hast a symlink to perl5 which has a symlink to perl5.8.5. Just puttung /usr/bin/perl5.8.5 solved it here.

No errors, no image, under Win2K Advanced Server w/ CygWin

 * Perl is in c:\Perl\bin
 * pl is in c:\Ploticus\bin
 * Under my bash shell I have a pl.exe that is the SWI-Prolog interpreter. However, an explicit path spec should over-ride that. The Prolog Interpreter isn't available from my Windows Command shell.


 * Running the command c:\Perl\bin\perl easytimeline.pl -i SovietLeaders.txt
 * EasyTimeline version 1.9
 * Copyright (C) 2004 Erik Zachte
 * Email xxx@chello.nl (nospam: xxx=epzachte)


 * This program is free software; you can redistribute it
 * and/or modify it under the terms of the
 * GNU General Public License version 2 as published by
 * the Free Software Foundation


 * OS Windows detected -> create image in gif format.


 * Input: Script file SovietLeaders.txt
 * Output: Image files SovietLeaders.gif & SovietLeaders.svg
 * Ploticus input file = EasyTimeline.txt


 * Generating output:
 * Using ploticus command "pl.exe"
 * Running Ploticus to generate svg file
 * "pl.exe" -svg -o "SovietLeaders.svg" "EasyTimeline.txt" -tightcrop
 * Running Ploticus to generate bitmap
 * "pl.exe" -gif -o "SovietLeaders.gif" "EasyTimeline.txt" -tightcrop -font FreeSans.ttf -mapfile "SovietLeaders.map"
 * Running nconvert to convert gif image to png format


 * 'nconvert.exe' is not recognized as an internal or external command,
 * operable program or batch file.
 * PNG file not created (is nconvert.exe missing?)
 * PNG file not created (is nconvert.exe missing?)
 * PNG file not created (is nconvert.exe missing?)


 * READY
 * No errors found.


 * and does produce the following files:
 * C:\Inetpub\Vweb\wiki-tfw.web.caselle-net\extensions\timeline>ls -alg
 * total 177
 * drwxr-xr-x+ 2 Domain Users     0 Nov 19 14:34.
 * drwxr-xr-x+ 4 Domain Users     0 Nov 19 12:19 ..
 * -rwxr-xr-x 1 Domain Users 146782 Nov 19 14:21 EasyTimeline.pl
 * -rwxr-xr-x 1 Domain Users   5055 Nov 19 14:34 EasyTimeline.txt
 * -rwxr-xr-x 1 Domain Users  11596 Nov 19 14:34 SovietLeaders.gif
 * -rwxr-xr-x 1 Domain Users    489 Nov 19 14:34 SovietLeaders.map
 * -rwxr-xr-x 1 Domain Users   5935 Nov 19 14:34 SovietLeaders.svg
 * -rwxr-xr-x 1 Domain Users    991 Nov 19 14:33 SovietLeaders.txt


 * However, when I run this in MediaWiki 1.8, it produces no files and no errors.

My knowlege of PHP5 is limited.


 * OS: Win2K Advanced Server SP4 with CygWin
 * Wiki: MediaWiki 1.8
 * Webserver: IIS, PHP5, MySQL5, Perl5, Ploticus 2.33


 * Thank you for looking into this --Slamlander 14:23, 19 November 2006 (UTC)

To get over the above issue I had to install NConvert.exe

-- Nikhil 27 June 2007

2007-04-18 Links problems resolved with the latest pl and php on a debian/mediawiki1.8.2 install
Hi,

after some looking around on the error : pl proc page: 12358: warning: environment var GDFONTPATH not found. See ploticus fonts docs.

I followed the advice on the main page (revert to previous version) without much luck.

So here is what I did (quick and dirty) : putenv("GDFONTPATH=/usr/share/fonts/truetype/freefont/");
 * Install the missing fonts on my linux box (apt-get install ttf-freefont)
 * Modify the TimeLine.php file : added this line after the "isdir" checks of the renderTimeline method :

This has worked for me.

EasyTimeline and Mediawiki 1.9.x
hello

I've tried to set up this awsome tool but it doesn't work at all and i have a white page. I'm in the case of a wediawiki hosted somewhere on a linux. Is it working on the 1.9 mediawiki version or not. If yes, i will try again to make it working

What I've done ?

1- download ploticus pl233linux.tar.gz 2 dowload Timeline.php and EasyTimeline.pl 3 - I put the whole "ploticus" archive in extension/timeline folder as well as EasyTimeline.php and EasyTimeline.pl 4 - in LocalSettings, i put the following code: require_once("extensions/timeline/EasyTimeline.php"); $wgTimelineSettings->ploticusCommand = "extensions/timeline/pl233linux/bin/pl"; $wgTimelineSettings->perlCommand = "/usr/local/bin/perl";

I do not understand why it doesn't work..

Please, if someone could help.. Is there anything more i have to download? What am i supposed to do

Thank you and have a good day