Hi All
Looking for some advice. Trying to do version noticingand archived notices on a Open Source software docs wiki.
Trying to keep it light and simple but I wonder if OutputPageBeforeHTML is the better choice. I forked the Page Notice extension, just don't know if I should consider another type like some of the Parser hooks. Here is what I have so far.
$wgHooks['OutputPageBeforeHTML'][] = 'wfVersionNoticeHook';
function wfVersionNoticeHook( &$out, &$text ) { $ns = $out->getTitle()->getNamespace();
$opt = array( 'parseinline', );
$nsheader = wfMsgExt("version-notice-ns-$ns", $opt);
if (!wfEmptyMsg("version-notice-ns-$ns", $nsheader)) $text = "<div>$nsheader</div>\n$text";
return true; }
This one work pretty well, as all I am adding is a notice to the top and the Mediawiki namespace page is being somewhat parsed. I can call a template in the page or add wiki links.
Thanks Tom
------------------------------------------------------------------------
mediawiki-l@lists.wikimedia.org