Lexer->addSpecialPattern('~~Mantis:[0-9]+~~',$mode,'plugin_syntaxmantis'); } function handle($match, $state, $pos, Doku_Handler $handler){ $match = substr( $match, 9, -2 ); // strip "~~Mantis:" from start and "~~" from end return array(strtolower( $match )); } function render($mode, Doku_Renderer $renderer, $data) { if($mode == 'xhtml'){ $link['target'] = $conf['target']['wiki']; $link['style'] = ''; $link['pre'] = ''; $link['suf'] = ''; $link['more'] = ''; $link['class'] = 'mantislink'; $link['url'] = $this->getConf('mantis_server') . '/view.php?id=' . $data[0]; $link['name'] = $this->getConf('LinkPrefix') . $data[0]; $link['title'] = $renderer->_xmlEntities($url); //output formatted $renderer->doc .= $renderer->_formatLink($link); } return true; } } ?>