forked from lisps/textrotate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.php
37 lines (33 loc) · 915 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
33
34
35
36
37
<?php
/**
* DokuWiki Plugin textrotate (Action Component)
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author lisps
*/
if (!defined('DOKU_INC')) die();
class action_plugin_textrotate extends DokuWiki_Action_Plugin {
/**
* Register the eventhandlers
*/
function register(Doku_Event_Handler $controller) {
$controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ());
if(!function_exists('ImageCreate')) {
msg('plugin textrotate: install image php-gd package', -1, '', '', MSG_ADMINS_ONLY);
}
}
/**
* Inserts the toolbar button
*/
function insert_button(Doku_Event $event, $param) {
$event->data[] = array(
'type' => 'format',
'title' => 'Vertikaler Text generieren',
'icon' => '../../plugins/textrotate/textrotate.png',
'sample'=> 'Vertikaler Text',
'open' => '!!',
'close' =>'!!',
'insert'=>'',
);
}
}