mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 06:07:32 +02:00
Some theme-manager fixes, theme-preview fixes etc. Had to move up theme-loading before menu loading in class2.php. Let's hope it doesn't break anything.
This commit is contained in:
112
class2.php
112
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.106 $
|
* $Revision: 1.107 $
|
||||||
* $Date: 2009-07-11 01:48:40 $
|
* $Date: 2009-07-12 14:44:56 $
|
||||||
* $Author: e107coders $
|
* $Author: e107coders $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -696,6 +696,7 @@ $sql->db_Mark_Time('Start: Load Theme');
|
|||||||
//########### Module redefinable functions ###############
|
//########### Module redefinable functions ###############
|
||||||
if (!function_exists('checkvalidtheme'))
|
if (!function_exists('checkvalidtheme'))
|
||||||
{
|
{
|
||||||
|
|
||||||
function checkvalidtheme($theme_check)
|
function checkvalidtheme($theme_check)
|
||||||
{
|
{
|
||||||
// arg1 = theme to check
|
// arg1 = theme to check
|
||||||
@@ -704,8 +705,13 @@ if (!function_exists('checkvalidtheme'))
|
|||||||
if (ADMIN && strpos(e_QUERY, 'themepreview') !== false)
|
if (ADMIN && strpos(e_QUERY, 'themepreview') !== false)
|
||||||
{
|
{
|
||||||
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');
|
$themeobj = new themeHandler;
|
||||||
|
$themeArray = $themeobj->getThemes('id');
|
||||||
|
$themeDef = $themeobj->findDefault($themeArray[$id]);
|
||||||
|
|
||||||
|
define('THEME_LAYOUT',$themeDef);
|
||||||
|
|
||||||
define('PREVIEWTHEME', e_THEME.$themeArray[$id].'/');
|
define('PREVIEWTHEME', e_THEME.$themeArray[$id].'/');
|
||||||
define('PREVIEWTHEMENAME', $themeArray[$id]);
|
define('PREVIEWTHEMENAME', $themeArray[$id]);
|
||||||
@@ -926,6 +932,56 @@ if (isset($_COOKIE['e107_tzOffset']))
|
|||||||
define('TIMEOFFSET', $e_deltaTime);
|
define('TIMEOFFSET', $e_deltaTime);
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
$sql->db_Mark_Time('(Start: Find/Load Theme)');
|
||||||
|
|
||||||
|
|
||||||
|
// Work out which theme to use
|
||||||
|
//----------------------------
|
||||||
|
// The following files are assumed to use admin theme:
|
||||||
|
// 1. Any file in the admin directory (check for non-plugin added to avoid mismatches)
|
||||||
|
// 2. any plugin file starting with 'admin_'
|
||||||
|
// 3. any plugin file in a folder called admin/
|
||||||
|
// 4. any file that specifies $eplug_admin = TRUE;
|
||||||
|
//
|
||||||
|
// e_SELF has the full HTML path
|
||||||
|
$inAdminDir = FALSE;
|
||||||
|
$isPluginDir = strpos(e_SELF,'/'.$PLUGINS_DIRECTORY) !== FALSE; // True if we're in a plugin
|
||||||
|
$e107Path = str_replace($e107->base_path, '', e_SELF); // Knock off the initial bits
|
||||||
|
if (
|
||||||
|
(!$isPluginDir && strpos($e107Path, $ADMIN_DIRECTORY) === 0 ) // Core admin directory
|
||||||
|
|| ($isPluginDir && (strpos(e_PAGE,'admin_') === 0 || strpos($e107Path, 'admin/') !== false)) // Plugin admin file or directory
|
||||||
|
|| (varsettrue($eplug_admin)) // Admin forced
|
||||||
|
)
|
||||||
|
{
|
||||||
|
$inAdminDir = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(!defined('THEME'))
|
||||||
|
{
|
||||||
|
if ($inAdminDir && varsettrue($pref['admintheme'])&& (strpos(e_SELF.'?'.e_QUERY, 'menus.php?configure') === false))
|
||||||
|
{
|
||||||
|
/* if (strpos(e_SELF, "newspost.php") !== FALSE)
|
||||||
|
{
|
||||||
|
define("MAINTHEME", e_THEME.$pref['sitetheme']."/"); MAINTHEME no longer used in core distribution
|
||||||
|
} */
|
||||||
|
checkvalidtheme($pref['admintheme']);
|
||||||
|
}
|
||||||
|
elseif (USERTHEME !== false && USERTHEME != 'USERTHEME' && !$inAdminDir)
|
||||||
|
{
|
||||||
|
checkvalidtheme(USERTHEME);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
checkvalidtheme($pref['sitetheme']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$theme_pref = varset($pref['sitetheme_pref']);
|
||||||
|
// --------------------------------------------------------------
|
||||||
|
$sql->db_Mark_Time('(Start: Find/Load Theme-Layout)'); // needs to run after checkvalidtheme() (for theme previewing).
|
||||||
|
|
||||||
if(!defined("THEME_LAYOUT"))
|
if(!defined("THEME_LAYOUT"))
|
||||||
{
|
{
|
||||||
@@ -934,6 +990,8 @@ if(!defined("THEME_LAYOUT"))
|
|||||||
|
|
||||||
if(is_array($cusPagePref)) // check if we match a page in layout custompages.
|
if(is_array($cusPagePref)) // check if we match a page in layout custompages.
|
||||||
{
|
{
|
||||||
|
// print_r($cusPagePref);
|
||||||
|
|
||||||
foreach($cusPagePref as $lyout=>$cusPageArray)
|
foreach($cusPagePref as $lyout=>$cusPageArray)
|
||||||
{
|
{
|
||||||
foreach($cusPageArray as $kpage)
|
foreach($cusPageArray as $kpage)
|
||||||
@@ -1010,56 +1068,8 @@ if(!isset($_E107['no_menus']))
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
$sql->db_Mark_Time('(Start: Find/Load Theme)');
|
|
||||||
|
|
||||||
|
|
||||||
// Work out which theme to use
|
|
||||||
//----------------------------
|
|
||||||
// The following files are assumed to use admin theme:
|
|
||||||
// 1. Any file in the admin directory (check for non-plugin added to avoid mismatches)
|
|
||||||
// 2. any plugin file starting with 'admin_'
|
|
||||||
// 3. any plugin file in a folder called admin/
|
|
||||||
// 4. any file that specifies $eplug_admin = TRUE;
|
|
||||||
//
|
|
||||||
// e_SELF has the full HTML path
|
|
||||||
$inAdminDir = FALSE;
|
|
||||||
$isPluginDir = strpos(e_SELF,'/'.$PLUGINS_DIRECTORY) !== FALSE; // True if we're in a plugin
|
|
||||||
$e107Path = str_replace($e107->base_path, '', e_SELF); // Knock off the initial bits
|
|
||||||
if (
|
|
||||||
(!$isPluginDir && strpos($e107Path, $ADMIN_DIRECTORY) === 0 ) // Core admin directory
|
|
||||||
|| ($isPluginDir && (strpos(e_PAGE,'admin_') === 0 || strpos($e107Path, 'admin/') !== false)) // Plugin admin file or directory
|
|
||||||
|| (varsettrue($eplug_admin)) // Admin forced
|
|
||||||
)
|
|
||||||
{
|
|
||||||
$inAdminDir = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(!defined('THEME'))
|
|
||||||
{
|
|
||||||
if ($inAdminDir && varsettrue($pref['admintheme'])&& (strpos(e_SELF.'?'.e_QUERY, 'menus.php?configure') === false))
|
|
||||||
{
|
|
||||||
/* if (strpos(e_SELF, "newspost.php") !== FALSE)
|
|
||||||
{
|
|
||||||
define("MAINTHEME", e_THEME.$pref['sitetheme']."/"); MAINTHEME no longer used in core distribution
|
|
||||||
} */
|
|
||||||
checkvalidtheme($pref['admintheme']);
|
|
||||||
}
|
|
||||||
elseif (USERTHEME !== false && USERTHEME != 'USERTHEME' && !$inAdminDir)
|
|
||||||
{
|
|
||||||
checkvalidtheme(USERTHEME);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
checkvalidtheme($pref['sitetheme']);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$theme_pref = varset($pref['sitetheme_pref']);
|
|
||||||
// --------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
// here we USE the theme
|
// here we USE the theme
|
||||||
if ($inAdminDir)
|
if ($inAdminDir)
|
||||||
|
@@ -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.33 $
|
| $Revision: 1.34 $
|
||||||
| $Date: 2009-07-12 10:11:35 $
|
| $Date: 2009-07-12 14:44:56 $
|
||||||
| $Author: e107coders $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -25,6 +25,7 @@ class themeHandler{
|
|||||||
var $action;
|
var $action;
|
||||||
var $id;
|
var $id;
|
||||||
var $frm;
|
var $frm;
|
||||||
|
var $fl;
|
||||||
|
|
||||||
/* constructor */
|
/* constructor */
|
||||||
|
|
||||||
@@ -33,6 +34,8 @@ class themeHandler{
|
|||||||
require_once(e_HANDLER."form_handler.php");
|
require_once(e_HANDLER."form_handler.php");
|
||||||
$this->frm = new e_form(); //enable inner tabindex counter
|
$this->frm = new e_form(); //enable inner tabindex counter
|
||||||
|
|
||||||
|
require_once(e_HANDLER."file_class.php");
|
||||||
|
$this->fl = new e_file;
|
||||||
|
|
||||||
|
|
||||||
if (isset($_POST['upload'])) {
|
if (isset($_POST['upload'])) {
|
||||||
@@ -92,6 +95,7 @@ class themeHandler{
|
|||||||
|
|
||||||
$tloop = 1;
|
$tloop = 1;
|
||||||
$handle = opendir(e_THEME);
|
$handle = opendir(e_THEME);
|
||||||
|
|
||||||
while (false !== ($file = readdir($handle)))
|
while (false !== ($file = readdir($handle)))
|
||||||
{
|
{
|
||||||
if ($file != "." && $file != ".." && $file != "CVS" && $file != "templates" && is_dir(e_THEME.$file) && is_readable(e_THEME.$file."/theme.php") )
|
if ($file != "." && $file != ".." && $file != "CVS" && $file != "templates" && is_dir(e_THEME.$file) && is_readable(e_THEME.$file."/theme.php") )
|
||||||
@@ -102,26 +106,56 @@ class themeHandler{
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$themeArray[$file] = $this->getThemeInfo($file);
|
||||||
$themeArray[$file]['id'] = $tloop;
|
$themeArray[$file]['id'] = $tloop;
|
||||||
}
|
}
|
||||||
$tloop++;
|
$tloop++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
echo "<pre>";
|
||||||
|
print_r($themeArray);
|
||||||
|
echo "</pre>";*/
|
||||||
|
|
||||||
|
return $themeArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function getThemeInfo($file)
|
||||||
|
{
|
||||||
$STYLESHEET = FALSE;
|
$STYLESHEET = FALSE;
|
||||||
if(!$mode)
|
|
||||||
{
|
$reject = array('$.','$..','/','CVS','thumbs.db','*._$', 'index', 'null*','e_*');
|
||||||
$handle2 = opendir(e_THEME.$file."/");
|
$handle2 = $this->fl->get_files(e_THEME.$file."/", ".php|.css|.xml|preview.jpg|preview.png",$reject,1);
|
||||||
while (false !== ($file2 = readdir($handle2))) // Read files in theme directory
|
foreach($handle2 as $fln)
|
||||||
{
|
|
||||||
if ($file2 != "." && $file2 != ".." && $file != "CVS" && !is_dir(e_THEME.$file."/".$file2))
|
|
||||||
{
|
{
|
||||||
|
$file2 = str_replace(e_THEME.$file."/","",$fln['path']).$fln['fname'];
|
||||||
|
|
||||||
|
|
||||||
|
// $handle2 = opendir(e_THEME.$file."/");
|
||||||
|
// while (false !== ($file2 = readdir($handle2))) // Read files in theme directory
|
||||||
|
// {
|
||||||
|
|
||||||
|
// echo $file." = ".$file2."<br />";
|
||||||
|
|
||||||
$themeArray[$file]['files'][] = $file2;
|
$themeArray[$file]['files'][] = $file2;
|
||||||
if(strstr($file2, "preview."))
|
if(strstr($file2, "preview."))
|
||||||
{
|
{
|
||||||
$themeArray[$file]['preview'] = e_THEME.$file."/".$file2;
|
$themeArray[$file]['preview'] = e_THEME.$file."/".$file2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ---------------- get information string for css file
|
||||||
|
|
||||||
if(strstr($file2, "css") && !strstr($file2, "menu.css") && strpos($file2, "e_") !== 0 && strpos($file2, "admin_") !== 0)
|
if(strstr($file2, "css") && !strstr($file2, "menu.css") && strpos($file2, "e_") !== 0 && strpos($file2, "admin_") !== 0)
|
||||||
{
|
{
|
||||||
/* get information string for css file */
|
|
||||||
$fp=fopen(e_THEME.$file."/".$file2, "r");
|
if($fp=fopen(e_THEME.$file."/".$file2, "r"))
|
||||||
|
{
|
||||||
$cssContents = fread ($fp, filesize(e_THEME.$file."/".$file2));
|
$cssContents = fread ($fp, filesize(e_THEME.$file."/".$file2));
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
$nonadmin = preg_match('/\* Non-Admin(.*?)\*\//', $cssContents) ? true : false;
|
$nonadmin = preg_match('/\* Non-Admin(.*?)\*\//', $cssContents) ? true : false;
|
||||||
@@ -138,9 +172,16 @@ class themeHandler{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // end while..
|
} // end while..
|
||||||
|
|
||||||
closedir($handle2);
|
|
||||||
|
// echo "<hr />";
|
||||||
|
// closedir($handle2);
|
||||||
|
|
||||||
// Load Theme information and merge with existing array. theme.xml (0.8 themes) is given priority over theme.php (0.7).
|
// Load Theme information and merge with existing array. theme.xml (0.8 themes) is given priority over theme.php (0.7).
|
||||||
if(in_array("theme.xml",$themeArray[$file]['files']) )
|
if(in_array("theme.xml",$themeArray[$file]['files']) )
|
||||||
@@ -151,25 +192,20 @@ class themeHandler{
|
|||||||
{
|
{
|
||||||
$themeArray[$file] = array_merge($themeArray[$file], $this->parse_theme_php($file));
|
$themeArray[$file] = array_merge($themeArray[$file], $this->parse_theme_php($file));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
closedir($handle);
|
|
||||||
/*
|
|
||||||
echo "<table><tr><td>";
|
|
||||||
echo "<pre>";
|
|
||||||
print_r($themeArray['jayya']);
|
|
||||||
echo "</pre>";
|
|
||||||
echo "</td><td>";
|
|
||||||
echo "<pre>";
|
|
||||||
print_r($themeArray['e107v4a']);
|
|
||||||
echo "</pre>";
|
|
||||||
|
|
||||||
echo "</td></tr></table>";*/
|
|
||||||
|
|
||||||
return $themeArray;
|
|
||||||
|
|
||||||
|
return $themeArray[$file];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function themeUpload()
|
function themeUpload()
|
||||||
{
|
{
|
||||||
if (!$_POST['ac'] == md5(ADMINPWCHANGE)) {
|
if (!$_POST['ac'] == md5(ADMINPWCHANGE)) {
|
||||||
@@ -604,7 +640,7 @@ class themeHandler{
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(count($theme['layouts'])>1 && $mode==1) // New in 0.8 ----
|
if($mode==1) // New in 0.8 ----
|
||||||
{
|
{
|
||||||
|
|
||||||
$itext .= "<tr>
|
$itext .= "<tr>
|
||||||
@@ -630,7 +666,7 @@ class themeHandler{
|
|||||||
{
|
{
|
||||||
$pref['sitetheme_deflayout'] = ($val['@attributes']['default']=='true') ? $key : "";
|
$pref['sitetheme_deflayout'] = ($val['@attributes']['default']=='true') ? $key : "";
|
||||||
}
|
}
|
||||||
$itext .= "<td style='vertical-align:top width:auto;text-align:center'>\n";
|
$itext .= "<td class='center'>\n";
|
||||||
|
|
||||||
$itext .= "
|
$itext .= "
|
||||||
<input type='radio' name='layout_default' value='{$key}' ".($pref['sitetheme_deflayout']==$key ? " checked='checked'" : "")." />
|
<input type='radio' name='layout_default' value='{$key}' ".($pref['sitetheme_deflayout']==$key ? " checked='checked'" : "")." />
|
||||||
@@ -843,6 +879,12 @@ class themeHandler{
|
|||||||
|
|
||||||
$l = $this->themeArray[$theme];
|
$l = $this->themeArray[$theme];
|
||||||
|
|
||||||
|
if(!$l)
|
||||||
|
{
|
||||||
|
$l = $this->getThemeInfo($theme);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if($l['layouts'])
|
if($l['layouts'])
|
||||||
{
|
{
|
||||||
foreach($l['layouts'] as $key=>$val)
|
foreach($l['layouts'] as $key=>$val)
|
||||||
@@ -853,6 +895,10 @@ class themeHandler{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setAdminTheme()
|
function setAdminTheme()
|
||||||
@@ -897,8 +943,11 @@ class themeHandler{
|
|||||||
|
|
||||||
function SetCustomPages($array)
|
function SetCustomPages($array)
|
||||||
{
|
{
|
||||||
|
if(!is_array($array)){ return; }
|
||||||
|
|
||||||
global $pref;
|
global $pref;
|
||||||
$key = key($array);
|
$key = key($array);
|
||||||
|
|
||||||
$pref['sitetheme_custompages'][$key] = array_filter(explode(" ",$array[$key]));
|
$pref['sitetheme_custompages'][$key] = array_filter(explode(" ",$array[$key]));
|
||||||
|
|
||||||
if($pref['sitetheme_deflayout'] == 'legacyCustom')
|
if($pref['sitetheme_deflayout'] == 'legacyCustom')
|
||||||
@@ -955,10 +1004,12 @@ class themeHandler{
|
|||||||
{
|
{
|
||||||
unset($themeArray);
|
unset($themeArray);
|
||||||
}
|
}
|
||||||
// echo " <hr>".$path."<hr>";
|
|
||||||
|
|
||||||
$lays['legacyDefault']['@attributes'] = array('title'=>'Default','preview'=>'','previewFull'=>'','plugins'=>'', 'default'=>'true');
|
$lays['legacyDefault']['@attributes'] = array('title'=>'Default','preview'=>'','previewFull'=>'','plugins'=>'', 'default'=>'true');
|
||||||
|
|
||||||
|
if(!file_exists(e_THEME.$path."theme.xml")) // load custompages from theme.php only when theme.xml doesn't exist.
|
||||||
|
{
|
||||||
foreach($themeContentsArray as $line)
|
foreach($themeContentsArray as $line)
|
||||||
{
|
{
|
||||||
if(strstr($line,"CUSTOMPAGES"))
|
if(strstr($line,"CUSTOMPAGES"))
|
||||||
@@ -978,6 +1029,7 @@ class themeHandler{
|
|||||||
$themeArray['custompages']['legacyCustom'] = explode(" ",$CUSTOMPAGES);
|
$themeArray['custompages']['legacyCustom'] = explode(" ",$CUSTOMPAGES);
|
||||||
$lays['legacyCustom']['@attributes'] = array('title'=>'Custom','preview'=>'','previewFull'=>'','plugins'=>'');
|
$lays['legacyCustom']['@attributes'] = array('title'=>'Custom','preview'=>'','previewFull'=>'','plugins'=>'');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$themeArray['path'] = $path;
|
$themeArray['path'] = $path;
|
||||||
$themeArray['layouts'] = $lays;
|
$themeArray['layouts'] = $lays;
|
||||||
@@ -1024,6 +1076,7 @@ class themeHandler{
|
|||||||
|
|
||||||
$name = $val['@attributes']['name'];
|
$name = $val['@attributes']['name'];
|
||||||
unset($val['@attributes']['name']);
|
unset($val['@attributes']['name']);
|
||||||
|
|
||||||
$lays[$name] = $val;
|
$lays[$name] = $val;
|
||||||
if(isset($val['customPages']))
|
if(isset($val['customPages']))
|
||||||
{
|
{
|
||||||
|
@@ -4,14 +4,14 @@
|
|||||||
| 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.7 $
|
| $Revision: 1.8 $
|
||||||
| $Date: 2009-07-09 08:31:38 $
|
| $Date: 2009-07-12 14:44:57 $
|
||||||
| $Author: e107coders $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
define("TPVLAN_1", "You are looking at a preview of the <b>'".PREVIEWTHEMENAME."'</b> theme. It has not been set as the main theme for your site, it has been activated to provide a preview of how the theme looks.<br />To set this theme as your site theme, <a href='".e_ADMIN."theme.php'>return to your theme manager</a> and select 'Set As Site Theme'.<br />To preview more themes please <a href='".e_ADMIN."theme.php'>click here</a>");
|
define("TPVLAN_1", "You are looking at a preview of the <b>'".PREVIEWTHEMENAME."'</b> theme. It has not been set as the main theme for your site, it has been activated to provide a preview of how the theme looks.<br />To set this theme as your site theme, <a href='".e_ADMIN."theme.php?choose'>return to your theme manager</a> and select 'Set As Site Theme'.<br />To preview more themes please <a href='".e_ADMIN."theme.php'>click here</a>");
|
||||||
define("TPVLAN_2", "Theme Preview");
|
define("TPVLAN_2", "Theme Preview");
|
||||||
define("TPVLAN_3", "Main site theme set to");
|
define("TPVLAN_3", "Main site theme set to");
|
||||||
define("TPVLAN_4", "Author");
|
define("TPVLAN_4", "Author");
|
||||||
|
@@ -9,9 +9,9 @@
|
|||||||
* Plugin Administration - Login menu
|
* Plugin Administration - Login menu
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/login_menu/config.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_plugins/login_menu/config.php,v $
|
||||||
* $Revision: 1.5 $
|
* $Revision: 1.6 $
|
||||||
* $Date: 2008-12-21 12:53:48 $
|
* $Date: 2009-07-12 14:44:57 $
|
||||||
* $Author: e107steved $
|
* $Author: e107coders $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@@ -6,8 +6,8 @@
|
|||||||
| Released under the terms and conditions of the GNU General Public License (http://gnu.org).
|
| Released under the terms and conditions of the GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_themes/templates/header_default.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_themes/templates/header_default.php,v $
|
||||||
| $Revision: 1.33 $
|
| $Revision: 1.34 $
|
||||||
| $Date: 2009-07-09 08:31:38 $
|
| $Date: 2009-07-12 14:44:57 $
|
||||||
| $Author: e107coders $
|
| $Author: e107coders $
|
||||||
+-----------------------------------------------------------------------------------------------+
|
+-----------------------------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -340,8 +340,10 @@ if(function_exists('theme_head')){
|
|||||||
// FIXME H: Generate JS for image preloads
|
// FIXME H: Generate JS for image preloads
|
||||||
//
|
//
|
||||||
|
|
||||||
if ($pref['image_preload']) {
|
if ($pref['image_preload'] && is_dir(THEME.'images'))
|
||||||
|
{
|
||||||
$ejs_listpics = '';
|
$ejs_listpics = '';
|
||||||
|
|
||||||
$handle=opendir(THEME.'images');
|
$handle=opendir(THEME.'images');
|
||||||
while ($file = readdir($handle)) {
|
while ($file = readdir($handle)) {
|
||||||
if(preg_match("#(jpg|jpeg|gif|bmp|png)$#i", $file)) {
|
if(preg_match("#(jpg|jpeg|gif|bmp|png)$#i", $file)) {
|
||||||
@@ -452,8 +454,9 @@ if ($e107_popup != 1) {
|
|||||||
|
|
||||||
// echo "DEF = ".$def."<br />";
|
// echo "DEF = ".$def."<br />";
|
||||||
|
|
||||||
if(($def == 'legacyCustom' || $def=='legacyDefault') && (isset($CUSTOMHEADER) || isset($CUSTOMFOOTER)) ) // 0.6 themes.
|
if($def == 'legacyCustom' || $def=='legacyDefault' ) // 0.6 themes.
|
||||||
{
|
{
|
||||||
|
// echo "MODE 0.6";
|
||||||
if($def == 'legacyCustom')
|
if($def == 'legacyCustom')
|
||||||
{
|
{
|
||||||
$HEADER = ($CUSTOMHEADER) ? $CUSTOMHEADER : $HEADER;
|
$HEADER = ($CUSTOMHEADER) ? $CUSTOMHEADER : $HEADER;
|
||||||
|
Reference in New Issue
Block a user