1<?php
2/**
3 * iReflect Plugin
4 *
5 * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
6 * @author     i-net software <tools@inetsoftware.de>
7 * @author     Gerry Weissbach <gweissbach@inetsoftware.de>
8 */
9
10if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
11if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
12require_once(DOKU_PLUGIN.'syntax.php');
13
14/**
15 * All DokuWiki plugins to extend the parser/rendering mechanism
16 * need to inherit from this class
17 */
18class syntax_plugin_nodetailsxhtml_scripting extends DokuWiki_Syntax_Plugin {
19
20    function getInfo() {
21        if ( method_exists(parent, 'getInfo')) {
22            $info = parent::getInfo();
23        }
24        return array_merge(is_array($info) ? $info : confToHash(dirname(__FILE__).'/../plugin.info.txt'), array(
25                        'desc' => 'Enable scripting Tags like <%, %>, <? and ?>',
26        ));
27    }
28
29    function getType(){ return 'substition';}
30
31    function getSort(){ return 230; }
32
33    function connectTo($mode) {
34        $this->Lexer->addSpecialPattern('~~isScripting~~', $mode, 'plugin_nodetailsxhtml_scripting');
35    }
36
37    function handle($match, $state, $pos, Doku_Handler $handler) {
38        return $match;
39    }
40
41    function render($mode, Doku_Renderer $renderer, $data) {
42        $renderer->info['scriptmode'] = true;
43        return true;
44    }
45}
46
47//Setup VIM: ex: et ts=4 enc=utf-8 :