and this makes troubles in CSS and JavaScript. DisableMarkup('wikilink'); // trick that works well given by PM :) } // --------------------- // --- TBS Plug-In -- // --------------------- // Name of the class is a keyword used for Plug-In authentication. So i'ts better to save it into a constant. define('TBS_PMWIKI','clsTbsPmWiki'); // Put the name of the class into global variable array $_TBS_AutoInstallPlugIns to have it automatically installed for any new TBS instance. $GLOBALS['_TBS_AutoInstallPlugIns'][] = TBS_PMWIKI; class clsTbsPmWiki { function OnInstall() { $this->Version = '1.00'; return array('BeforeLoadTemplate','OnSpecialVar','AfterShow'); } function BeforeLoadTemplate(&$File,&$HtmlCharSet) { // Prepare data to found the template in the given path if any. if ( ($this->TBS->_LastFile=='') and (isset($GLOBALS['TbsScriptToCall']['path'])) ) { $this->TBS->_LastFile = $GLOBALS['TbsScriptToCall']['path'].'nofile.txt'; } } function OnSpecialVar($Name,&$IsSupported,&$Value,&$PrmLst) { if ($Name=='pmwiki_page') { $IsSupported = true; $Value = basename($_SERVER['PHP_SELF']); $q = trim(''.$_SERVER['QUERY_STRING']); if ($q!=='') $Value .= '?'.$q; } } function AfterShow(&$Render) { $Render = TBS_NOTHING; $body = tbs_Html_GetPart($this->TBS->Source,'body'); if ($body===false) { // It is not a full HTML content $html = $this->TBS->Source; } else { // It is a full HTML content $p = false; if ($p===false) $p = strpos($this->TBS->Source,'TBS->Source,''); if ($p===false) $p = strpos($this->TBS->Source,'TBS->Source,''); if ($p===false) { $html = $body; } else { $x = substr($this->TBS->Source,0,$p); $html = ''; $html .= "\r\n".tbs_Html_GetPart($x,'script',true); // Add possible Javascripts snipets of the Html page $html .= "\r\n".tbs_Html_GetPart($x,'style',true); // Add possible local Styles of the Html page $html .= "\r\n".$body; } } $html = ''.$html.'
'; // Add tags 
 in order to avoid the same provided in pmWiki.
		$GLOBALS['_TbsContentForPmWiki'] = $html;
	}

}

?>