Display becomes a common get arg to force the skin level of the page:
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 22 Jan 2007 13:37:54 +0000 (13:37 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 22 Jan 2007 13:37:54 +0000 (13:37 +0000)
display=full  -> full skin
display=light -> simple skin
display=row   -> no skin
Useful to create 'light' popups

git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1384 839d8a87-29fc-0310-9880-83ba4fa771e5

classes/platalpage.php
htdocs/xorg.php

index ee56a9d..1c91502 100644 (file)
@@ -64,9 +64,9 @@ class PlatalPage extends Smarty
 
     function changeTpl($tpl, $type = SKINNED)
     {
-       $this->_tpl       = $tpl;
-       $this->_page_type = $type;
-       $this->assign('xorg_tpl', $tpl);
+       $this->_tpl       = $tpl;
+           $this->_page_type = $type;
+       $this->assign('xorg_tpl', $tpl);
     }
 
     // }}}
@@ -82,6 +82,14 @@ class PlatalPage extends Smarty
         $this->assign('xorg_failure', $this->_failure);
         $this->assign('globals', $globals);
 
+        if (Env::v('display') == 'light') {
+            $this->_page_type = SIMPLE;
+        } elseif (Env::v('display') == 'raw') {
+            $this->_page_type = NO_SKIN;
+        } elseif (Env::v('display') == 'full') {
+            $this->_page_typ = SKINNED;
+        }
+
         switch ($this->_page_type) {
           case NO_SKIN:
             error_reporting(0);
index a048312..82f398b 100644 (file)
@@ -106,10 +106,6 @@ switch (Env::v('action')) {
     break;
 }
 
-if (Env::v('display') == 'light') {
-    $page->assign('simple', true);
-}
-
 $page->assign('perms', $perms);
 $page->assign('perms_opts', wiki_perms_options());