. if (!defined('EG')) die('Direct access not allowed!'); $decodeCounter = 0; $decodeAnotherTime = false; //decode the text of the wiki function decodeWikiText($string) { global $decodeAnotherTime; global $decodeCounter; $decodeCounter++; $decodeAnotherTime = false; $string = preg_replace('/(\[hr\])/', '
${2}',$string); $string = preg_replace('/(\[p\])(.*?)(\[\/p\])/s', '
${2}
',$string); $string = preg_replace_callback('/(\[)(h)(1|2|3)(\])(.*?)(\[\/)(h)(1|2|3)(\])/s', 'createHeadGeneric',$string); $string = preg_replace_callback('/(\[tab )(lang=)([^\s]+)(\s*\])(.*?)(\[\/tab\])/s', 'createTabs',$string); $string = preg_replace_callback('/(__TOC__)/s', 'createToc',$string); $string = preg_replace('/(\[lang\])(.*?)(\[\/lang\])/s', '