'iDo', 'email' => 'iDo@woow-fr.com', 'date' => '18.01.2006', 'name' => 'isns Plugin', 'desc' => 'If the page doesnt exist, try to open the index. The syntax: {{isns}}', 'url' => 'https://www.dokuwiki.org/plugin:isns', ); } /** * What kind of syntax are we? */ function getType(){ return 'substition'; } /** * Where to sort in? */ function getSort(){ return 1; } /** * Connect pattern to lexer */ function connectTo($mode) { $this->Lexer->addSpecialPattern("{{isns}}",$mode,'plugin_isns'); } /** * Handle the match */ function handle($match, $state, $pos, &$handler){ return true; } /** * Create output */ function render($mode, &$renderer, $data) { if($mode == 'xhtml'){ $n=$this->_IsNs(); if (@$n) $renderer->doc = $n; return true; } return false; } function _IsNs() { global $conf; global $ID; $pn=wikiFN($ID); if ((!file_exists($pn)) && (is_dir(substr($pn,0,-4)))) { ob_start(); html_index($ID); return ob_get_clean();; } return false; } } //Setup VIM: ex: et ts=4 enc=utf-8 :