<?php if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); require_once(DOKU_PLUGIN.'syntax.php'); /** * All DokuWiki plugins to extend the parser/rendering mechanism * need to inherit from this class */ class syntax_plugin_commentsrc extends DokuWiki_Syntax_Plugin { /** * return some info */ function getInfo(){ return array( 'author' => 'iDo', 'email' => 'iDo@woow-fr.com', 'date' => '14/12/2005', 'name' => 'commentsrc Plugin', 'desc' => 'Make texte only visible when editing a page', 'url' => 'https://www.dokuwiki.org/plugin:commentsrc', ); } /** * What kind of syntax are we? */ function getType(){ return 'substition'; } /** * Where to sort in? */ function getSort(){ return 51; } /** * Connect pattern to lexer */ function connectTo($mode) { $this->Lexer->addSpecialPattern("!-.*-!",$mode,'plugin_commentsrc'); } /** * Handle the match */ function handle($match, $state, $pos, &$handler){ return true; } /** * Create output */ function render($mode, &$renderer, $data) { return true; } } //Setup VIM: ex: et ts=4 enc=utf-8 :