mirror of
https://github.com/e107inc/e107.git
synced 2025-07-16 20:41:27 +02:00
rolled back until some replacement css is committed for the inline styles.
This commit is contained in:
@@ -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'))
|
||||
@@ -517,22 +517,18 @@ class themeHandler
|
||||
global $pref;
|
||||
$author = ($theme['email'] ? "<a href='mailto:".$theme['email']."' title='".$theme['email']."'>".$theme['author']."</a>" : $theme['author']);
|
||||
$website = ($theme['website'] ? "<a href='".$theme['website']."' rel='external'>".$theme['website']."</a>" : "");
|
||||
$preview = "<a href='".e_BASE."news.php?themepreview.".$theme['id']."' title='".TPVLAN_9."' >"
|
||||
.($theme['preview']
|
||||
? "<img src='".$theme['preview']."' alt='' />"
|
||||
: "<img src='".e_IMAGE_ABS."admin_images/nopreview.png' title='".TPVLAN_12."' alt='' />"
|
||||
)."</a>";
|
||||
$preview = "<a href='".e_BASE."news.php?themepreview.".$theme['id']."' title='".TPVLAN_9."' >".($theme['preview'] ? "<img src='".$theme['preview']."' style='border: 1px solid #000;width:200px' alt='' />" : "<img src='".e_IMAGE_ABS."admin_images/nopreview.png' title='".TPVLAN_12."' alt='' />")."</a>";
|
||||
|
||||
|
||||
$text = "<div>".TPVLAN_7."</div>
|
||||
$text = "<div style='font-weight:bold;margin-bottom:10px'>".TPVLAN_7."</div>
|
||||
<table class='adminlist' cellpadding='0' cellspacing='0'>";
|
||||
$text .= $author ? "<tr><td><b>".TPVLAN_4."</b>:</td><td>".$author."</td></tr>" : "";
|
||||
$text .= $website ? "<tr><td><b>".TPVLAN_5."</b>:</td><td>".$website."</td></tr>" : "";
|
||||
$text .= $theme['date'] ? "<tr><td><b>".TPVLAN_6."</b>:</td><td>".$theme['date']."</td></tr>" : "";
|
||||
$text .= "<tr><td><b>".TPVLAN_49."</b></td>
|
||||
<td>XHTML ";
|
||||
$text .= $author ? "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_4."</b>:</td><td style='vertical-align:top'>".$author."</td></tr>" : "";
|
||||
$text .= $website ? "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_5."</b>:</td><td style='vertical-align:top'>".$website."</td></tr>" : "";
|
||||
$text .= $theme['date'] ? "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_6."</b>:</td><td style='vertical-align:top'>".$theme['date']."</td></tr>" : "";
|
||||
$text .= "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_49."</b>:</td>
|
||||
<td style='vertical-align:top'>XHTML ";
|
||||
$text .= ($theme['xhtmlcompliant']) ? ADMIN_TRUE_ICON : ADMIN_FALSE_ICON;
|
||||
$text .= " CSS "; //????
|
||||
$text .= " CSS ";
|
||||
$text .= ($theme['csscompliant']) ? ADMIN_TRUE_ICON : ADMIN_FALSE_ICON;
|
||||
$text .= "</td></tr>";
|
||||
|
||||
@@ -540,14 +536,14 @@ class themeHandler
|
||||
if($theme['layouts'])
|
||||
{
|
||||
$itext .= "<tr>
|
||||
<td><b>".TPVLAN_50."</b>:</td>
|
||||
<td><table class='fborder' >
|
||||
<td style='vertical-align:top; width:24%'><b>".TPVLAN_50."</b>:</td>
|
||||
<td style='vertical-align:top'><table class='fborder' style='margin-left:0px;margin-right:auto' >
|
||||
<tr>";
|
||||
$itext .= ($mode == 1) ? "<td class='fcaption'>Default</td>" : "";
|
||||
$itext .= ($mode == 1) ? "<td class='fcaption' style='text-align:center;vertical-align:top;'>Default</td>" : "";
|
||||
$itext .= "
|
||||
<td class='fcaption'>Title</td>
|
||||
<td class='fcaption'>Requirements</td>
|
||||
<td class='fcaption'>Menu Preset</td>
|
||||
<td class='fcaption' style='text-align:center;width:100px'>Menu Preset</td>
|
||||
</tr>\n";
|
||||
|
||||
foreach ($theme['layouts'] as $key=>$val)
|
||||
@@ -562,19 +558,19 @@ class themeHandler
|
||||
// echo "------------- NODEFAULT";
|
||||
}
|
||||
$itext .= "
|
||||
<td>
|
||||
<td style='vertical-align:top width:auto;text-align:center'>
|
||||
<input type='radio' name='layout_default' value='{$key}' ".($pref['sitetheme_deflayout'] == $key ? " checked='checked'" : "")." />
|
||||
</td>";
|
||||
}
|
||||
|
||||
$itext .= "<td>";
|
||||
$itext .= "<td style='vertical-align:top'>";
|
||||
$itext .= ($val['@attributes']['previewFull']) ? "<a href='".e_THEME_ABS.$theme['path']."/".$val['@attributes']['previewFull']."' >" : "";
|
||||
$itext .= $val['@attributes']['title'];
|
||||
$itext .= ($val['@attributes']['previewFull']) ? "</a>" : "";
|
||||
$itext .= ($pref['sitetheme_deflayout'] == $key) ? " (default)" : "";
|
||||
$itext .= "</td>
|
||||
<td>".$val['@attributes']['plugins']." </td>
|
||||
<td>";
|
||||
<td style='vertical-align:top'>".$val['@attributes']['plugins']." </td>
|
||||
<td style='vertical-align:top;text-align:center'>";
|
||||
$itext .= ($val['menuPresets']) ? ADMIN_TRUE_ICON : " ";
|
||||
$itext .= "</td>
|
||||
</tr>";
|
||||
@@ -668,18 +664,16 @@ class themeHandler
|
||||
|
||||
$author = ($theme['email'] ? "<a href='mailto:".$theme['email']."' title='".$theme['email']."'>".$theme['author']."</a>" : $theme['author']);
|
||||
$website = ($theme['website'] ? "<a href='".$theme['website']."' rel='external'>".$theme['website']."</a>" : "");
|
||||
$preview = "<a href='".e_BASE."news.php?themepreview.".$theme['id']."' title='".TPVLAN_9."' >".($theme['preview'] ? "<img src='".$theme['preview']."' alt='' />" : "<img src='".e_IMAGE_ABS."admin_images/nopreview.png' title='".TPVLAN_12."' alt='' />")."</a>";
|
||||
$preview = "<a href='".e_BASE."news.php?themepreview.".$theme['id']."' title='".TPVLAN_9."' >".($theme['preview'] ? "<img src='".$theme['preview']."' style='border: 1px solid #000;width:200px' alt='' />" : "<img src='".e_IMAGE_ABS."admin_images/nopreview.png' title='".TPVLAN_12."' alt='' />")."</a>";
|
||||
|
||||
$previewbutton = (!$mode ? "<input class='button' type='submit' name='preview_".$theme['id']."' value='".TPVLAN_9."' /> " : "");
|
||||
|
||||
$main_icon = ($pref['sitetheme'] != $theme['path']) ? "<input type='image' src='".e_IMAGE_ABS."admin_images/main_16.png' name='selectmain[".$theme['id']."]' alt='' title=\"".TPVLAN_10."\" />\n" : ADMIN_TRUE_ICON;
|
||||
$main_icon = ($pref['sitetheme'] != $theme['path']) ? "<input style='vertical-align:middle;' type='image' src='".e_IMAGE_ABS."admin_images/main_16.png' name='selectmain[".$theme['id']."]' alt='' title=\"".TPVLAN_10."\" />\n" : ADMIN_TRUE_ICON;
|
||||
$info_icon = "<a href='#themeInfo_".$theme['id']."' class='e-expandit' title='Click to select columns to display'><img src='".e_IMAGE_ABS."admin_images/info_16.png' alt='' title=\"".TPVLAN_7."\" class='icon S16' /></a>\n";
|
||||
$preview_icon = "<input type='image' src='".e_IMAGE_ABS."admin_images/search_16.png' name=\"preview[".$theme['id']."]\" title='".TPVLAN_9." #".$theme['id']."' />\n";
|
||||
$admin_icon = ($pref['admintheme'] != $theme['path'])
|
||||
? "<input type='image' src='".e_IMAGE_ABS."e107_icon_16.png' name='selectadmin[".$theme['id']."]' alt='' title=\"".TPVLAN_32."\" />\n"
|
||||
: ADMIN_TRUE_ICON;
|
||||
$preview_icon = "<input style='vertical-align:middle;' type='image' src='".e_IMAGE_ABS."admin_images/search_16.png' name=\"preview[".$theme['id']."]\" title='".TPVLAN_9." #".$theme['id']."' />\n";
|
||||
$admin_icon = ($pref['admintheme'] != $theme['path']) ? "<input type='image' src='".e_IMAGE_ABS."e107_icon_16.png' name='selectadmin[".$theme['id']."]' alt='' title=\"".TPVLAN_32."\" />\n" : ADMIN_TRUE_ICON;
|
||||
|
||||
$newpreview = "<a href='".e_BASE."news.php?themepreview.".$theme['id']."' title='".TPVLAN_9."' >".($theme['preview'] ? "<img src='".$theme['preview']."' alt='' />" : "<img src='".e_IMAGE_ABS."admin_images/nopreview.png' title='".TPVLAN_12."' alt='' />")."</a>";
|
||||
$newpreview = "<a href='".e_BASE."news.php?themepreview.".$theme['id']."' title='".TPVLAN_9."' >".($theme['preview'] ? "<img src='".$theme['preview']."' style='width:200px; height:160px;' alt='' />" : "<img src='".e_IMAGE_ABS."admin_images/nopreview.png' style='width:200px;height:160px;' title='".TPVLAN_12."' alt='' />")."</a>";
|
||||
|
||||
// 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 = "<div class='block-text'>
|
||||
<div>".$newpreview."</div>
|
||||
<div class='mediumtext'>".$theme['name']." ".$theme['version']."</div>
|
||||
<div>\n\n\n".$main_icon.$admin_icon.$info_icon.$preview_icon."\n\n</div>
|
||||
<div id='themeInfo_".$theme['id']."' class='e-hideme col-selection'>\n".$this->renderThemeInfo($theme)."</div>
|
||||
$text = "<div class='block-text' style='margin:5px;".$borderStyle.";float:left;width:202px;height:160px'>
|
||||
<div style='height:130px;overflow:hidden;border:1px solid black;margin-bottom:10px'>".$newpreview."</div>
|
||||
<div class='mediumtext' style='width:60%;float:left;font-weight:bold'>".$theme['name']." ".$theme['version']."</div>
|
||||
<div style='text-align:right;float:right;width:40%;height:16px'>\n\n\n".$main_icon.$admin_icon.$info_icon.$preview_icon."\n\n</div>
|
||||
<div id='themeInfo_".$theme['id']."' class='e-hideme col-selection' style='position:relative;top:30px;width:480px'>\n".$this->renderThemeInfo($theme)."</div>
|
||||
|
||||
</div>";
|
||||
return $text;
|
||||
@@ -726,17 +720,17 @@ class themeHandler
|
||||
<tr>
|
||||
<td><b>".TPVLAN_11."</b></td>
|
||||
<td>".$theme['version']."</td>
|
||||
<td class='center middle' rowspan='6'>".$newpreview."</td>
|
||||
<td class='center middle' rowspan='6' style='text-align:center; vertical-align:middle;width:25%'>".$newpreview."</td>
|
||||
</tr>";
|
||||
|
||||
$text .= "<tr><td><b>".TPVLAN_4."</b>:</td><td>".$author."</td></tr>";
|
||||
$text .= "<tr><td><b>".TPVLAN_5."</b>:</td><td>".$website."</td></tr>";
|
||||
$text .= "<tr><td><b>".TPVLAN_6."</b>:</td><td>".$theme['date']."</td></tr>";
|
||||
$text .= "<tr><td style='vertical-align:top; width:25%'><b>".TPVLAN_4."</b>:</td><td style='vertical-align:top'>".$author."</td></tr>";
|
||||
$text .= "<tr><td style='vertical-align:top; width:25%'><b>".TPVLAN_5."</b>:</td><td style='vertical-align:top'>".$website."</td></tr>";
|
||||
$text .= "<tr><td style='vertical-align:top; width:25%'><b>".TPVLAN_6."</b>:</td><td style='vertical-align:top'>".$theme['date']."</td></tr>";
|
||||
|
||||
$text .= "<tr><td><b>".TPVLAN_7."</b>:</td><td>".$theme['info']."</td></tr>";
|
||||
$text .= "<tr><td><b>".LAN_CATEGORY."</b>:</td><td>".$theme['category']."</td></tr>";
|
||||
$text .= "<tr><td><b>".TPVLAN_49."</b>:</td>
|
||||
<td>";
|
||||
$text .= "<tr><td style='vertical-align:top; width:25%'><b>".TPVLAN_7."</b>:</td><td style='vertical-align:top'>".$theme['info']."</td></tr>";
|
||||
$text .= "<tr><td style='vertical-align:top; width:25%'><b>".LAN_CATEGORY."</b>:</td><td style='vertical-align:top'>".$theme['category']."</td></tr>";
|
||||
$text .= "<tr><td style='vertical-align:top; width:25%'><b>".TPVLAN_49."</b>:</td>
|
||||
<td style='vertical-align:top'>";
|
||||
$text .= ($theme['xhtmlcompliant']) ? "W3C XHTML ".$theme['xhtmlcompliant'] : "Not Specified";
|
||||
$text .= ($theme['csscompliant']) ? " & CSS ".$theme['csscompliant'] : "";
|
||||
$text .= "</td></tr>";
|
||||
@@ -747,8 +741,8 @@ class themeHandler
|
||||
|
||||
$text .= "
|
||||
<tr>
|
||||
<td><b>".TPVLAN_53."</b></td>
|
||||
<td colspan='2'>";
|
||||
<td style='vertical-align:top; width:24%;'><b>".TPVLAN_53."</b></td>
|
||||
<td colspan='2' style='vertical-align:top width:auto;'>";
|
||||
|
||||
if(varset($theme['plugins']))
|
||||
{
|
||||
@@ -764,8 +758,8 @@ class themeHandler
|
||||
|
||||
$text .= "
|
||||
<tr>
|
||||
<td><b>".TPVLAN_30."</b></td>
|
||||
<td colspan='2'>
|
||||
<td style='vertical-align:top; width:24%;'><b>".TPVLAN_30."</b></td>
|
||||
<td colspan='2' style='vertical-align:top width:auto;'>
|
||||
<input type='radio' name='image_preload' value='1'".($pref['image_preload'] ? " checked='checked'" : "")." /> ".TPVLAN_28."
|
||||
<input type='radio' name='image_preload' value='0'".(!$pref['image_preload'] ? " checked='checked'" : "")." /> ".TPVLAN_29."
|
||||
</td>
|
||||
@@ -777,14 +771,14 @@ class themeHandler
|
||||
{
|
||||
|
||||
$itext = "<tr>
|
||||
<td><b>".TPVLAN_50."</b>:</td>
|
||||
<td colspan='2'>
|
||||
<td style='vertical-align:top; width:24%'><b>".TPVLAN_50."</b>:</td>
|
||||
<td colspan='2' style='vertical-align:top'>
|
||||
<table cellpadding='0' cellspacing='0' class='adminlist'>
|
||||
<colgroup span='2'>
|
||||
<col class='col-tm-layout-default' />
|
||||
<col class='col-tm-layout-name' />
|
||||
<col class='col-tm-layout-visibility' />
|
||||
<col class='col-tm-layout-preset' />
|
||||
<col class='col-tm-layout-default' style='width:10%' />
|
||||
<col class='col-tm-layout-name' style='width:20%' />
|
||||
<col class='col-tm-layout-visibility' style='width:35%' />
|
||||
<col class='col-tm-layout-preset' style='width:35%' />
|
||||
</colgroup>
|
||||
<tr>";
|
||||
$itext .= ($mode == 1) ? "<td class='center top'>".TPVLAN_55."</td>" : "";
|
||||
@@ -813,7 +807,7 @@ class themeHandler
|
||||
</td>";
|
||||
}
|
||||
|
||||
$itext .= "<td>";
|
||||
$itext .= "<td style='vertical-align:top'>";
|
||||
$itext .= ($val['@attributes']['previewFull']) ? "<a href='".e_THEME_ABS.$theme['path']."/".$val['@attributes']['previewFull']."' >" : "";
|
||||
$itext .= $val['@attributes']['title'];
|
||||
$itext .= ($val['@attributes']['previewFull']) ? "</a>" : "";
|
||||
@@ -841,9 +835,9 @@ class themeHandler
|
||||
|
||||
|
||||
$itext .= "</td>
|
||||
<td>";
|
||||
<td style='vertical-align:top'>";
|
||||
// Default
|
||||
$itext .= ($pref['sitetheme_deflayout'] != $key) ? $custompage_diz."<div class='e-hideme' id='element-to-be-shown'><textarea rows='6' cols='20' name='custompages[".$key."]' >".(isset($pref['sitetheme_custompages'][$key]) ? implode("\n",
|
||||
$itext .= ($pref['sitetheme_deflayout'] != $key) ? $custompage_diz."<div class='e-hideme' id='element-to-be-shown'><textarea style='width:97%' rows='6' cols='20' name='custompages[".$key."]' >".(isset($pref['sitetheme_custompages'][$key]) ? implode("\n",
|
||||
$pref['sitetheme_custompages'][$key]) : "")."</textarea></div>\n" : TPVLAN_55;
|
||||
|
||||
$itext .= "</td>";
|
||||
@@ -860,7 +854,7 @@ class themeHandler
|
||||
}
|
||||
|
||||
|
||||
// $itext .= !$mode ? "<tr><td><b>".TPVLAN_8."</b>:</td><td>".$previewbutton.$selectmainbutton.$selectadminbutton."</td></tr>" : "";
|
||||
// $itext .= !$mode ? "<tr><td style='vertical-align:top;width:24%'><b>".TPVLAN_8."</b>:</td><td style='vertical-align:top'>".$previewbutton.$selectmainbutton.$selectadminbutton."</td></tr>" : "";
|
||||
|
||||
if($mode == 2)
|
||||
{
|
||||
@@ -893,12 +887,12 @@ class themeHandler
|
||||
if(array_key_exists("multipleStylesheets", $theme) && $mode)
|
||||
{
|
||||
$text .= "
|
||||
<tr><td><b>".TPVLAN_22.":</b></td>
|
||||
<td colspan='2'>
|
||||
<table class='adminlist' >
|
||||
<tr><td style='vertical-align:top;'><b>".TPVLAN_22.":</b></td>
|
||||
<td colspan='2' style='vertical-align:top'>
|
||||
<table class='adminlist' style='width:100%' >
|
||||
<tr>
|
||||
<td class='center'>".TPVLAN_55."</td>
|
||||
<td>".TPVLAN_52."</td>
|
||||
<td class='center' style='width:10%'>".TPVLAN_55."</td>
|
||||
<td style='width:20%'>".TPVLAN_52."</td>
|
||||
<td class='left'>".TPVLAN_7."</td>
|
||||
</tr>";
|
||||
|
||||
@@ -1141,7 +1135,7 @@ class themeHandler
|
||||
$this->theme_adminlog('02', $pref['admintheme'].', '.$pref['admincss']);
|
||||
}
|
||||
|
||||
// $ns->tablerender("Admin Message", "<br /><div>".TPVLAN_40." <b>'".$themeArray[$this -> id]."'</b>.</div><br />");
|
||||
// $ns->tablerender("Admin Message", "<br /><div style='text-align:center;'>".TPVLAN_40." <b>'".$themeArray[$this -> id]."'</b>.</div><br />");
|
||||
// $this->showThemes('admin');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user