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_itrackviewer 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' => 'ITrackViewer (toolbar action plugin component)', 23 'desc' => 'ITrackViewer toolbar action functions.', 24 'url' => 'http://www.dokuwiki.org/plugin:itrackviewer', 25 ); 26 } 27 28 function register(&$controller) { 29 $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ()); 30 } 31 32 33/** 34 * Inserts a toolbar button 35 */ 36function insert_button(& $event, $param) { 37 $event->data[] = array ( 38 'type' => 'format', 39 'title' => $this->getLang('itrackviewer'), 40 'icon' => '../../plugins/itrackviewer/toolbar/kml_file.png', 41 'open' =>'<itrackviewer kml="off" mapkey="" kmlsubtitle="off" type="p" gpx="off" '. 42 'bikemap="off" '. 43 'wandermap="off" '. 44 'runmap="off" '. 45 'inlinemap="off" '. 46 'mopedmap="off" '. 47 'qrcode="off" '. 48 'gpsies="off" '. 49 'picasa="off" '. 50 'width="400" height="400" zoom="13" alt="off">', 51 'close' => '</itrackviewer>', 52 ); 53} 54} // class