1<?php 2/** 3 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 4 * @author dan.kreiser <dan.kreiser@gmail.com> 5 */ 6 7// must be run within Dokuwiki 8if(!defined('DOKU_INC')) die(); 9 10if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 11require_once(DOKU_PLUGIN.'action.php'); 12 13class action_plugin_symbols extends DokuWiki_Action_Plugin { 14 15 /** 16 * return some info 17 * 18 * @author dan.kreiser <dan.kreiser@gmail.com> 19 */ 20 function getInfo(){ 21 return array_merge(confToHash(dirname(__FILE__).'/README'), array('name' => 'Toolbar Component')); 22 } 23 24 /** 25 * register the eventhandlers 26 * 27 * @author dan.kreiser <dan.kreiser@gmail.com> 28 */ 29 function register(&$controller){ 30 $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'handle_toolbar', array ()); 31 32 } 33 34 35 function handle_toolbar(&$event, $param) { 36 $event->data[] =array ( 37 'type' => 'picker', 38 'title' => $this->getLang('symbols'), 39 'icon' => '../../plugins/symbols/images/toolbar/buttons/symbole.png', 40 'list' => array( 41 array( 42 'type' => 'insert', 43 'title' => 'Warnung', 44 'icon' => '../../plugins/symbols/images/toolbar/symbols/i_alert_icon.png', 45 'insert' => 'i_alert_icon', 46 ), 47 array( 48 'type' => 'insert', 49 'title' => 'English', 50 'icon' => '../../plugins/symbols/images/toolbar/symbols/i_english_icon.png', 51 'insert' => 'i_english_icon', 52 ), 53 array( 54 'type' => 'insert', 55 'title' => 'Deutsch', 56 'icon' => '../../plugins/symbols/images/toolbar/symbols/i_german_icon.png', 57 'insert' => 'i_german_icon', 58 ), 59 array( 60 'type' => 'insert', 61 'title' => 'YES', 62 'icon' => '../../plugins/symbols/images/toolbar/symbols/i_yes_icon.png', 63 'insert' => 'i_yes_icon', 64 ), 65 array( 66 'type' => 'insert', 67 'title' => 'NO', 68 'icon' => '../../plugins/symbols/images/toolbar/symbols/i_no_icon.png', 69 'insert' => 'i_no_icon', 70 ), 71 array( 72 'type' => 'insert', 73 'title' => 'STAR', 74 'icon' => '../../plugins/symbols/images/toolbar/symbols/i_star_icon.png', 75 'insert' => 'i_star_icon', 76 ), 77 array( 78 'type' => 'insert', 79 'title' => 'TIP', 80 'icon' => '../../plugins/symbols/images/toolbar/symbols/i_tip_icon.png', 81 'insert' => 'i_tip_icon', 82 ), 83 array( 84 'type' => 'insert', 85 'title' => 'TODO', 86 'icon' => '../../plugins/symbols/images/toolbar/symbols/i_todo_icon.png', 87 'insert' => 'i_todo_icon', 88 ), 89 array( 90 'type' => 'insert', 91 'title' => 'INFO', 92 'icon' => '../../plugins/symbols/images/toolbar/symbols/i_info_icon.png', 93 'insert' => 'i_info_icon', 94 ), 95 array( 96 'type' => 'insert', 97 'title' => 'IMPORTANT', 98 'icon' => '../../plugins/symbols/images/toolbar/symbols/i_important_icon.png', 99 'insert' => 'i_important_icon', 100 ), 101 array( 102 'type' => 'insert', 103 'title' => 'HOME', 104 'icon' => '../../plugins/symbols/images/toolbar/symbols/i_home_icon.png', 105 'insert' => 'i_home_icon', 106 ), 107 array( 108 'type' => 'insert', 109 'title' => 'MAIL', 110 'icon' => '../../plugins/symbols/images/toolbar/symbols/i_mail_icon.png', 111 'insert' => 'i_mail_icon', 112 ), 113 array( 114 'type' => 'insert', 115 'title' => 'PHONE', 116 'icon' => '../../plugins/symbols/images/toolbar/symbols/i_phone_icon.png', 117 'insert' => 'i_phone_icon', 118 ), 119 array( 120 'type' => 'insert', 121 'title' => 'FAX', 122 'icon' => '../../plugins/symbols/images/toolbar/symbols/i_fax_icon.png', 123 'insert' => 'i_fax_icon', 124 ), 125 array( 126 'type' => 'insert', 127 'title' => 'Apple', 128 'icon' => '../../plugins/symbols/images/toolbar/symbols/i_apple_icon.png', 129 'insert' => 'i_apple_icon', 130 ), 131 array( 132 'type' => 'insert', 133 'title' => 'Windows', 134 'icon' => '../../plugins/symbols/images/toolbar/symbols/i_windows_icon.png', 135 'insert' => 'i_windows_icon', 136 ), 137 array( 138 'type' => 'insert', 139 'title' => 'Linux', 140 'icon' => '../../plugins/symbols/images/toolbar/symbols/i_linux_icon.png', 141 'insert' => 'i_linux_icon', 142 ), 143 array( 144 'type' => 'insert', 145 'title' => 'OPENSOURCE', 146 'icon' => '../../plugins/symbols/images/toolbar/symbols/i_opensource_icon.png', 147 'insert' => 'i_opensource_icon', 148 ) 149 150 ) 151 ); 152 } 153 154} 155 156