1<?php 2require_once(DOKU_PLUGIN.'action.php'); 3 4class action_plugin_minimap extends Dokuwiki_Action_Plugin { 5 6 /** 7 * Register its handlers with the dokuwiki's event controller 8 */ 9 function register(Doku_Event_Handler $controller) { 10 $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'handle_toolbar', array()); 11 } 12 13 function handle_toolbar(& $event, $param) { 14 15 $minimapShortcutKey = $this->getConf('WebCodeShortCutKey'); 16 17 $event->data[] = array( 18 'type' => 'insert', 19 'title' => $this->getLang('MiniMapButtonTitle').' ('.$this->getLang('AccessKey').': '.$minimapShortcutKey.')', 20 'icon' => '../../plugins/minimap/images/minimap.png', 21 'insert' => '<minimap suppress="">\n', 22 'key' => $minimapShortcutKey, 23 'block' => true 24 ); 25 } 26} 27