Extension talk:WikiHiero/LQT Archive 1

The instructions for installing wikihiero seem simple enough.

cd wiki/extensions/ svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/wikihiero nano ../LocalSettings.php require_once("extensions/wikihiero/wikihiero.php");
 * 1) Add to localsettings, near the end:

I followed the instructions checking out "revision 29770" from the Subversion repositiory and added the required line to LocalSettings.php

When I tried previewing the sample tag I kept getting this error.

Warning: Missing argument 2 for WikiHieroLoader, called in /usr/share/mediawiki/includes/Parser.php on line 354 and defined in /usr/share/mediawiki/extensions/wikihiero/wikihiero.php on line 50

Warning: Missing argument 3 for WikiHieroLoader, called in /usr/share/mediawiki/includes/Parser.php on line 354 and defined in /usr/share/mediawiki/extensions/wikihiero/wikihiero.php on line 50

Fatal error: Call to a member function setHook on a non-object in /usr/share/mediawiki/extensions/wikihiero/wikihiero.php on line 52

It appears that someone began work on adding additional tags to the WikiHieroHook function. Changes were made to wikihiero.php and checked into the Subversion repository. These changes do not match the version of WikiHieroHook in wh_main.php for this revision.

As a hack, I modified the WikiHieroLoader function in wikihiero.php. Now wikihiero works.

Original version of WikiHieroLoader in wikihiero.php (revision 29770) checked out from svn (broken):

// MediaWiki entry point function WikiHieroLoader( $text, $attribs, &$parser ) { WikiHieroLoad; $parser->setHook( 'hiero', 'WikiHieroHook' ); return WikiHieroHook( $text, $attribs, $parser ); }

My modified version (working version):

// MediaWiki entry point function WikiHieroLoader( $text ) { WikiHieroLoad; //     $parser->setHook( 'hiero', 'WikiHieroHook' ); //     return WikiHieroHook( $text, $attribs, $parser ); return WikiHieroHook( $text); }