Wikidiff2

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.

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:

Make sure that your php option or is set. This is usually set in the file /etc/php5/apache2/php.ini

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:

Make sure that your php option or 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),