[Mediawiki-l] Using the parser inside an extension
wilson.jim.r at gmail.com
Sat May 19 02:30:56 UTC 2007
I think you're looking for $parser->parse()
An instance of the Parser class (which is usually, but not always the same
as $wgParser) is passed as a parameter to functions that act as extension
tags. Make sure your function expects this argument - third if I remember
It's probably a good idea to have a look at some other Parser Extensions to
get an idea of what I'm getting at:
-- Jim R. Wilson (jimbojw)
On 5/18/07, Ev. Jugend im Kirchenkreis Bleckede - Website <
admin at ej-bleckede.de> wrote:
> in my custom extension there's $output, which holds some text, some wiki
> markup and some HTML. To parse it all with the MediaWiki parser, I have
> using the following code at the end of the render* function:
> return $wgOut->parse($output);
> This does not seem to work on 1.10.0, upgraded from 1.5.8. "return
> works, but is, naturally, not parsed. "return $wgOut->parse('test');"
> results in much the same error as the line above, which leaves me thinking
> that maybe there's a new way to do this.
> By the way, the apparent output of that function is
> "UNIQb9c8c6d6f93b17c-extgallery-00000001-QINU". "extgallery" is the name
> my extension. I understand this output is something related to PHP and
> memory management, but I could be wrong.
> Any ideas?
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
More information about the MediaWiki-l