Re: Get Mediawiki to read template variables withinextension tags?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Get Mediawiki to read template variables withinextension tags?

Chris Earle (CBL)
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_extension_tags
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


"Jan Steinman" <[hidden email]> wrote in
message news:[hidden email]...
> > From: Billy Covington
<[hidden email]>

> >
> > I am attempting to create a template in which all anyone needs to do
> > to put a Google Map on a page is use a template with 3 variables
> > (longitude, latitude, and description) using Evan Miller's Google Maps
> > extension (http://meta.wikimedia.org/wiki/User:Emiller/
> > GoogleMapsExtension).
> >
> > The only problem is, Mediawiki won't read the variables if they're
> > inside the <googlemap></googlemap> extension tags.
>
> You will have to modify the extension to feed the included text
> through the wiki parser.
>
> > I am definitely no expert or even novice at php...
>
> This would seem to be beyond your scope, then. It sounds like an
> interesting project, but I have no extra time to help you right now!
> Perhaps someone else with an interest will want to craft a solution.
>
>
> :::: We may no longer have a free press, but it is reasonably priced.
> -- John Cory
> :::: Jan Steinman <http://www.Bytesmiths.com>



_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Get Mediawiki to read template variableswithinextension tags?

Chris Earle (CBL)
Seeing some stuff here
http://meta.wikimedia.org/wiki/MediaWiki_extensions_FAQ#How_do_I_render_wikitext_in_my_extension.3F

About accessing the parser

Trying this, not working though.....not sure if it's a PHP5 thing

function myHook($input, $argv, &$parser)
 {
     $localParser = new Parser();
     $output = $localParser->parse("<big>$input</big>", $parser->mTitle,
$parser->mOptions);
     $text = $output->getText();
 }

Tried returning that $text in my extension....no go
Not sure if the reference there to the &$parser is valid

Any takers?

--
Chris

"Chris Earle" <[hidden email]> wrote in
message news:e98391$fqe$[hidden email]...
> 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_extension_tags

> 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
>
>
> "Jan Steinman" <[hidden email]> wrote in
> message
news:[hidden email]...

> > > From: Billy Covington
> <[hidden email]>
> > >
> > > I am attempting to create a template in which all anyone needs to do
> > > to put a Google Map on a page is use a template with 3 variables
> > > (longitude, latitude, and description) using Evan Miller's Google Maps
> > > extension (http://meta.wikimedia.org/wiki/User:Emiller/
> > > GoogleMapsExtension).
> > >
> > > The only problem is, Mediawiki won't read the variables if they're
> > > inside the <googlemap></googlemap> extension tags.
> >
> > You will have to modify the extension to feed the included text
> > through the wiki parser.
> >
> > > I am definitely no expert or even novice at php...
> >
> > This would seem to be beyond your scope, then. It sounds like an
> > interesting project, but I have no extra time to help you right now!
> > Perhaps someone else with an interest will want to craft a solution.
> >
> >
> > :::: We may no longer have a free press, but it is reasonably priced.
> > -- John Cory
> > :::: Jan Steinman <http://www.Bytesmiths.com>



_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l