*/ // must be run within Dokuwiki if(!defined('DOKU_INC')) die(); // we inherit from the XHTML renderer instead directly of the base renderer require_once DOKU_INC.'inc/parser/xhtml.php'; /** * The Renderer */ class renderer_plugin_offline extends Doku_Renderer_xhtml { var $base=''; var $tpl=''; /** * return some info */ function getInfo(){ return confToHash(dirname(__FILE__).'/info.txt'); } /** * the format we produce */ function getFormat(){ // this should be "offline"' usally, but we inherit from the xhtml renderer // and produce XHTML as well, so we can gain magically compatibility // by saying we're the 'xhtml' renderer here. return 'xhtml'; } /** * Initialize the rendering */ function document_start() { // call the parent parent::document_start(); // send the content type header header('Content-Type: text/html; charset=utf-8'); $this->base = DOKU_BASE.'lib/plugins/offline/ui/'; $this->tpl = $this->getConf('template'); $this->offline_init($text); } /** * Print the header of the page * * Gets called when the very first H1 header is discovered. It includes * all the S5 CSS and JavaScript magic */ function offline_init($title){ global $conf; global $lang; global $INFO; global $ID; // Create prefix to turn almost absolute path into relative path $urlPrefixStr = $this->create_url_prefix($ID); //throw away any previous content $this->doc = '
\s*
#','',$this->doc); if($this->slideopen){ $this->doc .= '\s*
#','',$this->doc); $this->doc .= ''; } /** * Renders internal and external media * * @author Andreas Gohr