hmmm.... the docs for $parser->parse seem to imply that this function should *not* be called recursively; that's what recursiveTagParse is presumably for. still, i can see this working in many cases. what i would be curious about, however, is what happens if this inner-call to parse encounters another parserFunction that in turn calls parse??
-----Original Message----- From: Alex Powell [mailto:alexp@exscien.com] Sent: Wednesday, April 09, 2008 1:43 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] parser function problem in 1.12.0
Sounds like what I found a few posts back. To get mine working properly, I had to go back to:
$content = $parser->parse($value,$wgTitle,ParserOptions::newFromUser($wgUser),false ,false)->getText();
... in my function. May work for a quick fix!
Kind regards,
Alex
On Wed, Apr 9, 2008 at 12:14 AM, Frankel, Bob bios-bob@ti.com wrote:
some more information from some experimentation on my end....
i tried calling $parser->recursiveTagParse($body) inside of myParserFunction_Render, and it *does* work -- but only for some specific cases. my understanding is that recursiveTagParse() is really intended for use inside of *tag* extensions, not parserFunction extensions.
in general, the text passed to my parser function from the perspective of the author can contain: wikitext, calls to parser functions, and use of extension tags.
as i mentioned in the original email, things seemed to just "work" in 1.11 and now they do *NOT* work in 1.12.
any insight into the recent parser change in 1.12 would be helpful here... thanks in advance
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Frankel, Bob Sent: Sunday, April 06, 2008 7:31 PM To: mediawiki-l@lists.wikimedia.org Subject: [Mediawiki-l] parser function problem in 1.12.0
i have written a number of custom parser-functions that return text which itself contains one of my custom tag-extensions... for example,
function myParserFunction_Render( &$parser, $body = '' ) { return "...<myTag>...</myTag>..."; }
using 1.12.0, i now see <myTag>...</myTag> in the generated page; before (with 1.11.0) i saw the results of processing <myTag> in a separate extension.
i realize the parser has undergone some major changes in 1.12.0.... in the past, it seemed, i was able to "pass" information from parser-functions to tag-extensions through this technique. the
latter
appeared to handled "after" the parser-functions, and were a place where i could lay down things like <img> and <a> tags....
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
-- Alex Powell
Exscien Training Ltd Tel: +44 (0) 1865 920024 Direct: +44 (0) 1865 920032 Mob: +44 (0) 7717 765210
skype: alexp700 mailto:alexp@exscien.com http://www.exscien.com
Registered in England and Wales 05927635, Unit 10 Wheatley Business Centre, Old London Road, Wheatley, OX33 1XW, England