*/ class action_plugin_keyboard extends DokuWiki_Action_Plugin { /** * Register the eventhandlers */ function register(Doku_Event_Handler $contr) { $contr->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ()); } /** * Inserts the toolbar button */ function insert_button(&$event, $param) { $event->data[] = array( 'type' => 'format', 'title' => $this->getLang('qb_keyboard'), 'icon' => '../../plugins/keyboard/keyboard.png', 'open' => '', 'close' => '', ); // Code for backwards compatibility if (!method_exists ($event , 'mayRunDefault')) { return $event->_default; } return $event->mayRunDefault(); } }