first commit. dokuwiki.
[h2N7SspZmY.git] / lib / plugins / todo / action.php
blobdf86f5c749563a4df6d081913a7c69a10dbdf9e6
1 <?php
3 /**
4 * ToDo Action Plugin: Inserts button for ToDo plugin into toolbar
6 * Original Example: http://www.dokuwiki.org/devel:action_plugins
7 * @author Babbage <babbage@digitalbrink.com>
8 */
10 if (!defined('DOKU_INC')) die();
11 if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/');
12 require_once (DOKU_PLUGIN . 'action.php');
14 class action_plugin_todo extends DokuWiki_Action_Plugin {
16 /**
17 * Return some info
19 function getInfo() {
20 return array (
21 'author' => 'Babbage',
22 'email' => 'babbage@digitalbrink.com',
23 'date' => '2010-02-27',
24 'name' => 'ToDo Action Plugin',
25 'desc' => 'Inserts a ToDo button into the editor toolbar',
26 'url' => 'http://www.dokuwiki.org/plugin:todo',
31 /**
32 * Register the eventhandlers
34 function register(&$controller) {
35 $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ());
38 /**
39 * Inserts the toolbar button
41 function insert_button(&$event, $param) {
42 $event->data[] = array(
43 'type' => 'format',
44 'title' => $this->getLang('qb_todobutton'),
45 'icon' => '../../plugins/todo/todo.png',
46 'key' => 't',
47 'open' => '<todo>',
48 'close' => '</todo>',