mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 06:38:00 +02:00
Theme Manager re-work.
This commit is contained in:
18
class2.php
18
class2.php
@@ -9,8 +9,8 @@
|
|||||||
* General purpose file
|
* General purpose file
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/class2.php,v $
|
* $Source: /cvs_backup/e107_0.8/class2.php,v $
|
||||||
* $Revision: 1.97 $
|
* $Revision: 1.98 $
|
||||||
* $Date: 2009-07-05 11:25:10 $
|
* $Date: 2009-07-06 05:59:42 $
|
||||||
* $Author: e107coders $
|
* $Author: e107coders $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -417,6 +417,7 @@ else
|
|||||||
$pref = $eArrayStorage->ReadArray($PrefCache);
|
$pref = $eArrayStorage->ReadArray($PrefCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$e107->set_base_path();
|
$e107->set_base_path();
|
||||||
|
|
||||||
// extract menu prefs
|
// extract menu prefs
|
||||||
@@ -705,6 +706,7 @@ if (!function_exists('checkvalidtheme'))
|
|||||||
list($action, $id) = explode('.', e_QUERY);
|
list($action, $id) = explode('.', e_QUERY);
|
||||||
require_once(e_HANDLER.'theme_handler.php');
|
require_once(e_HANDLER.'theme_handler.php');
|
||||||
$themeArray = themeHandler :: getThemes('id');
|
$themeArray = themeHandler :: getThemes('id');
|
||||||
|
|
||||||
define('PREVIEWTHEME', e_THEME.$themeArray[$id].'/');
|
define('PREVIEWTHEME', e_THEME.$themeArray[$id].'/');
|
||||||
define('PREVIEWTHEMENAME', $themeArray[$id]);
|
define('PREVIEWTHEMENAME', $themeArray[$id]);
|
||||||
define('THEME', e_THEME.$themeArray[$id].'/');
|
define('THEME', e_THEME.$themeArray[$id].'/');
|
||||||
@@ -947,6 +949,7 @@ if(!isset($_E107['no_menus']))
|
|||||||
$menu_data['menu_active'] = $eMenuActive;
|
$menu_data['menu_active'] = $eMenuActive;
|
||||||
$menu_data = $eArrayStorage->WriteArray($menu_data, false);
|
$menu_data = $eArrayStorage->WriteArray($menu_data, false);
|
||||||
$e107cache->set_sys('menus_'.USERCLASS_LIST.'_'.md5(e_LANGUAGE), $menu_data);
|
$e107cache->set_sys('menus_'.USERCLASS_LIST.'_'.md5(e_LANGUAGE), $menu_data);
|
||||||
|
|
||||||
unset($menu_data);
|
unset($menu_data);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1000,9 +1003,11 @@ if(!defined('THEME'))
|
|||||||
{
|
{
|
||||||
checkvalidtheme($pref['sitetheme']);
|
checkvalidtheme($pref['sitetheme']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$theme_pref = varset($pref['sitetheme_pref']);
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
@@ -1299,7 +1304,7 @@ function get_user_data($uid, $extra = '')
|
|||||||
|
|
||||||
function save_prefs($table = 'core', $uid = USERID, $row_val = '')
|
function save_prefs($table = 'core', $uid = USERID, $row_val = '')
|
||||||
{
|
{
|
||||||
global $pref, $user_pref, $tp, $PrefCache, $sql, $eArrayStorage;
|
global $pref, $user_pref, $tp, $PrefCache, $sql, $eArrayStorage, $theme_pref;
|
||||||
if ($table == 'core')
|
if ($table == 'core')
|
||||||
{
|
{
|
||||||
if ($row_val == '')
|
if ($row_val == '')
|
||||||
@@ -1321,6 +1326,11 @@ function save_prefs($table = 'core', $uid = USERID, $row_val = '')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elseif($table == "theme")
|
||||||
|
{
|
||||||
|
$pref['sitetheme_pref'] = $theme_pref;
|
||||||
|
save_prefs();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// $_user_pref = $tp -> toDB($user_pref);
|
// $_user_pref = $tp -> toDB($user_pref);
|
||||||
|
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_admin/menus.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_admin/menus.php,v $
|
||||||
| $Revision: 1.15 $
|
| $Revision: 1.16 $
|
||||||
| $Date: 2009-07-05 11:57:40 $
|
| $Date: 2009-07-06 05:59:42 $
|
||||||
| $Author: e107coders $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -262,6 +262,12 @@ if ($menu_act == 'config')
|
|||||||
|
|
||||||
if ($menu_act == "adv")
|
if ($menu_act == "adv")
|
||||||
{
|
{
|
||||||
|
showVisibility();
|
||||||
|
}
|
||||||
|
|
||||||
|
function showVisibility()
|
||||||
|
{
|
||||||
|
global $sql,$ns;
|
||||||
require_once(e_HANDLER."userclass_class.php");
|
require_once(e_HANDLER."userclass_class.php");
|
||||||
$sql->db_Select("menus", "*", "menu_id=".$id);
|
$sql->db_Select("menus", "*", "menu_id=".$id);
|
||||||
$row = $sql->db_Fetch();
|
$row = $sql->db_Fetch();
|
||||||
@@ -295,8 +301,12 @@ if ($menu_act == "adv")
|
|||||||
</div>";
|
</div>";
|
||||||
$caption = MENLAN_7." ".$row['menu_name'];
|
$caption = MENLAN_7." ".$row['menu_name'];
|
||||||
$ns->tablerender($caption, $text);
|
$ns->tablerender($caption, $text);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unset($message);
|
unset($message);
|
||||||
|
|
||||||
if ($menu_act == "sv")
|
if ($menu_act == "sv")
|
||||||
|
@@ -11,9 +11,9 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_admin/theme.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_admin/theme.php,v $
|
||||||
| $Revision: 1.1.1.1 $
|
| $Revision: 1.2 $
|
||||||
| $Date: 2006-12-02 04:33:28 $
|
| $Date: 2009-07-06 05:59:42 $
|
||||||
| $Author: mcfly_e107 $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -29,9 +29,43 @@ require_once("auth.php");
|
|||||||
require_once(e_HANDLER."theme_handler.php");
|
require_once(e_HANDLER."theme_handler.php");
|
||||||
$themec = new themeHandler;
|
$themec = new themeHandler;
|
||||||
|
|
||||||
|
$mode = e_QUERY;
|
||||||
|
|
||||||
|
if($_POST['selectadmin'])
|
||||||
|
{
|
||||||
|
$mode = "admin";
|
||||||
|
}
|
||||||
|
|
||||||
|
if($_POST['selectmain'])
|
||||||
|
{
|
||||||
|
$mode = "main";
|
||||||
|
}
|
||||||
|
|
||||||
|
$themec -> showThemes($mode);
|
||||||
|
|
||||||
|
|
||||||
$themec -> showThemes();
|
function theme_adminmenu()
|
||||||
|
{
|
||||||
|
$e107 = &e107::getInstance();
|
||||||
|
|
||||||
|
$var['main']['text'] = TPVLAN_33;
|
||||||
|
$var['main']['link'] = e_SELF;
|
||||||
|
|
||||||
|
$var['admin']['text'] = TPVLAN_34;
|
||||||
|
$var['admin']['link'] = e_SELF."?admin";
|
||||||
|
|
||||||
|
$var['choose']['text'] = TPVLAN_51;
|
||||||
|
$var['choose']['link'] = e_SELF."?choose";
|
||||||
|
|
||||||
|
$var['upload']['text'] = TPVLAN_38;
|
||||||
|
$var['upload']['link'] = e_SELF."?upload";
|
||||||
|
|
||||||
|
$selected = (e_QUERY) ? e_QUERY : "main";
|
||||||
|
|
||||||
|
|
||||||
|
e_admin_menu(TPVLAN_26, $selected, $var);
|
||||||
|
}
|
||||||
|
|
||||||
require_once("footer.php");
|
require_once("footer.php");
|
||||||
|
|
||||||
|
|
||||||
|
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/theme_handler.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/theme_handler.php,v $
|
||||||
| $Revision: 1.15 $
|
| $Revision: 1.16 $
|
||||||
| $Date: 2009-07-05 11:57:40 $
|
| $Date: 2009-07-06 05:59:42 $
|
||||||
| $Author: e107coders $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -24,11 +24,15 @@ class themeHandler{
|
|||||||
var $themeArray;
|
var $themeArray;
|
||||||
var $action;
|
var $action;
|
||||||
var $id;
|
var $id;
|
||||||
|
var $frm;
|
||||||
|
|
||||||
/* constructor */
|
/* constructor */
|
||||||
|
|
||||||
function themeHandler() {
|
function themeHandler() {
|
||||||
|
|
||||||
|
require_once(e_HANDLER."form_handler.php");
|
||||||
|
$this->frm = new e_form(); //enable inner tabindex counter
|
||||||
|
|
||||||
if (isset($_POST['upload'])) {
|
if (isset($_POST['upload'])) {
|
||||||
$this -> themeUpload();
|
$this -> themeUpload();
|
||||||
}
|
}
|
||||||
@@ -39,30 +43,35 @@ class themeHandler{
|
|||||||
{
|
{
|
||||||
if(strstr($key,"preview"))
|
if(strstr($key,"preview"))
|
||||||
{
|
{
|
||||||
$this -> id = str_replace("preview_", "", $key);
|
// $this -> id = str_replace("preview_", "", $key);
|
||||||
|
$this -> id = key($post);
|
||||||
$this -> themePreview();
|
$this -> themePreview();
|
||||||
}
|
}
|
||||||
if(strstr($key,"selectmain"))
|
if(strstr($key,"selectmain"))
|
||||||
{
|
{
|
||||||
$this -> id = str_replace("selectmain_", "", $key);
|
// $this -> id = str_replace("selectmain_", "", $key);
|
||||||
|
$this -> id = key($post);
|
||||||
$this -> setTheme();
|
$this -> setTheme();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strstr($key,"selectadmin"))
|
if(strstr($key,"selectadmin"))
|
||||||
{
|
{
|
||||||
$this -> id = str_replace("selectadmin_", "", $key);
|
$this -> id = key($post);
|
||||||
$this -> setAdminTheme();
|
$this -> setAdminTheme();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_POST['submit_adminstyle']))
|
if(isset($_POST['submit_adminstyle']))
|
||||||
{
|
{
|
||||||
|
$this -> id = $_POST['curTheme'];
|
||||||
$this -> setAdminStyle();
|
$this -> setAdminStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_POST['submit_style']))
|
if(isset($_POST['submit_style']))
|
||||||
{
|
{
|
||||||
|
$this -> id = $_POST['curTheme'];
|
||||||
$this -> setStyle();
|
$this -> setStyle();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -70,7 +79,7 @@ class themeHandler{
|
|||||||
function getThemes($mode=FALSE)
|
function getThemes($mode=FALSE)
|
||||||
{
|
{
|
||||||
$themeArray = array();
|
$themeArray = array();
|
||||||
$themeArray[0] = ""; // Fix for 'preview theme'.
|
|
||||||
$tloop = 1;
|
$tloop = 1;
|
||||||
$handle = opendir(e_THEME);
|
$handle = opendir(e_THEME);
|
||||||
while (false !== ($file = readdir($handle)))
|
while (false !== ($file = readdir($handle)))
|
||||||
@@ -208,12 +217,16 @@ class themeHandler{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showThemes()
|
function showThemes($mode='main')
|
||||||
{
|
{
|
||||||
global $ns, $pref;
|
global $ns, $pref;
|
||||||
echo "<div class='center'>
|
|
||||||
<form enctype='multipart/form-data' method='post' action='".e_SELF."'>\n";
|
|
||||||
|
|
||||||
|
echo "<div class='center'>
|
||||||
|
<form enctype='multipart/form-data' method='post' action='".e_SELF."?".$mode."'>\n";
|
||||||
|
|
||||||
|
|
||||||
|
if($mode == "main" || !$mode) // Show Main Configuration
|
||||||
|
{
|
||||||
foreach($this -> themeArray as $key => $theme)
|
foreach($this -> themeArray as $key => $theme)
|
||||||
{
|
{
|
||||||
if($key == $pref['sitetheme'])
|
if($key == $pref['sitetheme'])
|
||||||
@@ -223,6 +236,10 @@ class themeHandler{
|
|||||||
}
|
}
|
||||||
|
|
||||||
$ns->tablerender(TPVLAN_26." :: ".TPVLAN_33, $text);
|
$ns->tablerender(TPVLAN_26." :: ".TPVLAN_33, $text);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($mode == "admin") // Show Admin Configuration
|
||||||
|
{
|
||||||
|
|
||||||
foreach($this -> themeArray as $key => $theme)
|
foreach($this -> themeArray as $key => $theme)
|
||||||
{
|
{
|
||||||
@@ -232,8 +249,11 @@ class themeHandler{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$ns->tablerender(TPVLAN_26." :: ".TPVLAN_34, $text);
|
$ns->tablerender(TPVLAN_26." :: ".TPVLAN_34, $text);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($mode == "upload") // Show Upload Form
|
||||||
|
{
|
||||||
if(!is_writable(e_THEME)) {
|
if(!is_writable(e_THEME)) {
|
||||||
$ns->tablerender(TPVLAN_16, TPVLAN_15);
|
$ns->tablerender(TPVLAN_16, TPVLAN_15);
|
||||||
$text = "";
|
$text = "";
|
||||||
@@ -254,8 +274,10 @@ class themeHandler{
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan='2' style='text-align:center' class='forumheader'>
|
<td colspan='2' style='text-align:center' class='forumheader'>";
|
||||||
<input class='button' type='submit' name='upload' value='".TPVLAN_14."' />
|
|
||||||
|
$text .= $this->frm->admin_button('upload', TPVLAN_14, 'submit');
|
||||||
|
$text .= "
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -263,76 +285,55 @@ class themeHandler{
|
|||||||
}
|
}
|
||||||
|
|
||||||
$ns->tablerender(TPVLAN_26." :: ".TPVLAN_38, $text);
|
$ns->tablerender(TPVLAN_26." :: ".TPVLAN_38, $text);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($mode == "choose") // Show All Themes
|
||||||
|
{
|
||||||
$text = "";
|
$text = "";
|
||||||
foreach($this -> themeArray as $key => $theme)
|
foreach($this -> themeArray as $key => $theme)
|
||||||
{
|
{
|
||||||
if($key != $pref['admintheme'] && $key != $pref['sitetheme'])
|
// if($key != $pref['admintheme'] && $key != $pref['sitetheme'])
|
||||||
{
|
// {
|
||||||
$text .= $this -> renderTheme(FALSE, $theme);
|
$text .= $this -> renderTheme(FALSE, $theme);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$ns->tablerender(TPVLAN_26." :: ".TPVLAN_39, $text);
|
$ns->tablerender(TPVLAN_26." :: ".TPVLAN_39, $text);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
echo "</form>\n</div>\n";
|
echo "</form>\n</div>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function renderThemeInfo($theme)
|
||||||
|
|
||||||
|
|
||||||
function renderTheme($mode=FALSE, $theme)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
// TO-DO : This SHOULD be loaded by ajax before release.
|
||||||
mode = 0 :: normal
|
|
||||||
mode = 1 :: selected site theme
|
|
||||||
mode = 2 :: selected admin theme
|
|
||||||
*/
|
|
||||||
|
|
||||||
define("IMAGE_CHECK","<img src='".e_IMAGE_ABS."generic/check.png' style='border:0px;vertical-align:middle' alt='' />");
|
|
||||||
|
|
||||||
global $ns, $pref, $imode;
|
|
||||||
|
|
||||||
|
global $pref;
|
||||||
$author = ($theme['email'] ? "<a href='mailto:".$theme['email']."' title='".$theme['email']."'>".$theme['author']."</a>" : $theme['author']);
|
$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>" : "");
|
$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']."' style='border: 1px solid #000;width:200px' alt='' />" : "<img src='".e_IMAGE_ABS."admin_images/nopreview.png' style='border:0px' 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' style='border:0px' title='".TPVLAN_12."' alt='' />")."</a>";
|
||||||
$selectmainbutton = ($mode != 1 ? "<input class='button' type='submit' name='selectmain_".$theme['id']."' value='".TPVLAN_10."' />" : "");
|
|
||||||
$selectadminbutton = ($mode != 2 ? "<input class='button' type='submit' name='selectadmin_".$theme['id']."' value='".TPVLAN_32."' />" : "");
|
|
||||||
$previewbutton = (!$mode ? "<input class='button' type='submit' name='preview_".$theme['id']."' value='".TPVLAN_9."' /> " : "");
|
|
||||||
|
|
||||||
$text = "<div style='text-align:center;margin-left:auto;margin-right:auto'>
|
|
||||||
<table style='".ADMIN_WIDTH."' class='fborder'>
|
|
||||||
<tr>
|
|
||||||
<td class='forumheader3' style='width:202px; text-align:center; vertical-align:top'>$preview
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<b><span class='mediumtext'>".$theme['name']."</span></b><br />".TPVLAN_11." ".$theme['version']."
|
|
||||||
<br />
|
|
||||||
</td>
|
|
||||||
<td class='forumheader3' style='vertical-align:top'>";
|
|
||||||
|
|
||||||
$itext = $author ? "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_4."</b>:</td><td style='vertical-align:top'>".$author."</td></tr>" : "";
|
$text = "<div style='font-weight:bold;margin-bottom:10px'>".TPVLAN_7."</div>
|
||||||
$itext .= $website ? "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_5."</b>:</td><td style='vertical-align:top'>".$website."</td></tr>" : "";
|
<table class='adminlist' cellpadding='4'>";
|
||||||
$itext .= $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 .= $author ? "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_4."</b>:</td><td style='vertical-align:top'>".$author."</td></tr>" : "";
|
||||||
$itext .= "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_49."</b>:</td>
|
$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 ";
|
<td style='vertical-align:top'>XHTML ";
|
||||||
$itext .= ($theme['xhtmlcompliant']) ? IMAGE_CHECK : "X";
|
$text .= ($theme['xhtmlcompliant']) ? ADMIN_TRUE_ICON : ADMIN_FALSE_ICON;
|
||||||
$itext .= " CSS ";
|
$text .= " CSS ";
|
||||||
$itext .= ($theme['csscompliant']) ? IMAGE_CHECK : "X";
|
$text .= ($theme['csscompliant']) ? ADMIN_TRUE_ICON : ADMIN_FALSE_ICON;
|
||||||
$itext .= "</td></tr>";
|
$text .= "</td></tr>";
|
||||||
if($theme['xhtmlcompliant'] || $theme['xhtmlcompliant'])
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$itext .= $theme['info'] ? "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_7."</b>:</td><td style='vertical-align:top'>".$theme['info']."</td></tr>" : "";
|
|
||||||
|
|
||||||
if($theme['layouts']) // New in 0.8 WORK IN PROGRESS ----
|
if($theme['layouts']) // New in 0.8 WORK IN PROGRESS ----
|
||||||
{
|
{
|
||||||
$itext .= "<tr>
|
$itext .= "<tr>
|
||||||
<td style='vertical-align:top; width:24%'><b>".TPVLAN_50."</b>:</td>
|
<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;width:400px' >
|
<td style='vertical-align:top'><table class='fborder' style='margin-left:0px;margin-right:auto' >
|
||||||
<tr>";
|
<tr>";
|
||||||
$itext .= ($mode == 1) ? "<td class='fcaption' style='text-align:center;vertical-align:top;'>Default</td>" : "";
|
$itext .= ($mode == 1) ? "<td class='fcaption' style='text-align:center;vertical-align:top;'>Default</td>" : "";
|
||||||
$itext .= "
|
$itext .= "
|
||||||
@@ -366,7 +367,172 @@ class themeHandler{
|
|||||||
$itext .= "</td>
|
$itext .= "</td>
|
||||||
<td style='vertical-align:top'>".$val['@attributes']['requiredPlugins']." </td>
|
<td style='vertical-align:top'>".$val['@attributes']['requiredPlugins']." </td>
|
||||||
<td style='vertical-align:top;text-align:center'>";
|
<td style='vertical-align:top;text-align:center'>";
|
||||||
$itext .= ($val['menuPresets']) ? IMAGE_CHECK : " ";
|
$itext .= ($val['menuPresets']) ? ADMIN_TRUE_ICON: " ";
|
||||||
|
$itext .= "</td>
|
||||||
|
</tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$itext .= "</table></td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$text .= "<tr><td><b>".TPVLAN_22.": </b></td><td colspan='2'>";
|
||||||
|
foreach($theme['css'] as $val)
|
||||||
|
{
|
||||||
|
$text .= $val['name']."<br />";
|
||||||
|
}
|
||||||
|
$text .= "</td></tr>";
|
||||||
|
|
||||||
|
$text .= $itext."</table>";
|
||||||
|
$text .= "<div class='right'><a href='#themeInfo_".$theme['id']."' class='e-expandit'>Close</a></div>";
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderThemeConfig() // process custom theme configuration - TODO.
|
||||||
|
{
|
||||||
|
$confile = e_THEME.$this->id."/".$this->id."_config.php";
|
||||||
|
if(is_readable($confile))
|
||||||
|
{
|
||||||
|
include_once($confile);
|
||||||
|
if(function_exists($this->id."_config"))
|
||||||
|
{
|
||||||
|
$var = call_user_func($this->id."_config");
|
||||||
|
foreach($var as $val)
|
||||||
|
{
|
||||||
|
$text .= "<tr><td><b>".$val['caption']."</b>:</td><td>".$val['html']."</td></tr>";
|
||||||
|
}
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setThemeConfig()
|
||||||
|
{
|
||||||
|
$confile = e_THEME.$this->id."/".$this->id."_config.php";
|
||||||
|
|
||||||
|
include($confile);
|
||||||
|
if(function_exists($this->id."_process"))
|
||||||
|
{
|
||||||
|
$text = call_user_func($this->id."_process");
|
||||||
|
}
|
||||||
|
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderTheme($mode=FALSE, $theme)
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
mode = 0 :: normal
|
||||||
|
mode = 1 :: selected site theme
|
||||||
|
mode = 2 :: selected admin theme
|
||||||
|
*/
|
||||||
|
|
||||||
|
global $ns, $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']."' style='border: 1px solid #000;width:200px' alt='' />" : "<img src='".e_IMAGE_ABS."admin_images/nopreview.png' style='border:0px' 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 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' style='height:16px' title='Click to select columns to display'><img src='".e_IMAGE_ABS."admin_images/info_16.png' alt='' title=\"".TPVLAN_7."\" style='border:0px; vertical-align:middle;' /></a>\n";
|
||||||
|
$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 style='vertical-align:middle;' 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']."' style='border: 0px;width:200px;height:160px;' alt='' />" : "<img src='".e_IMAGE_ABS."admin_images/nopreview.png' style='width:200px;height:160px;border:0px' title='".TPVLAN_12."' alt='' />")."</a>";
|
||||||
|
|
||||||
|
|
||||||
|
if(!$mode) // Choose a Theme to Install.
|
||||||
|
{
|
||||||
|
// 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' 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->id = $theme['path'];
|
||||||
|
|
||||||
|
$text = "<div style='text-align:center;margin-left:auto;margin-right:auto'>
|
||||||
|
<table class='adminlist'>
|
||||||
|
<tr><td colspan='2'><h1>".$theme['name']."</h1></td></tr>
|
||||||
|
<tr><td><b>".TPVLAN_11."</b></td><td>".$theme['version']."</td>
|
||||||
|
<td class='first last' rowspan='6' style='text-align:center;width:25%'>$newpreview </td></tr>";
|
||||||
|
|
||||||
|
$text .= "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_4."</b>:</td><td style='vertical-align:top'>".$author."</td></tr>";
|
||||||
|
$text .= "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_5."</b>:</td><td style='vertical-align:top'>".$website."</td></tr>";
|
||||||
|
$text .= "<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 : "X";
|
||||||
|
$text .= " CSS ";
|
||||||
|
$text .= ($theme['csscompliant']) ? ADMIN_TRUE_ICON : "X";
|
||||||
|
$text .= "</td></tr>";
|
||||||
|
$text .= "<tr><td style='vertical-align:top; width:24%'><b>".TPVLAN_7."</b>:</td><td style='vertical-align:top'>".$theme['info']."</td></tr>
|
||||||
|
";
|
||||||
|
|
||||||
|
if($mode == 1)
|
||||||
|
{
|
||||||
|
$text .= "
|
||||||
|
<tr>
|
||||||
|
<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>
|
||||||
|
</tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($theme['layouts']) // New in 0.8 WORK IN PROGRESS ----
|
||||||
|
{
|
||||||
|
$itext .= "<tr>
|
||||||
|
<td style='vertical-align:top; width:24%'><b>".TPVLAN_50."</b>:</td>
|
||||||
|
<td colspan='2' style='vertical-align:top'>
|
||||||
|
<table class='adminlist' style='auto;width:100%' >
|
||||||
|
<tr>";
|
||||||
|
$itext .= ($mode == 1) ? "<td class='fcaption' style='width:15%;text-align:center;vertical-align:top;'>Default</td>" : "";
|
||||||
|
$itext .= "
|
||||||
|
<td class='fcaption' style='width:30%'>Title</td>
|
||||||
|
<td class='fcaption' style='width:30%'>Requirements</td>
|
||||||
|
<td class='fcaption' style='text-align:center;width:100px'>Menu Preset</td>
|
||||||
|
</tr>\n";
|
||||||
|
|
||||||
|
foreach($theme['layouts'] as $key=>$val)
|
||||||
|
{
|
||||||
|
$itext .= "
|
||||||
|
<tr>";
|
||||||
|
if($mode == 1)
|
||||||
|
{
|
||||||
|
if(!$pref['sitetheme_deflayout'])
|
||||||
|
{
|
||||||
|
$pref['sitetheme_deflayout'] = ($val['@attributes']['default']=='true') ? $key : "";
|
||||||
|
// echo "------------- NODEFAULT";
|
||||||
|
}
|
||||||
|
$itext .= "
|
||||||
|
<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 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 style='vertical-align:top'>".$val['@attributes']['requiredPlugins']." </td>
|
||||||
|
<td style='vertical-align:top;text-align:center'>";
|
||||||
|
$itext .= ($val['menuPresets']) ? ADMIN_TRUE_ICON : " ";
|
||||||
$itext .= "</td>
|
$itext .= "</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
}
|
||||||
@@ -375,65 +541,54 @@ class themeHandler{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$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>" : "";
|
// $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 ($itext) {
|
$text .= $itext;
|
||||||
$text .= "<table cellspacing='3' style='width:97%'>".$itext."</table>";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(array_key_exists("multipleStylesheets", $theme))
|
if(array_key_exists("multipleStylesheets", $theme) && $mode)
|
||||||
{
|
{
|
||||||
if($mode)
|
$text .= "
|
||||||
{
|
<tr><td style='vertical-align:top;'><b>".TPVLAN_22.":</b></td><td colspan='2' style='vertical-align:top'>
|
||||||
$text .= "<table cellspacing='3' style='width:97%'>
|
<table class='adminlist' style='width:100%' >
|
||||||
<tr><td style='vertical-align:top; width:50%;'><b>".TPVLAN_27.":</b></td><td style='vertical-align:top width:50%;'>\n";
|
<tr>
|
||||||
|
<td class='fcaption center' style='width:15%'>Default</td>
|
||||||
|
<td class='fcaption' style='width:30%'>Title</td>
|
||||||
|
<td class='fcaption' style='text-align:center'>Description</td>
|
||||||
|
</tr>\n";
|
||||||
|
|
||||||
foreach($theme['css'] as $css)
|
foreach($theme['css'] as $css)
|
||||||
{
|
{
|
||||||
|
$text .= "<tr>\n";
|
||||||
if($mode == 2)
|
if($mode == 2)
|
||||||
{
|
{
|
||||||
if (!$css['nonadmin']) {
|
if (!$css['nonadmin']) {
|
||||||
$text .= "
|
$text .= "
|
||||||
<input type='radio' name='admincss' value='".$css['name']."' ".($pref['admincss'] == $css['name'] || (!$pref['admincss'] && $css['name'] == "style.css") ? " checked='checked'" : "")." /><b>".$css['name'].":</b><br />".($css['info'] ? $css['info'] : ($css['name'] == "style.css" ? TPVLAN_23 : TPVLAN_24))."<br />\n";
|
<td class='center'>
|
||||||
|
<input type='radio' name='admincss' value='".$css['name']."' ".($pref['admincss'] == $css['name'] || (!$pref['admincss'] && $css['name'] == "style.css") ? " checked='checked'" : "")." />
|
||||||
|
</td>
|
||||||
|
<td>".$css['name']."</td>
|
||||||
|
<td>".($css['info'] ? $css['info'] : ($css['name'] == "style.css" ? TPVLAN_23 : TPVLAN_24))."</td>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($mode == 1)
|
if($mode == 1)
|
||||||
{
|
{
|
||||||
$text .= "
|
$text .= "
|
||||||
<input type='radio' name='themecss' value='".$css['name']."' ".($pref['themecss'] == $css['name'] || (!$pref['themecss'] && $css['name'] == "style.css") ? " checked='checked'" : "")." /><b>".$css['name'].":</b><br />".($css['info'] ? $css['info'] : ($css['name'] == "style.css" ? TPVLAN_23 : TPVLAN_24))."<br />\n";
|
<td class='center'>
|
||||||
}
|
<input type='radio' name='themecss' value='".$css['name']."' ".($pref['themecss'] == $css['name'] || (!$pref['themecss'] && $css['name'] == "style.css") ? " checked='checked'" : "")." />
|
||||||
}
|
|
||||||
$text .= "</td></tr></table>";
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$text .= "<br /><table style='width:97%' cellspacing='3'><tr><td colspan='2'><b>".TPVLAN_22.": </b></td></tr>";
|
|
||||||
foreach($theme['css'] as $css)
|
|
||||||
{
|
|
||||||
$text .= "<tr><td style='width:24%;vertical-align:top'><b>".$css['name'].":</b></td><td> ".($css['info'] ? $css['info'] : ($css['name'] == "style.css" ? TPVLAN_23 : TPVLAN_24))."</td></tr>\n";
|
|
||||||
}
|
|
||||||
$text .= "</table><br />\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if($mode == 1)
|
|
||||||
{
|
|
||||||
$text .= "<table cellspacing='3' style='width:97%'>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td style='vertical-align:top; width:24%;'><b>".TPVLAN_30."</b></td><td 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>
|
</td>
|
||||||
</tr>
|
<td>".$css['name']."
|
||||||
<tr>
|
</td>
|
||||||
<td colspan='2' class='center'>
|
<td>".($css['info'] ? $css['info'] : ($css['name'] == "style.css" ? TPVLAN_23 : TPVLAN_24))."</td>\n";
|
||||||
<input class='button' type='submit' name='submit_style' value='".TPVLAN_35."' /> ".$selectadminbutton."
|
|
||||||
</td></tr></table>";
|
|
||||||
}
|
}
|
||||||
|
$text .= "</tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$text .= "</table></td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if($mode == 2)
|
if($mode == 2)
|
||||||
{
|
{
|
||||||
@@ -453,20 +608,51 @@ class themeHandler{
|
|||||||
}
|
}
|
||||||
$astext .= "</select>";
|
$astext .= "</select>";
|
||||||
|
|
||||||
$text .= "<br /><br /><table cellspacing='3' style='width:97%'>
|
$text .= "
|
||||||
<tr><td style='vertical-align:top; width:50%;'><b>".TPVLAN_41.":</b></td><td style='vertical-align:top width:50%;'>$astext</td></tr>
|
<tr>
|
||||||
<tr><td colspan='2' class='center'>
|
<td style='vertical-align:top'><b>".TPVLAN_41.":</b></td>
|
||||||
<input class='button' type='submit' name='submit_adminstyle' value='".TPVLAN_42."' /> ".$selectmainbutton."
|
<td style='vertical-align:top'>".$astext."</td>
|
||||||
</td></tr></table>\n";
|
</tr>
|
||||||
|
\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$text .= "</td></tr></table></div>\n";
|
$text .= $this->renderThemeConfig();
|
||||||
|
|
||||||
|
|
||||||
|
$text .= "</table>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='center buttons-bar'>";
|
||||||
|
|
||||||
|
if($mode == 2) // admin
|
||||||
|
{
|
||||||
|
$mainid = "selectmain[".$theme['id']."]";
|
||||||
|
$text .= $this->frm->admin_button('submit_style', TPVLAN_35, 'update');
|
||||||
|
$text .= $this->frm->admin_button($mainid, TPVLAN_10, 'submit');
|
||||||
|
|
||||||
|
}
|
||||||
|
else // main
|
||||||
|
{
|
||||||
|
$adminid = "selectadmin[".$theme['id']."]";
|
||||||
|
$text .= $this->frm->admin_button('submit_style', TPVLAN_35, 'update');
|
||||||
|
$text .= $this->frm->admin_button($adminid, TPVLAN_32, 'submit');
|
||||||
|
}
|
||||||
|
|
||||||
|
$text .= "<input type='hidden' name='curTheme' value='".$theme['path']."' />";
|
||||||
|
|
||||||
|
$text .= "
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>\n";
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
function themePreview()
|
function themePreview()
|
||||||
{
|
{
|
||||||
echo "<script type='text/javascript'>document.location.href='".e_BASE."news.php?themepreview.".$this -> id."'</script>\n";
|
echo "<script type='text/javascript'>document.location.href='".e_BASE."index.php?themepreview.".$this -> id."'</script>\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -488,6 +674,8 @@ class themeHandler{
|
|||||||
$pref['sitetheme_deflayout'] = $this->findDefault($themeArray[$this -> id]);
|
$pref['sitetheme_deflayout'] = $this->findDefault($themeArray[$this -> id]);
|
||||||
$pref['sitetheme_layouts'] = is_array($this->themeArray[$pref['sitetheme']]['layouts']) ? $this->themeArray[$pref['sitetheme']]['layouts'] : array();
|
$pref['sitetheme_layouts'] = is_array($this->themeArray[$pref['sitetheme']]['layouts']) ? $this->themeArray[$pref['sitetheme']]['layouts'] : array();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$e107cache->clear_sys();
|
$e107cache->clear_sys();
|
||||||
save_prefs();
|
save_prefs();
|
||||||
|
|
||||||
@@ -522,6 +710,7 @@ class themeHandler{
|
|||||||
save_prefs();
|
save_prefs();
|
||||||
$this->theme_adminlog('02',$pref['admintheme'].', '.$pref['admincss']);
|
$this->theme_adminlog('02',$pref['admintheme'].', '.$pref['admincss']);
|
||||||
$ns->tablerender("Admin Message", "<br /><div style='text-align:center;'>".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');
|
||||||
}
|
}
|
||||||
|
|
||||||
function setStyle()
|
function setStyle()
|
||||||
@@ -533,8 +722,9 @@ class themeHandler{
|
|||||||
|
|
||||||
$e107cache->clear_sys();
|
$e107cache->clear_sys();
|
||||||
save_prefs();
|
save_prefs();
|
||||||
|
$custom_message = $this -> setThemeConfig();
|
||||||
$this->theme_adminlog('03',$pref['image_preload'].', '.$pref['themecss']);
|
$this->theme_adminlog('03',$pref['image_preload'].', '.$pref['themecss']);
|
||||||
$ns->tablerender(TPVLAN_36, "<br /><div style='text-align:center;'>".TPVLAN_37.".</div><br />");
|
$ns->tablerender(TPVLAN_36, "<br /><div style='text-align:center;'>".TPVLAN_37.".<br />".$custom_message."</div><br />");
|
||||||
}
|
}
|
||||||
|
|
||||||
function setAdminStyle()
|
function setAdminStyle()
|
||||||
@@ -590,6 +780,8 @@ class themeHandler{
|
|||||||
{
|
{
|
||||||
unset($themeArray);
|
unset($themeArray);
|
||||||
}
|
}
|
||||||
|
$themeArray['path'] = $path;
|
||||||
|
|
||||||
return $themeArray;
|
return $themeArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -631,8 +823,9 @@ class themeHandler{
|
|||||||
$lays[$name] = $val;
|
$lays[$name] = $val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$vars['layouts'] = $lays;
|
|
||||||
|
|
||||||
|
$vars['layouts'] = $lays;
|
||||||
|
$vars['path'] = $path;
|
||||||
return $vars;
|
return $vars;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4,8 +4,8 @@
|
|||||||
| e107 website system - Language File.
|
| e107 website system - Language File.
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_theme.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_theme.php,v $
|
||||||
| $Revision: 1.3 $
|
| $Revision: 1.4 $
|
||||||
| $Date: 2008-11-17 07:17:23 $
|
| $Date: 2009-07-06 05:59:42 $
|
||||||
| $Author: e107coders $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -33,7 +33,7 @@ define("TPVLAN_20", "Auto theme upload and extraction is disabled as your themes
|
|||||||
|
|
||||||
define("TPVLAN_21", "This is the currently selected site theme");
|
define("TPVLAN_21", "This is the currently selected site theme");
|
||||||
|
|
||||||
define("TPVLAN_22", "This theme has multiple stylesheets");
|
define("TPVLAN_22", "Stylesheets");
|
||||||
define("TPVLAN_23", "default stylesheet");
|
define("TPVLAN_23", "default stylesheet");
|
||||||
define("TPVLAN_24", "no information");
|
define("TPVLAN_24", "no information");
|
||||||
define("TPVLAN_25", "To choose which stylesheet to use, please go to <a href='".e_ADMIN."prefs.php'>preferences</a> and click on 'Theme'.");
|
define("TPVLAN_25", "To choose which stylesheet to use, please go to <a href='".e_ADMIN."prefs.php'>preferences</a> and click on 'Theme'.");
|
||||||
@@ -47,8 +47,8 @@ define("TPVLAN_30", "Preload Theme Images:");
|
|||||||
define("TPVLAN_31", "This is the currently selected admin theme");
|
define("TPVLAN_31", "This is the currently selected admin theme");
|
||||||
define("TPVLAN_32", "Set As Admin Theme");
|
define("TPVLAN_32", "Set As Admin Theme");
|
||||||
|
|
||||||
define("TPVLAN_33", "Current Site Theme");
|
define("TPVLAN_33", "Site Theme Configuration");
|
||||||
define("TPVLAN_34", "Current Admin Theme");
|
define("TPVLAN_34", "Admin Theme Configuration");
|
||||||
define("TPVLAN_35", "Save options");
|
define("TPVLAN_35", "Save options");
|
||||||
define("TPVLAN_36", "Admin Message");
|
define("TPVLAN_36", "Admin Message");
|
||||||
define("TPVLAN_37", "Theme options saved");
|
define("TPVLAN_37", "Theme options saved");
|
||||||
@@ -66,6 +66,7 @@ define("TPVLAN_48", "code:");
|
|||||||
|
|
||||||
define("TPVLAN_49", "Compliance");
|
define("TPVLAN_49", "Compliance");
|
||||||
define("TPVLAN_50", "Layouts");
|
define("TPVLAN_50", "Layouts");
|
||||||
|
define("TPVLAN_51", "Change Theme");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -641,6 +641,7 @@ button.cancel:focus span {}
|
|||||||
button.cancel:active span {}
|
button.cancel:active span {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.buttons-bar { padding: 10px 0px; }
|
.buttons-bar { padding: 10px 0px; }
|
||||||
.buttons-bar button { margin-right: 10px; }
|
.buttons-bar button { margin-right: 10px; }
|
||||||
.buttons-bar button.f-right { margin-right: 0px; }
|
.buttons-bar button.f-right { margin-right: 0px; }
|
||||||
|
@@ -11,9 +11,9 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_themes/jayya/theme.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_themes/jayya/theme.php,v $
|
||||||
| $Revision: 1.6 $
|
| $Revision: 1.7 $
|
||||||
| $Date: 2009-04-27 10:52:42 $
|
| $Date: 2009-07-06 05:59:42 $
|
||||||
| $Author: secretr $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -29,13 +29,14 @@ include_lan(e_THEME."jayya/languages/".e_LANGUAGE.".php");
|
|||||||
|
|
||||||
$themename = "Jayya";
|
$themename = "Jayya";
|
||||||
$themeversion = "1.0";
|
$themeversion = "1.0";
|
||||||
$themeauthor = "";
|
$themeauthor = "e107devs";
|
||||||
$themedate = "";
|
$themedate = "";
|
||||||
$themeinfo = "";
|
$themeinfo = "";
|
||||||
$xhtmlcompliant = TRUE;
|
$xhtmlcompliant = TRUE;
|
||||||
$csscompliant = TRUE;
|
$csscompliant = TRUE;
|
||||||
define("THEME_DISCLAIMER", "");
|
define("THEME_DISCLAIMER", "");
|
||||||
define("IMODE", "lite");
|
define("IMODE", "lite");
|
||||||
|
define("STANDARDS_MODE", TRUE);
|
||||||
|
|
||||||
// [dont render core style sheet link]
|
// [dont render core style sheet link]
|
||||||
$no_core_css = TRUE;
|
$no_core_css = TRUE;
|
||||||
|
Reference in New Issue
Block a user