function wfXMLclassSetup() { global $xmlObj; global $xmlOldHook; global $xslOldHook; $GLOBALS['xmlObj'] = XMLclass::singleton(); // Phase 1 flow global $wgParser; $xmlOldHook = $wgParser->setHook("xml", array(&$xmlObj, 'xml')); $xslOldHook = $wgParser->setHook("xsl", array(&$xmlObj, 'xsl')); $wgParser->setFunctionHook('xsl', array(&$xmlObj, 'mg_xsl')); // v1.2b // Keep old hooks in case we need them (i.e. GeSHi integration) $xmlObj->setXmlOldHook($xmlOldHook); $xmlObj->setXslOldHook($xslOldHook); // Phase 2 flow global $wgHooks; // From ArticleEx class $wgHooks['ArticleViewEx'][] = array($xmlObj, 'hArticleViewEx'); }