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