Hi List,
I develop extensions for MediaWiki at work. We are using IIS, PHP 5, current MySQL, and MediaWiki version 1.8 (I believe). I have an extension that is supposed to replace <accNumTag>SomeInfo</AccNumTag> with a wiki table. It does this correctly, however, it seems to be running through the extension on pages that do not contain the invoking tag (accNumTag). This is severely slowing down the load of the edit page.
I've added some print statements to figure out what is going on and it seems that $input is getting a value even on pages that do not contain <accNumTag>. I think if I understood how extensions are called better I might be able to puzzle this out? Does anyone have any suggestions or pointers to a good "how the parser hook works" page?
As far as I can see the code looks normal?
function wfAccChecker() { global $wgParser; $wgParser->setHook( "AccNumTag", "accChecker" ); }
function accChecker ($input, $argv) { if (isset($input)&& !empty($input)) { . . . . } }
Thank you! Courtney Christensen