[Mediawiki-l] extensions and wiki markup

Muzaffer Ozakca mozakca at indiana.edu
Fri Jan 21 17:32:59 UTC 2005


The solution below was offered by a hacker on this list a couple months ago.


function renderer( $input ) {
        global $wgParser;

...

	  // pass $input to wiki parser
        $output = $wgParser->internalParse($input, true);

...

        return $output;
}

I'm aware that it works for images. It probably works for other kinds of
links, too. This might fail to work for some other things, though.

Using this occasion, I'd like to thank to the person who came up with this
solution in the first place, Jean-Christian Imbeault. Saved me a lot of
effort.


> -----Original Message-----
> From: mediawiki-l-bounces at Wikimedia.org [mailto:mediawiki-l-
> bounces at Wikimedia.org] On Behalf Of Christof Damian
> Sent: Friday, January 21, 2005 10:41 AM
> To: MediaWiki announcements and site admin list
> Subject: [Mediawiki-l] extensions and wiki markup
> 
> Hello,
> I wrote a tiny calendar extension for mediawiki to use it on my techno
> wiki website. It works allright, but I would like to improve it.
> 
> I used the example from
> http://meta.wikimedia.org/wiki/Write_your_own_MediaWiki_extension ,
> which states "This function can then return a HTML string that gets
> inserted into the output in place of the tags and text. Note that the
> return string should be HTML, not wiki markup."
> 
> Is there any to implement extensions which can use wiki markup?
> Currently I have to implement Links with class Title and Article,
> basically reimplementing the [[link]] syntax and that doesn't even
> work nice with all skins.
> 
> I also might want to use templates and images in the calendar output.
> 
> Or is there an easy way to parse a string and get an html in return.
> 
> Christof
> --
> Christof Damian
> christof at damian.net
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
> 





More information about the MediaWiki-l mailing list