Thanks to all who helped me get 'Extension:Calendar (Shane) extended'
working with version 1.9.3, by changing the calls to the Parser. I have
edited the Extension page to add the amended code.
Nigel Gilbert
On 30/4/07 16:53, "Rob Church" <robchur(a)gmail.com> wrote:
On 30/04/07, aretai aretai <aretaiuc(a)gmail.com>
wrote:
$array = explode(' ', $input);
Note you have to create a new object Parser();
Depending on the circumstances, it might be possible to reuse the
existing reference to the parent parser (third argument to the hook
function) to do the parsing, thus ensuring things like links, etc. are
kept in the ParserOutput. You can look at extensions such as Poem and
Cite to see how this might be done.
If that's not the case, then you need to use a *clone* of the existing
parser, assuming you don't want it to forget about existing hook
extensions, etc. and other configuration settings applied to the
$wgParser object.
This can be done with the line:
$localParser = clone $parser;
Rob Church
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
________________________________________________________________
Professor Nigel Gilbert, ScD, FREng, AcSS, Professor of Sociology,
University of Surrey, Guildford GU2 7XH, UK. +44 (0)1483 689173