diff --git a/index.php b/index.php index 87795ade70..a1e3282c3e 100644 --- a/index.php +++ b/index.php @@ -428,7 +428,7 @@ else $a->page['htmlhead'] = str_replace('{{$stylesheet}}',$stylesheet,$a->page['htmlhead']); //$a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array('$stylesheet' => $stylesheet)); -if ($_GET["mode"] == "raw") { +if (($_GET["mode"] == "raw") OR ($_GET["mode"] == "minimal")) { $doc = new DOMDocument(); $target = new DOMDocument(); @@ -449,6 +449,9 @@ if ($_GET["mode"] == "raw") { // And then append it to the target $target->documentElement->appendChild($item); } +} + +if ($_GET["mode"] == "raw") { header("Content-type: text/html; charset=utf-8"); @@ -515,13 +518,21 @@ $profile = $a->profile; header("Content-type: text/html; charset=utf-8"); -$template = 'view/theme/' . current_theme() . '/' - . ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.php'; -if(file_exists($template)) - require_once($template); -else - require_once(str_replace('theme/' . current_theme() . '/', '', $template)); +if ($_GET["mode"] == "minimal") { + //$page['content'] = substr($target->saveHTML(), 6, -8)."\n\n". + // '
'."\n\n"; + + require "view/minimal.php"; +} else { + $template = 'view/theme/' . current_theme() . '/' + . ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.php'; + + if(file_exists($template)) + require_once($template); + else + require_once(str_replace('theme/' . current_theme() . '/', '', $template)); +} session_write_close(); exit; diff --git a/view/minimal.php b/view/minimal.php index a8c6939851..a131e3ec5e 100644 --- a/view/minimal.php +++ b/view/minimal.php @@ -6,7 +6,7 @@ -