1<?php 2/** 3 * DokuWiki Plugin sapnotelink (Action Component) 4 * 5 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html 6 * @author Florian Lamml <info@florian-lamml.de> 7 */ 8 9if (!defined('DOKU_INC')) die(); 10class action_plugin_sapnotelink extends DokuWiki_Action_Plugin { 11 /** 12 * Register the eventhandlers 13 */ 14 function register(Doku_Event_Handler $controller) { 15 if($this->getConf('sapnotelink_toolbar_icon')) $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ()); 16 } 17 18 /** 19 * Insert Toolbar 20 */ 21 function insert_button(Doku_Event $event, $param) { 22 $event->data[] = array ( 23 'type' => 'format', 24 'title' => $this->getLang('toolbar_icon'), 25 'icon' => '../../plugins/sapnotelink/images/sap.gif', 26 'sample' => '123456', 27 'open' => 'sap#', 28 'close' => '', 29 'block' => false 30 ); 31 } 32}