1<?php 2/** 3 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 4 * @author Stephan Dekker <stephan@sparklingsoftware.com.au> 5 */ 6 7if(!defined('DOKU_INC')) die(); 8if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 9require_once DOKU_PLUGIN.'action.php'; 10 11class action_plugin_rigrr_javascript extends DokuWiki_Action_Plugin { 12 13 function register(&$controller) { 14 $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, '_hook_header'); 15 } 16 17 function rigrr_javascript() 18 { 19 $rigrr_script = DOKU_URL.'lib/plugins/rigrr/lib/rigrr/rigrr.nocache.js'; 20 $script = '<script src="'.$rigrr_script.'" ></script>'; 21 $svg_pan_script = DOKU_URL.'lib/plugins/rigrr/lib/svg-pan-zoom/svg-pan-zoom.js'; 22 $script .= '<script src="'.$svg_pan_script.'" ></script>'; 23 24 return $script; 25 } 26 27 function _hook_header(&$event, $param) { 28 $scripts = $this->rigrr_javascript(); 29 ptln($scripts); 30 } 31 32} 33