Hi all, I think I can help you out I hacked mediawiki parser.php (version 1.6.3) three monthes ago in order to extend mediawiki extension behaviour for my personnal use.
My tweaks addressed two parsing issues :
- parser limitations regarding template arguments handling within extension - parser not handling correctly some nested extensions cases
My hack is rather ugly, but it is working like a charm. (with the 1.6.3 version)
You can browse the code here : http://meta.wikimedia.org/wiki/User:Guilrom/ParserRGVersion http://meta.wikimedia.org/wiki/User:Guilrom/ParserRGVersion
Let me know if this is helpful !
Bests, Romain GUILLOT http://meta.wikimedia.org/wiki/User:Guilrom http://meta.wikimedia.org/wiki/User:Guilrom < http://meta.wikimedia.org/wiki/User:Guilrom/ParserRGVersion http://meta.wikimedia.org/wiki/User:Guilrom/ParserRGVersion%3E
----
Message: 2 Date: Fri, 14 Jul 2006 08:38:24 -0400 From: "Chris Earle" cearle@cbltech.ca Subject: Re: [Mediawiki-l] Get Mediawiki to read template variables withinextension tags? To: mediawiki-l@wikimedia.org Message-ID: e98391$fqe$1@sea.gmane.org
Hi all,
i'm going to keep hunting around for a fix for this problem -- i have not
checked recent changelog entries to see if it is being >addressed, but in the meantime, can someone point me in the direction of a fix? or something about sending stuff to the >parser?
I read this part of the extensions FAQ
http://meta.wikimedia.org/wiki/MediaWiki_extensions_FAQ#Templates_with_exte nsion_tags http://meta.wikimedia.org/wiki/MediaWiki_extensions_FAQ#Templates_with_exten sion_tags < http://meta.wikimedia.org/wiki/MediaWiki_extensions_FAQ http://meta.wikimedia.org/wiki/MediaWiki_extensions_FAQ%3E
but there's no solution offered up.....
Stumbled upon this when I whipped together a little extension for myself
only to find out it wouldn't work with the template >I'm using it in
Thanks for any suggestions,
--
Chris
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
moin,
On Saturday 15 July 2006 22:03, Romain GUILLOT wrote:
Hi all, I think I can help you out I hacked mediawiki parser.php (version 1.6.3) three monthes ago in order to extend mediawiki extension behaviour for my personnal use.
My tweaks addressed two parsing issues :
- parser limitations regarding template arguments handling within
extension - parser not handling correctly some nested extensions cases
My hack is rather ugly, but it is working like a charm. (with the 1.6.3 version)
Example:
<ext1 extparam={{{1}}} checktplargs=3> extvar1 = {{{1}}} extvar2 = {{{2}}} </ext1>
THANK YOU! Thats a godsend, I need exactly this for my slides-extension, so that in addion on having a different navbar on each page, you can also have two or more of them on a page, with different outputs like so:
{{my_pres}} <-- default navbar -->
....
<-- results in "page 1/7": --> page {{my_pres|out=page_nr}}/{{my_pres|out=pages}}
The template "my_pres" looks like this (wrapping an extension tag in another template):
{{navbar|txt=<slides output={{{out|navbar}}}> ... </slides>}}
I even started to hack at the parser to allow the {{{out}}} param, but I got lost in the many layers of indirection, callbacks and functions :)
Will try soon on my own wiki how that works out,
best wishes,
Tels
- -- Signed on Sat Jul 15 22:42:16 2006 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email.
"Let's say there are a thousand. But there are 284 million people in this country. You can't have public policy that is aimed at 100,000 people when the other multi-multi-millions are also involved. You can't do it that way." - Jack Valenty in http://tinyurl.com/2y65n
mediawiki-l@lists.wikimedia.org