Handler = new Doku_Handler(); // Add modes to parser foreach($modes as $mode){ $Parser->addMode($mode['mode'], $mode['obj']); } $instructions = $Parser->parse($text); // Cache the parsed text if (!is_null($type) && !is_null($id)) { $fields = array('content'=> serialize($instructions), 'type'=> $type , 'topic'=> $id, 'last_updated'=> time()); $keys = array('type','topic'); //autoquote is always true on db class $db->Replace('{cache}', $fields, $keys); } } else { $instructions = unserialize($instructions); } $Renderer->smileys = getSmileys(); $Renderer->entities = getEntities(); $Renderer->acronyms = getAcronyms(); $Renderer->interwiki = getInterwiki(); $conf = $fs_conf; $conf['cachedir'] = FS_CACHE_DIR; // for dokuwiki $conf['fperm'] = 0600; $conf['dperm'] = 0700; // Loop through the instructions foreach ($instructions as $instruction) { // Execute the callback against the Renderer call_user_func_array(array(&$Renderer, $instruction[0]), $instruction[1]); } $return = $Renderer->doc; // Display the output if (Get::val('histring')) { $words = explode(' ', Get::val('histring')); foreach($words as $word) { $return = html_hilight($return, $word); } } return $return; } static function textarea( $name, $rows, $cols, $attrs = null, $content = null) { $name = htmlspecialchars($name, ENT_QUOTES, 'utf-8'); $rows = intval($rows); $cols = intval($cols); $return = '
' . dokuwiki_TextFormatter::getDokuWikiToolbar( $attrs['id'] ) . '
'; $return .= "