* */ if(!defined('DOKU_INC')) die(); if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); require_once(DOKU_PLUGIN.'syntax.php'); class syntax_plugin_select extends DokuWiki_Syntax_Plugin { function getType() { return 'substition';} function getPType() { return 'block';} function getSort(){return 168;} function connectTo($mode) { $this->Lexer->addSpecialPattern('', $mode, 'plugin_select'); } /** * Handle the match */ function handle($match, $state, $pos, Doku_Handler $handler) { global $ID; $match = substr($match, 7, -9); // strip markup list($title, $match) = explode('>', $match, 2); $items = explode("\n", $match); return array($title,$items); } /** * Create output */ function render($mode, Doku_Renderer $renderer, $data) { global $conf; if($mode == 'xhtml'){ list($title,$items) = $data; $s = '
'.NL; $s .= ''.NL; $s .= ''.NL; $s .= '
'.NL; $renderer->doc.=$s; return true; } return false; } }