From 74bd6999c5e5c23ebbf90dbb6bdaabbddd7594cf Mon Sep 17 00:00:00 2001 From: sembrestels Date: Thu, 13 Oct 2011 15:23:11 +0200 Subject: Rename lib/dokuwiki to vendors/dokuwiki --- vendors/dokuwiki/lib/plugins/s5reloaded/syntax.php | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 vendors/dokuwiki/lib/plugins/s5reloaded/syntax.php (limited to 'vendors/dokuwiki/lib/plugins/s5reloaded/syntax.php') diff --git a/vendors/dokuwiki/lib/plugins/s5reloaded/syntax.php b/vendors/dokuwiki/lib/plugins/s5reloaded/syntax.php new file mode 100644 index 000000000..40b1d0630 --- /dev/null +++ b/vendors/dokuwiki/lib/plugins/s5reloaded/syntax.php @@ -0,0 +1,72 @@ +, Andreas Gohr + */ +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +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_s5reloaded extends DokuWiki_Syntax_Plugin { + + /** + * What kind of syntax are we? + */ + function getType(){ + return 'substition'; + } + + /** + * What about paragraphs? + */ + function getPType(){ + return 'normal'; + } + + /** + * Where to sort in? + */ + function getSort(){ + return 800; + } + + + /** + * Connect pattern to lexer + */ + function connectTo($mode) { + $this->Lexer->addSpecialPattern('~~SLIDESHOW[^~]*~~',$mode,'plugin_s5reloaded'); + } + + + /** + * Handle the match + */ + function handle($match, $state, $pos, &$handler){ + if($match!='~~SLIDESHOW~~') return array(trim(substr($match,11,-2))); + return array(); + } + + /** + * Create output + */ + function render($format, &$renderer, $data) { + global $ID; + if($format != 'xhtml') return false; + + $renderer->doc .= ''; + $renderer->doc .= ''.$this->getLang('view').''; + $renderer->doc .= ''; + return true; + } +} + +//Setup VIM: ex: et ts=4 enc=utf-8 : -- cgit v1.2.3