Open main menu

lensowiki β

Changes

Help:EasyTimeline activation

5,382 bytes added, 17:29, 17 July 2006
m
eep, the last 2 edits were me, forgot to login
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 [http://ploticus.sourceforge.net/doc/welcome.html Ploticus], which is not included in the MediaWiki installation. Download the proper version for your OS [http://ploticus.sourceforge.net/doc/download.html 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]] ("how" explained below).

'''Important''': Ploticus 2.30 has <small>(Oct 29, 2004)</small> a [http://groups.yahoo.com/group/ploticus/message/1244 critical bug]. Upgrade to <strike>2.31</strike> '''2.32'''.

Mind that<small>, at 12:57, 31 August 2005 (UTC),</small>
* the last version of ''ploticus'' is '''2.32''' (Aug 22 & 23, 2005)
* the last version in the ''Ubuntu'' (a.k.a. ''Debian'') GNU/Linux distro is still '''2.20''' (Aug 14, 2004)

==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: [http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/timeline/Timeline.php], perl file: [http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/timeline/EasyTimeline.pl]

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

'''Important''': Newest Ploticus (from 2.31) has changed behaviour. You'll need to patch the php file, see ''Charts not clickable'' below.

==Configure MediaWiki==

===Settings===

For background info see also [[Write_your_own_MediaWiki_extension]]

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:

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

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

==Known problems==

=== Charts not clickable===

Ploticus 2.30 is buggy and does never produce a html map file, so no clickable images.

Ploticus 2.31 has fixed this but has changed behaviour: map file is now written to stdout instead of file :(

So you need to apply the patch described below or download Timeline.php 1.7 with patch applied [http://members.chello.nl/epzachte/Wikipedia/EasyTimeline/Timeline.php here].

Patch by [[User:Twhite|Twhite]]

<pre>
[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);
< }
</pre>

'''Note:''' This bug has been resolved in Ploticus 2.32


==Windows only: ''Timeline error: Executable not found. Command line was:'' ==
If you are getting an error something like

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"

try going into your php file (usually at Timeline.php or EasyTimeline.php) and changing
$ret = `{$cmdline}`;
into
$ret = `"{$cmdline}"`;

==Windows only: set path to perl==

When your mediawiki installation runs on Windows you will need to update Timeline.php.
Set $wgTimelineSettings->perlCommand to the path to perl.exe. The default is
/usr/bin/perl, this needs to be changed for Windows.

==No texts displayed==
The newest release of EasyTimeline contains a quick fix for unicode support. This requires free font FreeSans.ttf. 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.

[[Category:English documentation]]
[[Category:System admin handbook]]
Anonymous user