1<?php 2/** 3 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 4 */ 5 6// must be run within Dokuwiki 7if (!defined('DOKU_INC')) die(); 8require_once(DOKU_INC.'inc/plugin.php'); 9 10class helper_plugin_qc extends DokuWiki_Plugin { 11 12 function getInfo() { 13 return confToHash(dirname(__FILE__).'/info.txt'); 14 } 15 16 function tpl(){ 17 global $ACT,$INFO,$ID; 18 if($ACT != 'show' || !$INFO['exists']) return; 19 20 echo '<div id="plugin__qc__wrapper">'; 21 echo '<img src="'.DOKU_BASE.'lib/plugins/qc/icon.php?id='.$ID.'" width="600" height="20" alt="" id="plugin__qc__icon" />'; 22 echo '<div id="plugin__qc__out" style="display:none"></div>'; 23 echo '</div>'; 24 } 25 26 27 28 function getQCData($theid){ 29 global $ID; 30 $oldid = $ID; 31 $ID = $theid; 32 require_once(DOKU_INC.'inc/parserutils.php'); 33 $data = unserialize(p_cached_output(wikiFN($ID), 'qc')); 34 $ID = $oldid; 35 return $data; 36 } 37 38} 39// vim:ts=4:sw=4:et:enc=utf-8: 40