'dmit10', 'email' => 'dmit10@mail.ru', 'date' => '29/03/2006', 'name' => 'Signature Plugin', 'desc' => 'Add the possibility to put down a signature', 'url' => '???', ); } function getType(){ return 'substition'; } function getSort(){ return 250; } function connectTo($mode) { $this->Lexer->addSpecialPattern("{{user>[a-zA-Z0-9]+}}",$mode,'plugin_signature'); } function handle($match, $state, $pos, &$handler){ // {{user>username}} // ^^^^^^^^ // 01234567 $match = substr($match,7,-2); //Maybe it is useful to add here current date return array($match); } function render($mode, &$renderer, $data) { $renderer->doc.="— "; //this string depends on the HTML that is not good =) $renderer->strong_open(); $renderer->emphasis_open(); $renderer->internallink("p:{$data[0]}"); $renderer->emphasis_close(); $renderer->strong_close(); return true; } }