1<?php 2 3/** 4 * ToDo Action Plugin: Inserts button for ToDo plugin into toolbar 5 * 6 * Original Example: http://www.dokuwiki.org/devel:action_plugins 7 * @author Babbage <babbage@digitalbrink.com> 8 * @date 20130405 Leo Eibler <dokuwiki@sprossenwanne.at> \n 9 * replace old sack() method with new jQuery method and use post instead of get \n 10 * @date 20130408 Leo Eibler <dokuwiki@sprossenwanne.at> \n 11 * remove getInfo() call because it's done by plugin.info.txt (since dokuwiki 2009-12-25 �Lemming�) 12 */ 13 14if (!defined('DOKU_INC')) die(); 15if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); 16require_once (DOKU_PLUGIN . 'action.php'); 17 18class action_plugin_todo extends DokuWiki_Action_Plugin { 19 20 /** 21 * Return some info 22 */ 23 /* 24 function getInfo() { 25 // replaced by plugin.info.txt file 26 }*/ 27 28 /** 29 * Register the eventhandlers 30 */ 31 function register(&$controller) { 32 $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ()); 33 } 34 35 /** 36 * Inserts the toolbar button 37 */ 38 function insert_button(&$event, $param) { 39 $event->data[] = array( 40 'type' => 'format', 41 'title' => $this->getLang('qb_todobutton'), 42 'icon' => '../../plugins/todo/todo.png', 43 'key' => 't', 44 'open' => '<todo>', 45 'close' => '</todo>', 46 'block' => false, 47 ); 48 } 49 50} 51