[Mediawiki-l] Re: formatting wikitext inside extensions

Jan Steinman Jan at Bytesmiths.com
Fri Nov 11 03:01:12 UTC 2005


> From: Frazer Irving <frazer at bulletproof.net.au>
>
> I'm playing around with writing my own extension, and I would like it
> to accept wikitext as input and return HTML (as well as some other
> stuff). For example
>
> <extendy>
> [[Click me and die]]
> </extendy>

Your best bet is to look at other examples.

(all below is PHP)
0) Pick a file for your extension, and include it in LocalSettings.php
1) First you must register a function name with the extension tag
2) write that function
3) wiki text comes into the function
4) whatever you return from the function should be valid HTML,  
because it will be spit out on the client browser.

:::: Society for Rampant Chaos endorses Bush! <http://rampantchaos.org>
:::: Jan Steinman <http://www.Bytesmiths.com/Item/99-0590-21>





More information about the MediaWiki-l mailing list