Extension:Wikidiff2
|
wikidiff2 Release status: unknown |
|
|---|---|
| Description | Faster diff plugin for MediaWiki under PHP 5 |
| Author(s) | Tim Starling |
| MediaWiki | 1.6 |
| License | GPL |
| Download | svn (browse), bundle README log |
|
Check usage (experimental) |
|
Wikidiff2 is PHP 5 module providing external diff engine for MediaWiki. It is partly based on the original wikidiff, partly on DifferenceEngine.php. It performs word-level (space-delimited) diffs on general text, and character-level diffs on text composed of characters from the Japanese and Thai alphabets and the unified han. Japanese, Chinese and Thai do not use spaces to separate words. The input is assumed to be UTF-8 encoded. Invalid UTF-8 sequences will be passed through with no error issued, but it is recommended that the user converts the input text to UTF-8 rather than relying on this property. The input text should have unix-style line endings.
The output is an HTML fragment -- a number of HTML table rows with the rest of the document structure omitted. The characters "<", ">" and "&" will be HTML-escaped in the output.
[edit] Installing
[edit] UNIX
Get from svn,
$ svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/wikidiff2
Or download tarball from, http://tools.wikimedia.de/~daniel/repository/extensions/wikidiff2.tgz,
$ tar zxf wikidiff2.tgz $ cd wikidiff2
$ make $ make install
Add the following line to your LocalSettings.php file:
$wgExternalDiffEngine = 'wikidiff2';
Make sure that your php option
enable_dl = On
or
extension = php_wikidiff2.so
is set. This is usually set in the file /etc/php5/apache2/php.ini
[edit] Debian GNU/Linux or its derivative
Get from svn,
$ svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/wikidiff2
Or download tarball from, http://tools.wikimedia.de/~daniel/repository/extensions/wikidiff2.tgz,
$ tar zxf wikidiff2.tgz $ cd wikidiff2
Be sure that the package, "fakeroot", "debhelper", "php5-dev", "swig", and "build-essential" are installed on your Debian system. ("pkg-config" and "libthai-dev" may be needed too)
$ cd wikidiff2 $ fakeroot dpkg-buildpackage -b $ cd .. $ sudo dpkg -i php5-wikidiff2_*.deb
Add the following line to your LocalSettings.php file:
$wgExternalDiffEngine = 'wikidiff2';
Make sure that your php option
enable_dl = On
or
extension = php_wikidiff2.so
is set. (note php could not find the extension at first and I needed to link the wikidiff2.so to php_wikidiff2.so. This corrected it.) This can be set in the file /etc/php5/apache2/php.ini or /etc/php5/conf.d/wikidiff2.ini (any name you like),
|
|
This extension is being used on one or more of Wikimedia's wikis. This means that the extension is stable and works well enough to be used by such high traffic websites. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page. |
