diff --git a/e107_handlers/theme_handler.php b/e107_handlers/theme_handler.php index f01cf80b3..e18acbdeb 100644 --- a/e107_handlers/theme_handler.php +++ b/e107_handlers/theme_handler.php @@ -9,8 +9,8 @@ * e107 Admin Theme Handler * * $Source: /cvs_backup/e107_0.8/e107_handlers/theme_handler.php,v $ - * $Revision: 1.57 $ - * $Date: 2009-10-28 23:52:56 $ + * $Revision: 1.58 $ + * $Date: 2009-10-29 00:22:53 $ * $Author: marj_nl_fr $ */ @@ -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,18 +517,22 @@ 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 .= " + "; @@ -536,14 +540,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) @@ -558,19 +562,19 @@ class themeHandler // echo "------------- NODEFAULT"; } $itext .= " - "; } - $itext .= " - - + "; @@ -659,21 +663,23 @@ 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) @@ -681,11 +687,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; @@ -720,17 +726,17 @@ class themeHandler
- + "; - $text .= ""; - $text .= ""; - $text .= ""; + $text .= ""; + $text .= ""; + $text .= ""; - $text .= ""; - $text .= ""; - $text .= " - "; + $text .= ""; + $text .= " + "; @@ -741,8 +747,8 @@ class themeHandler $text .= " - - + - - + @@ -771,14 +777,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'])) { @@ -758,8 +764,8 @@ class themeHandler $text .= "
".TPVLAN_30." + ".TPVLAN_30." ".TPVLAN_28."   ".TPVLAN_29."
".TPVLAN_50.": + ".TPVLAN_50.": - - - - + + + + "; $itext .= ($mode == 1) ? "" : ""; @@ -807,7 +813,7 @@ class themeHandler "; } - $itext .= " - "; @@ -854,7 +860,7 @@ class themeHandler } - // $itext .= !$mode ? "" : ""; + // $itext .= !$mode ? "" : ""; if($mode == 2) { @@ -887,12 +893,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']) ? "" : ""; @@ -835,9 +841,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.": + - - + + "; @@ -984,7 +990,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; @@ -1123,7 +1129,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'; @@ -1135,13 +1141,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']); @@ -1157,14 +1163,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 { @@ -1208,7 +1214,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, ''); } @@ -1245,7 +1251,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."