devel:syntax_plugin_skeleton
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
devel:syntax_plugin_skeleton [2011-11-24 10:24] – added link 213.61.78.222 | devel:syntax_plugin_skeleton [2022-08-14 16:13] (current) – fix handle/render syntax for newer DokuWiki versions 2a02:168:4a00:0:e61d:2dff:fe09:a3e0 | ||
---|---|---|---|
Line 12: | Line 12: | ||
*/ | */ | ||
- | if(!defined(' | ||
- | if(!defined(' | ||
- | require_once(DOKU_PLUGIN.' | ||
/** | /** | ||
Line 22: | Line 19: | ||
class syntax_plugin_test extends DokuWiki_Syntax_Plugin { | class syntax_plugin_test extends DokuWiki_Syntax_Plugin { | ||
- | /** | + | |
- | * Get an associative array with plugin info. | + | |
- | * | + | |
- | * <p> | + | |
- | * The returned array holds the following fields: | + | |
- | * < | + | |
- | * < | + | |
- | * < | + | |
- | * < | + | |
- | * < | + | |
- | * < | + | |
- | * < | + | |
- | * < | + | |
- | * (eg. syntax description)</ | + | |
- | * </ | + | |
- | * @param none | + | |
- | * @return Array Information about this plugin class. | + | |
- | * @public | + | |
- | * @static | + | |
- | */ | + | |
- | function getInfo(){ | + | |
- | return array( | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ); | + | |
- | } | + | |
/** | /** | ||
Line 154: | Line 122: | ||
* @static | * @static | ||
*/ | */ | ||
- | function handle($match, | + | function handle($match, |
switch ($state) { | switch ($state) { | ||
case DOKU_LEXER_ENTER : | case DOKU_LEXER_ENTER : | ||
Line 189: | Line 157: | ||
* @see handle() | * @see handle() | ||
*/ | */ | ||
- | function render($mode, | + | function render($mode, |
if($mode == ' | if($mode == ' | ||
$renderer-> | $renderer-> | ||
Line 199: | Line 167: | ||
} | } | ||
- | //Setup VIM: ex: et ts=4 enc=utf-8 : | ||
- | ?> | ||
</ | </ | ||
devel/syntax_plugin_skeleton.1322126685.txt.gz · Last modified: 2011-11-24 10:24 by 213.61.78.222