3 * S5 Plugin: Display a Wiki page as S5 slideshow presentation
5 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
6 * @author Andreas Gohr <andi@splitbrain.org>
8 // must be run within Dokuwiki
9 if(!defined('DOKU_INC')) die();
11 if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC
.'lib/plugins/');
12 require_once(DOKU_PLUGIN
.'syntax.php');
15 * All DokuWiki plugins to extend the parser/rendering mechanism
16 * need to inherit from this class
18 class syntax_plugin_s5
extends DokuWiki_Syntax_Plugin
{
21 * What kind of syntax are we?
28 * What about paragraphs?
43 * Connect pattern to lexer
45 function connectTo($mode) {
46 $this->Lexer
->addSpecialPattern('~~SLIDESHOW~~',$mode,'plugin_s5');
53 function handle($match, $state, $pos, &$handler){
60 function render($format, &$renderer, $data) {
62 if($format != 'xhtml') return false;
64 $renderer->doc
.= '<a href="'.exportlink($ID, 's5').'" title="'.$this->getLang('view').'">';
65 $renderer->doc
.= '<img src="'.DOKU_BASE
.'lib/plugins/s5/screen.gif" align="right" alt="'.$this->getLang('view').'" width="48" height="48" />';
66 $renderer->doc
.= '</a>';
71 //Setup VIM: ex: et ts=4 enc=utf-8 :