Jump to content

Extension talk:WikiHiero/Archive 01

From mediawiki.org

Jan 2008

The following was written by an anonymous user in January 2008:NSK Nikolaos S. Karastathis 04:42, 27 October 2008 (UTC)


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
# Add to localsettings, near the end:
require_once("extensions/wikihiero/wikihiero.php");

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);
}


Request for image rendering

I have noticed image rendering is on your ToDo list. The Extension:Collection uses a non-php parser. Currently the hiero-tag is not supported (Issue #395). It could be easily supported in PDFs and printed books if the hiero-extension could emit rendered images for a given hiero-code. Therefore we'd really appreciate if image rendering could get some higher priority. he!ko 11:43, 20 January 2009 (UTC)