1*32905264SAndreas Gohr<?php 2*32905264SAndreas Gohr/** 3*32905264SAndreas Gohr * DokuWiki Plugin qc (Syntax Component) 4*32905264SAndreas Gohr * 5*32905264SAndreas Gohr * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html 6*32905264SAndreas Gohr * @author Andreas Gohr <gohr@cosmocode.de> 7*32905264SAndreas Gohr */ 8*32905264SAndreas Gohr 9*32905264SAndreas Gohr// must be run within Dokuwiki 10*32905264SAndreas Gohrif (!defined('DOKU_INC')) die(); 11*32905264SAndreas Gohr 12*32905264SAndreas Gohrif (!defined('DOKU_LF')) define('DOKU_LF', "\n"); 13*32905264SAndreas Gohrif (!defined('DOKU_TAB')) define('DOKU_TAB', "\t"); 14*32905264SAndreas Gohrif (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 15*32905264SAndreas Gohr 16*32905264SAndreas Gohrrequire_once(DOKU_PLUGIN.'syntax.php'); 17*32905264SAndreas Gohr 18*32905264SAndreas Gohrclass syntax_plugin_qc extends DokuWiki_Syntax_Plugin { 19*32905264SAndreas Gohr 20*32905264SAndreas Gohr function getType() { 21*32905264SAndreas Gohr return 'substition'; 22*32905264SAndreas Gohr } 23*32905264SAndreas Gohr 24*32905264SAndreas Gohr function getPType() { 25*32905264SAndreas Gohr return 'normal'; 26*32905264SAndreas Gohr } 27*32905264SAndreas Gohr 28*32905264SAndreas Gohr function getSort() { 29*32905264SAndreas Gohr return 150; 30*32905264SAndreas Gohr } 31*32905264SAndreas Gohr 32*32905264SAndreas Gohr 33*32905264SAndreas Gohr function connectTo($mode) { 34*32905264SAndreas Gohr $this->Lexer->addSpecialPattern('~~NOQC~~',$mode,'plugin_qc'); 35*32905264SAndreas Gohr } 36*32905264SAndreas Gohr 37*32905264SAndreas Gohr function handle($match, $state, $pos, &$handler){ 38*32905264SAndreas Gohr $data = array(); 39*32905264SAndreas Gohr 40*32905264SAndreas Gohr return $data; 41*32905264SAndreas Gohr } 42*32905264SAndreas Gohr 43*32905264SAndreas Gohr function render($mode, &$R, $data) { 44*32905264SAndreas Gohr if($mode != 'metadata') return false; 45*32905264SAndreas Gohr 46*32905264SAndreas Gohr $R->meta['relation']['qcplugin_disabled'] = true; 47*32905264SAndreas Gohr return true; 48*32905264SAndreas Gohr } 49*32905264SAndreas Gohr} 50*32905264SAndreas Gohr 51*32905264SAndreas Gohr// vim:ts=4:sw=4:et:enc=utf-8: 52