1<?php 2/** 3 * DokuWiki Plugin imagemap (Action Component) 4 * 5 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html 6 * @author Alexander Weggerle <AlexanderWeggerle.de> 7 */ 8 9// must be run within Dokuwiki 10if (!defined('DOKU_INC')) die(); 11 12if (!defined('DOKU_LF')) define('DOKU_LF', "\n"); 13if (!defined('DOKU_TAB')) define('DOKU_TAB', "\t"); 14if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 15 16require_once DOKU_PLUGIN.'action.php'; 17 18class action_plugin_imagemapping extends DokuWiki_Action_Plugin { 19 20 public function register(Doku_Event_Handler $controller) { 21 22 $controller->register_hook('DOKUWIKI_STARTED', 'BEFORE', $this, 'handle_start'); 23 // $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'handle_toolbar_define'); 24 25 } 26 27 public function handle_start(Doku_Event &$event, $param) { 28 global $JSINFO; 29 30 $JSINFO['plugin_imagemap_mldummy'] = ml(':wiki:dokuwiki-128.png','', true); 31 } 32 33 public function handle_toolbar_define(Doku_Event &$event, $param) { 34 35 $event->data[] = array ( 36 'type' => 'imagemap', 37 'title' => 'imagemapping', 38 'icon' => '../../plugins/imagemapping/map.png', 39 'list' => array(), 40 ); 41 } 42 43} 44 45// vim:ts=4:sw=4:et: 46