xref: /plugin/footerv2/syntax.php (revision be17be9a5a38ca106c005cddeb79978ecf8e7cc7)
1<?php
2/**
3 * @license    GPL (http://www.gnu.org/licenses/gpl.html)
4 * @author     Hans-Juergen Schuemmer, Scott Lee Chua
5 *
6 */
7
8if(!defined('DOKU_INC')) die();
9
10class syntax_plugin_footerv2 extends DokuWiki_Syntax_Plugin {
11
12    function getType() {
13        return 'substition';
14    }
15
16    function getSort() {
17        return 170;             /* ??? */
18    }
19
20    function connectTo($mode) {
21        $this->Lexer->addSpecialPattern('~~NOFOOTER~~',$mode,'plugin_footerv2');
22    }
23
24    function handle($match, $state, $pos, Doku_Handler $handler){
25		$match = str_replace("~~NOFOOTER~~", '', $match);
26	}
27
28    function render($mode, Doku_Renderer $renderer, $data) {
29        if($mode == 'xhtml'){
30            return true;
31        }
32        return false;
33    }
34
35}
36?>
37