xref: /plugin/qc/helper.php (revision 9068e431e22ec1c250b22a8c26b46a587f9ee184)
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();
8
9class helper_plugin_qc extends DokuWiki_Plugin {
10
11    function getInfo() {
12        return confToHash(dirname(__FILE__).'/info.txt');
13    }
14
15    function tpl(){
16        global $ACT,$INFO,$ID;
17        if($ACT != 'show' || !$INFO['exists']) return;
18
19        echo '<div id="plugin__qc__wrapper">';
20        echo '<img src="'.DOKU_BASE.'lib/plugins/qc/icon.php?id='.$ID.'" width="600" height="20" alt="" id="plugin__qc__icon" />';
21        echo '<div id="plugin__qc__out" style="display:none"></div>';
22        echo '</div>';
23    }
24
25
26
27    function getQCData($theid){
28        global $ID;
29        $oldid = $ID;
30        $ID = $theid;
31        require_once(DOKU_INC.'inc/parserutils.php');
32        $data = unserialize(p_cached_output(wikiFN($ID), 'qc'));
33        $ID = $oldid;
34        return $data;
35    }
36
37}
38// vim:ts=4:sw=4:et:enc=utf-8:
39