On 20/05/06, iubito <iubito(a)gmail.com> wrote:
Hi, I've made a little parser extension for my
needs.
I want this extension add automatically the page where it's called to a
category, say Category:Foobar.
In my function, I wrote :
return $wgOut->parse('blabla[[Category:Foobar]]');
but my page isn't added to category Foobar. "blabla" is working very well.
What is wrong with my code ?
You're using the wrong parser. The parser that $wgOut uses discards
the parser output, which is where things like link table updates come
from.
Something like:
$parser->parse( "...", $parser->mTitle, $parser->mOptions, false,
false);
where $parser is the parser object passed to the hook; should work.
Rob Church