OK thanks !
Everything works very well now !
2006/5/20, Rob Church <robchur(a)gmail.com >:
On 20/05/06, iubito <iubito(a)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 ?
1. Your parser hook will be given a parser object to use. Use that as
$parser with this function definition:
function renderMedia( $input, $args, &$parser )
2. 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(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l