OK thanks ! Everything works very well now !
2006/5/20, Rob Church <robchur@gmail.com >:
On 20/05/06, iubito iubito@gmail.com wrote:
I changed to $wgParser
function renderMedia($input) { global $wgParser; return $wgParser->parse('...', $wgParser->mTitle, $wgParser->mOptions, false, false); } Note that $parse in Parser.php is marked as @access private, should I
use it
? or should it become public ? my server runs php4 so that's not a
problem
now for me.
Ok the page is added to category, but parse() returns an Object, not a string. In my older version, return $wgOut->parse(...) returned a string of the
HTML
output.
What's wrong ?
- Your parser hook will be given a parser object to use. Use that as
$parser with this function definition:
function renderMedia( $input, $args, &$parser )
- The parse() function returns a ParserOutput object. So do something
like
$output = <parse statement> return $output->getText();
Rob Church _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l