Hi all, sorry if this is the wrong list for this type of question.
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>
Would return an HTML link to the Click_me_and_die page on my wiki.
At the present I am messing around with the docs at
http://wikipedia.sourceforge.net/doc/MediaWiki/Parser/Parser.html
and trying to do something like
$output = $parser->transformMsg($input, new ParserOptions())
which is not working, but there could be a illion reasons for that. I understand too little about php and mediawiki for me to be confident that I am on the right track.
Basically I have three questions:
1. Is what I'm trying to do supported? 2. Am I looking in completely the wrong place for info of this kind? 3. What is the best source of documentation for simple usages of the internal API from within extensions.
Naturally I will welcome and comments or suggestions. FYI: I am a competent Perl hacker but PHP is a bit new for me.
Cheers
Frazer
On 10/11/05, Frazer Irving frazer@bulletproof.net.au wrote:
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).
See http://meta.wikimedia.org/wiki/MediaWiki_extensions_FAQ#How_do_I_render_wiki...
- What is the best source of documentation for simple usages of the
internal API from within extensions.
Reading through the source until you figure out what works, I'm afraid; there isn't an API as such, just a load of code that works for "normal" purposes and may or may not be easy to use for others...
-- Rowan Collins BSc [IMSoP]
mediawiki-l@lists.wikimedia.org