register_hook('PARSER_WIKITEXT_PREPROCESS', 'BEFORE', $this, 'handle_parser_wikitext_preprocess'); } function handle_parser_wikitext_preprocess(&$event, $param) { global $ID; // The next line enables txt2tags markup ONLY on pages which have the .t2t extension. // If you want it for the whole website, just delete or comment out the line below: if(substr($ID,-4) != '.t2t') return true; // The next line will only be useful when the previous line is commented and txt2tags syntax // is enabled for the whole website: it will allow you to disable txt2tags on pages // which have the .dok extension, so the dokuwiki syntax will be used instead. if(substr($ID,-4) == '.dok') { return true; } else { $event->data = "\n".$event->data."\n"; } } }