'Victor Boctor', 'email' => 'vboctor at users . sourceforge . net', 'date' => '2006-05-18', 'name' => 'Mantis Issues Plugin', 'desc' => 'Support References to Mantis Issues', 'url' => 'http://www.futureware.biz', ); } /** * What kind of syntax are we? */ function getType(){ return 'substition'; # typo is intentional } /** * What about paragraphs? */ function getPType(){ return 'normal'; } /** * Where to sort in? */ function getSort(){ return 156; } /** * Connect pattern to lexer */ function connectTo($mode) { $this->Lexer->addSpecialPattern('~~Mantis:[0-9]+~~', $mode, 'plugin_mantis'); } /** * Handle the match */ function handle($match, $state, $pos, &$handler){ $match = substr( $match, 9, -2 ); // strip "~~Mantis:" from start and "~~" from end return array( strtolower( $match ) ); } /** * Create output */ function render($format, &$renderer, $data) { if ( $format == 'xhtml' ) { $renderer->externallink( MANTIS_URL . 'view.php?id=' . $data[0], $data[0] ); return true; } return false; } }