'Heiko Barth', 'date' => '2016-06-02', 'name' => 'Toolbar Code Button', 'desc' => 'Inserts a code button into the toolbar', 'url' => 'http://www.heiko-barth.de/download.php?id=dw_codebutton', ); } /** * Register the eventhandlers */ function register(Doku_Event_Handler &$controller) { $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ()); } /** * Inserts the toolbar button */ function insert_button(&$event, $param) { $event->data[] = array ( 'type' => 'picker', 'title' => 'Code select', 'icon' => '../../plugins/xssnipper/images/code.png', 'list' => array( array( 'type' => 'format', 'title' => 'xssnip', 'icon' => '../../plugins/xssnipper/images/code_xssnip.png', 'open' => '{(xssnipper>', 'close' => ')}', ), array( 'type' => 'format', 'title' => 'code', 'icon' => '../../plugins/xssnipper/images/code_code.png', 'open' => '\n', 'close' => '\n', ), array( 'type' => 'format', 'title' => 'php', 'icon' => '../../plugins/xssnipper/images/code_php.png', 'open' => '\n', 'close' => '\n', ), array( 'type' => 'format', 'title' => 'html', 'icon' => '../../plugins/xssnipper/images/code_html.png', 'open' => '\n', 'close' => '\n', ), array( 'type' => 'format', 'title' => 'js', 'icon' => '../../plugins/xssnipper/images/code_js.png', 'open' => '\n', 'close' => '\n', ), array( 'type' => 'format', 'title' => 'code', 'icon' => '../../plugins/xssnipper/images/code_css.png', 'open' => '\n', 'close' => '\n', ), array( 'type' => 'format', 'title' => 'txt', 'icon' => '../../plugins/xssnipper/images/code_txt.png', 'open' => '\n', 'close' => '\n', ), array( 'type' => 'format', 'title' => 'xml', 'icon' => '../../plugins/xssnipper/images/code_xml.png', 'open' => '\n', 'close' => '\n', ), array( 'type' => 'format', 'title' => 'file', 'icon' => '../../plugins/xssnipper/images/code_file.png', 'open' => '\n', 'close' => '\n', ) ) ); } }