18fce80b1SAndreas Gohr<?php 28fce80b1SAndreas Gohr/** 38fce80b1SAndreas Gohr * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 48fce80b1SAndreas Gohr */ 58fce80b1SAndreas Gohr 68fce80b1SAndreas Gohr// must be run within Dokuwiki 78fce80b1SAndreas Gohrif (!defined('DOKU_INC')) die(); 88fce80b1SAndreas Gohr 98fce80b1SAndreas Gohrclass helper_plugin_qc extends DokuWiki_Plugin { 108fce80b1SAndreas Gohr 118fce80b1SAndreas Gohr function getInfo() { 128fce80b1SAndreas Gohr return confToHash(dirname(__FILE__).'/info.txt'); 138fce80b1SAndreas Gohr } 148fce80b1SAndreas Gohr 158fce80b1SAndreas Gohr function tpl(){ 168fce80b1SAndreas Gohr global $ACT,$INFO,$ID; 178fce80b1SAndreas Gohr if($ACT != 'show' || !$INFO['exists']) return; 188fce80b1SAndreas Gohr 19*9068e431SAndreas Gohr echo '<div id="plugin__qc__wrapper">'; 20*9068e431SAndreas Gohr echo '<img src="'.DOKU_BASE.'lib/plugins/qc/icon.php?id='.$ID.'" width="600" height="20" alt="" id="plugin__qc__icon" />'; 218fce80b1SAndreas Gohr echo '<div id="plugin__qc__out" style="display:none"></div>'; 22*9068e431SAndreas Gohr echo '</div>'; 238fce80b1SAndreas Gohr } 248fce80b1SAndreas Gohr 258fce80b1SAndreas Gohr 268fce80b1SAndreas Gohr 278fce80b1SAndreas Gohr function getQCData($theid){ 288fce80b1SAndreas Gohr global $ID; 298fce80b1SAndreas Gohr $oldid = $ID; 308fce80b1SAndreas Gohr $ID = $theid; 318fce80b1SAndreas Gohr require_once(DOKU_INC.'inc/parserutils.php'); 328fce80b1SAndreas Gohr $data = unserialize(p_cached_output(wikiFN($ID), 'qc')); 338fce80b1SAndreas Gohr $ID = $oldid; 348fce80b1SAndreas Gohr return $data; 358fce80b1SAndreas Gohr } 368fce80b1SAndreas Gohr 378fce80b1SAndreas Gohr} 388fce80b1SAndreas Gohr// vim:ts=4:sw=4:et:enc=utf-8: 39