From 6af5b08c25d73ec8def0a57ac1875a73e2fd767d Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Sat, 31 Oct 2009 00:36:09 +0000 Subject: [PATCH] rolled back until some replacement css is committed for the inline styles. --- e107_handlers/theme_handler.php | 144 +++++++++++++++----------------- 1 file changed, 69 insertions(+), 75 deletions(-) diff --git a/e107_handlers/theme_handler.php b/e107_handlers/theme_handler.php index e18acbdeb..ca33c7061 100644 --- a/e107_handlers/theme_handler.php +++ b/e107_handlers/theme_handler.php @@ -9,9 +9,9 @@ * e107 Admin Theme Handler * * $Source: /cvs_backup/e107_0.8/e107_handlers/theme_handler.php,v $ - * $Revision: 1.58 $ - * $Date: 2009-10-29 00:22:53 $ - * $Author: marj_nl_fr $ + * $Revision: 1.59 $ + * $Date: 2009-10-31 00:36:09 $ + * $Author: e107coders $ */ if(!defined('e107_INIT')) @@ -57,7 +57,7 @@ class themeHandler function themeHandler() { - global $emessage, $e107cache, $pref; + global $emessage,$e107cache,$pref; require_once (e_HANDLER."form_handler.php"); //enable inner tabindex counter @@ -316,7 +316,7 @@ class themeHandler { exit; } - global $ns, $emessage; + global $ns,$emessage; extract($_FILES); if(!is_writable(e_THEME)) { @@ -404,7 +404,7 @@ class themeHandler function showThemes($mode = 'main') { - global $ns, $pref, $emessage; + global $ns,$pref,$emessage; echo "
\n"; @@ -462,7 +462,7 @@ class themeHandler function renderUploadForm() { - global $sql, $ns, $emessage; + global $sql,$ns,$emessage; if(!is_writable(e_THEME)) { @@ -517,22 +517,18 @@ class themeHandler global $pref; $author = ($theme['email'] ? "".$theme['author']."" : $theme['author']); $website = ($theme['website'] ? "".$theme['website']."" : ""); - $preview = "" - .($theme['preview'] - ? "" - : "" - ).""; + $preview = "".($theme['preview'] ? "" : "").""; - $text = "
".TPVLAN_7."
+ $text = "
".TPVLAN_7."
"; - $text .= $author ? "" : ""; - $text .= $website ? "" : ""; - $text .= $theme['date'] ? "" : ""; - $text .= " - " : ""; + $text .= $website ? "" : ""; + $text .= $theme['date'] ? "" : ""; + $text .= " + "; @@ -540,14 +536,14 @@ class themeHandler if($theme['layouts']) { $itext .= " - -
".TPVLAN_4.":".$author."
".TPVLAN_5.":".$website."
".TPVLAN_6.":".$theme['date']."
".TPVLAN_49."XHTML "; + $text .= $author ? "
".TPVLAN_4.":".$author."
".TPVLAN_5.":".$website."
".TPVLAN_6.":".$theme['date']."
".TPVLAN_49.":XHTML "; $text .= ($theme['xhtmlcompliant']) ? ADMIN_TRUE_ICON : ADMIN_FALSE_ICON; - $text .= "    CSS "; //???? + $text .= "    CSS "; $text .= ($theme['csscompliant']) ? ADMIN_TRUE_ICON : ADMIN_FALSE_ICON; $text .= "
".TPVLAN_50.": + +
".TPVLAN_50.":"; - $itext .= ($mode == 1) ? "" : ""; + $itext .= ($mode == 1) ? "" : ""; $itext .= " - + \n"; foreach ($theme['layouts'] as $key=>$val) @@ -562,19 +558,19 @@ class themeHandler // echo "------------- NODEFAULT"; } $itext .= " - "; } - $itext .= " - - + "; @@ -663,23 +659,21 @@ class themeHandler mode = 2 :: selected admin theme */ - global $ns, $pref, $frm; + global $ns,$pref,$frm; $author = ($theme['email'] ? "".$theme['author']."" : $theme['author']); $website = ($theme['website'] ? "".$theme['website']."" : ""); - $preview = "".($theme['preview'] ? "" : "").""; + $preview = "".($theme['preview'] ? "" : "").""; $previewbutton = (!$mode ? " " : ""); - $main_icon = ($pref['sitetheme'] != $theme['path']) ? "\n" : ADMIN_TRUE_ICON; + $main_icon = ($pref['sitetheme'] != $theme['path']) ? "\n" : ADMIN_TRUE_ICON; $info_icon = "\n"; - $preview_icon = "\n"; - $admin_icon = ($pref['admintheme'] != $theme['path']) - ? "\n" - : ADMIN_TRUE_ICON; + $preview_icon = "\n"; + $admin_icon = ($pref['admintheme'] != $theme['path']) ? "\n" : ADMIN_TRUE_ICON; - $newpreview = "".($theme['preview'] ? "" : "").""; + $newpreview = "".($theme['preview'] ? "" : "").""; // Choose a Theme to Install. if(!$mode) @@ -687,11 +681,11 @@ class themeHandler // styles NEED to be put into style.css $borderStyle = (($pref['sitetheme'] == $theme['path']) || ($pref['admintheme'] == $theme['path'])) ? "border:1px solid black" : "border:1px dotted silver;background-color:#DDDDDD"; - $text = "
-
".$newpreview."
-
".$theme['name']." ".$theme['version']."
-
\n\n\n".$main_icon.$admin_icon.$info_icon.$preview_icon."\n\n
-
\n".$this->renderThemeInfo($theme)."
+ $text = "
+
".$newpreview."
+
".$theme['name']." ".$theme['version']."
+
\n\n\n".$main_icon.$admin_icon.$info_icon.$preview_icon."\n\n
+
\n".$this->renderThemeInfo($theme)."
"; return $text; @@ -726,17 +720,17 @@ class themeHandler
- + "; - $text .= ""; - $text .= ""; - $text .= ""; + $text .= ""; + $text .= ""; + $text .= ""; - $text .= ""; - $text .= ""; - $text .= " - "; + $text .= ""; + $text .= " + "; @@ -747,8 +741,8 @@ class themeHandler $text .= " - - + - - + @@ -777,14 +771,14 @@ class themeHandler { $itext = " - - +
DefaultDefaultTitle RequirementsMenu PresetMenu Preset
+ "; + $itext .= ""; $itext .= ($val['@attributes']['previewFull']) ? "" : ""; $itext .= $val['@attributes']['title']; $itext .= ($val['@attributes']['previewFull']) ? "" : ""; $itext .= ($pref['sitetheme_deflayout'] == $key) ? " (default)" : ""; $itext .= "".$val['@attributes']['plugins']." "; + ".$val['@attributes']['plugins']." "; $itext .= ($val['menuPresets']) ? ADMIN_TRUE_ICON : " "; $itext .= "
".TPVLAN_11." ".$theme['version']."".$newpreview."".$newpreview."
".TPVLAN_4.":".$author."
".TPVLAN_5.":".$website."
".TPVLAN_6.":".$theme['date']."
".TPVLAN_4.":".$author."
".TPVLAN_5.":".$website."
".TPVLAN_6.":".$theme['date']."
".TPVLAN_7.":".$theme['info']."
".LAN_CATEGORY.":".$theme['category']."
".TPVLAN_49.":"; + $text .= "
".TPVLAN_7.":".$theme['info']."
".LAN_CATEGORY.":".$theme['category']."
".TPVLAN_49.":"; $text .= ($theme['xhtmlcompliant']) ? "W3C XHTML ".$theme['xhtmlcompliant'] : "Not Specified"; $text .= ($theme['csscompliant']) ? " & CSS ".$theme['csscompliant'] : ""; $text .= "
".TPVLAN_53.""; + ".TPVLAN_53.""; if(varset($theme['plugins'])) { @@ -764,8 +758,8 @@ class themeHandler $text .= "
".TPVLAN_30." + ".TPVLAN_30." ".TPVLAN_28."   ".TPVLAN_29."
".TPVLAN_50.": + ".TPVLAN_50.": - - - - + + + + "; $itext .= ($mode == 1) ? "" : ""; @@ -813,7 +807,7 @@ class themeHandler "; } - $itext .= " - "; @@ -860,7 +854,7 @@ class themeHandler } - // $itext .= !$mode ? "" : ""; + // $itext .= !$mode ? "" : ""; if($mode == 2) { @@ -893,12 +887,12 @@ class themeHandler if(array_key_exists("multipleStylesheets", $theme) && $mode) { $text .= " - -
".TPVLAN_55.""; + $itext .= ""; $itext .= ($val['@attributes']['previewFull']) ? "" : ""; $itext .= $val['@attributes']['title']; $itext .= ($val['@attributes']['previewFull']) ? "" : ""; @@ -841,9 +835,9 @@ class themeHandler $itext .= ""; + "; // Default - $itext .= ($pref['sitetheme_deflayout'] != $key) ? $custompage_diz."
\n" : TPVLAN_55; $itext .= "
".TPVLAN_8.":".$previewbutton.$selectmainbutton.$selectadminbutton."
".TPVLAN_8.":".$previewbutton.$selectmainbutton.$selectadminbutton."
".TPVLAN_22.": - + +
".TPVLAN_22.": + - - + + "; @@ -990,7 +984,7 @@ class themeHandler function renderPlugins($pluginOpts) { - global $frm, $sql; + global $frm,$sql; // if there is 1 entry, then it's not the same array. $tmp = (varset($pluginOpts['plugin'][1])) ? $pluginOpts['plugin'] : $pluginOpts; @@ -1129,7 +1123,7 @@ class themeHandler function setAdminTheme() { - global $pref, $e107cache, $ns, $emessage; + global $pref,$e107cache,$ns,$emessage; $themeArray = $this->getThemes("id"); $pref['admintheme'] = $themeArray[$this->id]; $pref['admincss'] = file_exists(e_THEME.$pref['admintheme'].'/admin_style.css') ? 'admin_style.css' : 'style.css'; @@ -1141,13 +1135,13 @@ class themeHandler $this->theme_adminlog('02', $pref['admintheme'].', '.$pref['admincss']); } - // $ns->tablerender("Admin Message", "
".TPVLAN_40." '".$themeArray[$this -> id]."'.

"); + // $ns->tablerender("Admin Message", "
".TPVLAN_40." '".$themeArray[$this -> id]."'.

"); // $this->showThemes('admin'); } function setStyle() { - global $pref, $e107cache, $ns, $sql, $emessage; + global $pref,$e107cache,$ns,$sql,$emessage; //TODO adminlog e107::getConfig()->setPosted('themecss', $_POST['themecss'])->setPosted('image_preload', $_POST['image_preload'])->setPosted('sitetheme_deflayout', $_POST['layout_default']); @@ -1163,14 +1157,14 @@ class themeHandler function setAdminStyle() { - global $pref, $e107cache, $ns, $emessage; + global $pref,$e107cache,$ns,$emessage; /*$pref['admincss'] = $_POST['admincss']; $pref['adminstyle'] = $_POST['adminstyle']; $e107cache->clear_sys(); if(save_prefs()) { $emessage->add(TPVLAN_43, E_MESSAGE_SUCCESS); - $this->theme_adminlog('04', $pref['adminstyle'].', '.$pref['admincss']); + $this->theme_adminlog('04',$pref['adminstyle'].', '.$pref['admincss']); } else { @@ -1214,7 +1208,7 @@ class themeHandler { return; } - global $pref, $admin_log; + global $pref,$admin_log; // if (!varset($pref['admin_log_log']['admin_banlist'],0)) return; $admin_log->log_event('THEME_'.$msg_num, $woffle, E_LOG_INFORMATIVE, ''); } @@ -1251,7 +1245,7 @@ class themeHandler $themeArray['csscompliant'] = ($css == "true" ? "2.1" : false); /* preg_match('/CUSTOMPAGES(\s*?=\s*?)("|\')(.*?)("|\');/si', $themeContents, $match); - $themeArray['custompages'] = array_filter(explode(" ", $match[3]));*/ + $themeArray['custompages'] = array_filter(explode(" ",$match[3]));*/ $themeContentsArray = explode("\n", $themeContents);
".TPVLAN_55."".TPVLAN_52."".TPVLAN_55."".TPVLAN_52." ".TPVLAN_7."