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/');
12
13/**
14 * All DokuWiki plugins to extend the parser/rendering mechanism
15 * need to inherit from this class
16 */
17class syntax_plugin_nodetailsxhtml_scripting extends DokuWiki_Syntax_Plugin {
18
19    function getInfo() {
20        if ( method_exists(parent, 'getInfo')) {
21            $info = parent::getInfo();
22        }
23        return array_merge(is_array($info) ? $info : confToHash(dirname(__FILE__).'/../plugin.info.txt'), array(
24                        'desc' => 'Enable scripting Tags like <%, %>, <? and ?>',
25        ));
26    }
27
28    function getType(){ return 'substition';}
29
30    function getSort(){ return 230; }
31
32    function connectTo($mode) {
33        $this->Lexer->addSpecialPattern('~~isScripting~~', $mode, 'plugin_nodetailsxhtml_scripting');
34    }
35
36    function handle($match, $state, $pos, Doku_Handler $handler) {
37        return $match;
38    }
39
40    function render($mode, Doku_Renderer $renderer, $data) {
41        $renderer->info['scriptmode'] = true;
42        return true;
43    }
44}
45
46//Setup VIM: ex: et ts=4 enc=utf-8 :