$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();
// And then append it to the target
$target->documentElement->appendChild($item);
}
+}
+
+if ($_GET["mode"] == "raw") {
header("Content-type: text/html; charset=utf-8");
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".
+ // '<div id="conversation-end"></div>'."\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;
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>\r
</head>\r
<body>\r
- <section style="margin:0px!important; padding:0px!important; float:none!important;display:block!important;"><?php if(x($page,'content')) echo $page['content']; ?>\r
+ <section class="minimal" style="margin:0px!important; padding:0px!important; float:none!important;display:block!important;"><?php if(x($page,'content')) echo $page['content']; ?>\r
<div id="page-footer"></div>\r
</section>\r
</body>\r