Extensions FAQ

For those of you writing your own MediaWiki extension...

How do I disable caching for pages using my extension?
For MediaWiki 1.4 include the following code in your extension: global $wgTitle; $ts = mktime; $now = gmdate("YmdHis", $ts + 120); $ns = $wgTitle->getNamespace; $ti = wfStrencode($wgTitle->getDBkey); $sql = "UPDATE cur SET cur_touched='$now' WHERE cur_namespace=$ns AND cur_title='$ti'"; wfQuery($sql, DB_WRITE, 'wfForceRefresh');

For MediaWiki 1.3 include the following code in your extension: global $wgOut; $wgOut->enableClientCache(false);

How do I render wikitext in my extension?
You should be able to use the parser to do this. answer me in detail

How can I avoid modification of my extension's HTML output?
This will probably require moving some code around in the parser. The current extension code assumes extensions will produce inline material and they are inserted before the final block-level rendering stages.

How can I pass XML-style parameters in my extension tag?
todo: there's a patch for this in bugzilla; find and test it