*/ 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_tline extends DokuWiki_Syntax_Plugin { function getInfo() { return array( 'author' => 'Dan Kreiser', 'email' => 'dan.kreiser@gmail.com', 'date' => '2011-03-01', 'name' => 'tline', 'desc' => 'Integrate charts with the google charts api', 'url' => 'http://www.tux-tips.de/tux-wiki/doku.php?id=start:dokuwiki:plugins', ); } /** * What kind of syntax are we? */ function getType(){ return 'substition'; } function getPType(){ return 'block'; } /** * Where to sort in? */ function getSort(){ return 160; } /** * Connect pattern to lexer */ function connectTo($mode) { $this->Lexer->addSpecialPattern('\n.*?\n',$mode,'plugin_tline'); } /** * Handle the match */ function handle($match, $state, $pos, &$handler){ // prepare default data $return=explode("\n",$match); return $return; } /** * Create output */ function render($mode, &$R, $data) { if($mode != 'xhtml') return false; //$R->doc .= ''; $R->doc .=''; $R->doc .='
'; $R->doc .='Timeline bearbeiten'; if ($data[3]=="controls"){ $R->doc .='
'; } return true; } }