Lexer->addSpecialPattern('~~stoggle_buttons~~',$mode,'plugin_sectiontoggle'); $this->Lexer->addSpecialPattern('~~stoggle_openDIV~~',$mode,'plugin_sectiontoggle'); $this->Lexer->addSpecialPattern('~~stoggle_closeDIV~~',$mode,'plugin_sectiontoggle'); } function handle($match, $state, $pos, Doku_Handler $handler){ $match = substr($match,10,-2); switch ($state) { case DOKU_LEXER_SPECIAL : return array($state, $match); } return array($state,""); } function render($mode, Doku_Renderer $renderer, $data) { if($mode == 'xhtml'){ $renderer->nocache(); list($state,$match) = $data; switch ($state) { case DOKU_LEXER_SPECIAL : if($match == 'buttons') { $open = $this->getLang('open_all'); $close = $this->getLang('close_all'); $renderer->doc .= '

  

'; // ptype = 'block' } elseif($match == 'openDIV') { $renderer->doc .= "\n
\n"; } elseif($match == 'closeDIV') { $renderer->doc .= "\n
\n"; } return true; } } return false; } } ?>