1<?php
2
3if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
4if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
5require_once(DOKU_PLUGIN.'syntax.php');
6
7/**
8 * All DokuWiki plugins to extend the parser/rendering mechanism
9 * need to inherit from this class
10 */
11class syntax_plugin_commentsrc extends DokuWiki_Syntax_Plugin {
12
13    /**
14     * return some info
15     */
16    function getInfo(){
17        return array(
18            'author' => 'iDo',
19            'email'  => 'iDo@woow-fr.com',
20            'date'   => '14/12/2005',
21            'name'   => 'commentsrc Plugin',
22			'desc'   => 'Make texte only visible when editing a page',
23            'url'    => 'https://www.dokuwiki.org/plugin:commentsrc',
24        );
25    }
26
27    /**
28     * What kind of syntax are we?
29     */
30    function getType(){
31        return 'substition';
32    }
33
34    /**
35     * Where to sort in?
36     */
37    function getSort(){
38        return 51;
39    }
40
41    /**
42     * Connect pattern to lexer
43     */
44    function connectTo($mode) {
45      $this->Lexer->addSpecialPattern("!-.*-!",$mode,'plugin_commentsrc');
46    }
47
48    /**
49     * Handle the match
50     */
51    function handle($match, $state, $pos, &$handler){
52		return true;
53    }
54
55    /**
56     * Create output
57     */
58    function render($mode, &$renderer, $data) {
59        return true;
60    }
61
62}
63
64//Setup VIM: ex: et ts=4 enc=utf-8 :