plugin:space
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:space [2008-11-21 21:43] – added similar plugin and another tag ach | plugin:space [2020-02-18 19:29] (current) – Aleksandr | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Space Plugin ====== | ||
+ | |||
+ | ---- plugin ---- | ||
+ | description: | ||
+ | author | ||
+ | email : garmendariz@gmail.com | ||
+ | type : syntax | ||
+ | lastupdate : 2006-08-16 | ||
+ | compatible : | ||
+ | depends | ||
+ | conflicts | ||
+ | similar | ||
+ | tags : space | ||
+ | ---- | ||
+ | |||
+ | |||
+ | ===== Description ===== | ||
+ | |||
+ | This plugin is completely based on the [[plugin: | ||
+ | |||
+ | ===== Use ===== | ||
+ | |||
+ | Simply insert '< | ||
+ | |||
+ | ===== Code ===== | ||
+ | |||
+ | <code php syntax.php> | ||
+ | <?php | ||
+ | /** | ||
+ | * Plugin Space: Inserts "& | ||
+ | | ||
+ | * @license | ||
+ | * @author | ||
+ | */ | ||
+ | |||
+ | if(!defined(' | ||
+ | if(!defined(' | ||
+ | require_once(DOKU_PLUGIN.' | ||
+ | |||
+ | /** | ||
+ | * All DokuWiki plugins to extend the parser/ | ||
+ | * need to inherit from this class | ||
+ | */ | ||
+ | class syntax_plugin_space extends DokuWiki_Syntax_Plugin { | ||
+ | |||
+ | /** | ||
+ | * return some info | ||
+ | */ | ||
+ | function getInfo(){ | ||
+ | return array( | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ); | ||
+ | } | ||
+ | |||
+ | /** | ||
+ | * What kind of syntax are we? | ||
+ | */ | ||
+ | function getType(){ | ||
+ | return ' | ||
+ | } | ||
+ | |||
+ | /** | ||
+ | * What kind of syntax do we allow (optional) | ||
+ | */ | ||
+ | // function getAllowedTypes() { | ||
+ | // return array(); | ||
+ | // } | ||
+ | |||
+ | /** | ||
+ | * What about paragraphs? (optional) | ||
+ | */ | ||
+ | // function getPType(){ | ||
+ | // return ' | ||
+ | // } | ||
+ | |||
+ | /** | ||
+ | * Where to sort in? | ||
+ | | ||
+ | function getSort(){ | ||
+ | return 999; | ||
+ | } | ||
+ | |||
+ | |||
+ | /** | ||
+ | * Connect pattern to lexer | ||
+ | */ | ||
+ | function connectTo($mode) { | ||
+ | $this-> | ||
+ | // $this-> | ||
+ | } | ||
+ | |||
+ | // function postConnect() { | ||
+ | // $this-> | ||
+ | // } | ||
+ | |||
+ | |||
+ | /** | ||
+ | * Handle the match | ||
+ | */ | ||
+ | function handle($match, | ||
+ | switch ($state) { | ||
+ | case DOKU_LEXER_ENTER : | ||
+ | break; | ||
+ | case DOKU_LEXER_MATCHED : | ||
+ | break; | ||
+ | case DOKU_LEXER_UNMATCHED : | ||
+ | break; | ||
+ | case DOKU_LEXER_EXIT : | ||
+ | break; | ||
+ | case DOKU_LEXER_SPECIAL : | ||
+ | break; | ||
+ | } | ||
+ | return array(); | ||
+ | } | ||
+ | |||
+ | /** | ||
+ | * Create output | ||
+ | */ | ||
+ | function render($mode, | ||
+ | if($mode == ' | ||
+ | $renderer-> | ||
+ | // $renderer-> | ||
+ | return true; | ||
+ | } | ||
+ | return false; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | //Setup VIM: ex: et ts=4 enc=utf-8 : | ||
+ | ?> | ||
+ | </ | ||