*/ if (!defined('DOKU_INC')) die(); if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); require_once (DOKU_PLUGIN . 'action.php'); class action_plugin_actionexample extends DokuWiki_Action_Plugin { /** * Return some info */ function getInfo() { return array ( 'author' => 'Some name', 'email' => 'foo@bar.org', 'date' => '2007-04-05', 'name' => 'Toolbar Action Plugin', 'desc' => 'Inserts a button into the toolbar', 'url' => 'http://www.example.com/plugin/toolbar', ); } /** * 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) { global $lang; global $conf; include_once (dirname(__FILE__) . '/lang/en/lang.php'); @ include_once (dirname(__FILE__) . '/lang/' . $conf['lang'] . '/lang.php'); $event->data[] = array ( 'type' => 'format', 'title' => $lang['qb_abutton'], 'icon' => '../../plugins/actionexample/abutton.png', 'open' => '', 'close' => '', ); } }