1<?php 2/** 3 * JAlbum Action Plugin: Register JAlbum to the toolbar 4 * 5 * @author Jürgen A.Lamers <jaloma.ac@googlemail.com> 6 */ 7 8if(!defined('DOKU_INC')) die(); 9if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 10require_once(DOKU_PLUGIN.'action.php'); 11 12class action_plugin_bahnde extends DokuWiki_Action_Plugin { 13 14 /** 15 * return some info 16 */ 17 function getInfo(){ 18 return array( 19 'author' => 'Jürgen A.Lamers', 20 'email' => 'jaloma.ac@googlemail.com', 21 'date' => '2009-01-14', 22 'name' => 'BahnDe (toolbar action plugin component)', 23 'desc' => 'BahnDe toolbar action functions.', 24 'url' => 'http://www.dokuwiki.org/plugin:bahnde', 25 ); 26 } 27 28 function register(&$controller) { 29 $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ()); 30 } 31 32/** 33 * Inserts a toolbar button 34 */ 35function insert_button(& $event, $param) { 36 $event->data[] = array ( 37 'type' => 'format', 38 'title' => $this->getLang('bahnde'), 39 'icon' => '../../plugins/bahnde/bahnde.png', 40 'open' =>'<bahnde '. 41 'start_station=\'\' '. 42 'end_station=\'\' '. 43 'start_date=\'\' '. 44 'start_time=\'\' '. 45 'allow_toggle_station=\'false\' '. 46 'departure=\'off\' '. 47 '/>', 48 'close' => '', 49 ); 50} 51} // class