mirror of
https://github.com/e107inc/e107.git
synced 2025-08-12 09:34:54 +02:00
Added THEME_STYLE constant for easy checking of the currently selected theme style. CSSORDER also added, but subject to change.
This commit is contained in:
@@ -1092,6 +1092,15 @@ if(!defined("THEME_LAYOUT"))
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if(varset($pref['themecss']) && file_exists(THEME.$pref['themecss']))
|
||||||
|
{
|
||||||
|
define("THEME_STYLE", $pref['themecss']);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
define("THEME_STYLE", 'style.css');
|
||||||
|
}
|
||||||
|
|
||||||
if($def) // custom-page layout.
|
if($def) // custom-page layout.
|
||||||
{
|
{
|
||||||
define("THEME_LAYOUT",$def);
|
define("THEME_LAYOUT",$def);
|
||||||
|
@@ -251,6 +251,10 @@ else
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Theme default
|
// Theme default
|
||||||
|
|
||||||
|
$e_js->themeCSS(THEME_STYLE, $css_default);
|
||||||
|
|
||||||
|
/* Moved to class2 and defined as THEME_STYLE
|
||||||
if($e_pref->get('themecss') && file_exists(THEME.$e_pref->get('themecss')))
|
if($e_pref->get('themecss') && file_exists(THEME.$e_pref->get('themecss')))
|
||||||
{
|
{
|
||||||
//echo "<link rel='stylesheet' href='".THEME_ABS."{$pref['themecss']}' type='text/css' media='{$css_default}' />\n";
|
//echo "<link rel='stylesheet' href='".THEME_ABS."{$pref['themecss']}' type='text/css' media='{$css_default}' />\n";
|
||||||
@@ -258,10 +262,10 @@ else
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo "<link rel='stylesheet' href='".THEME_ABS."style.css' type='text/css' media='{$css_default}' />\n";
|
// echo "<link rel='stylesheet' href='".THEME_ABS."style.css' type='text/css' media='{$css_default}' />\n";
|
||||||
$e_js->themeCSS('style.css', $css_default);
|
$e_js->themeCSS('style.css', $css_default);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// Support for print and handheld media - override theme default CSS
|
// Support for print and handheld media - override theme default CSS
|
||||||
if(file_exists(THEME."style_mobile.css"))
|
if(file_exists(THEME."style_mobile.css"))
|
||||||
{
|
{
|
||||||
@@ -297,6 +301,20 @@ else
|
|||||||
//
|
//
|
||||||
|
|
||||||
// Other CSS - from unknown location, different from core/theme/plugin location or backward compatibility; NOTE - could be removed in the future!!!
|
// Other CSS - from unknown location, different from core/theme/plugin location or backward compatibility; NOTE - could be removed in the future!!!
|
||||||
|
|
||||||
|
//TODO Additional options for 'bootstrap' and 'style' (ie. THEME_STYLE loaded above). Requires changes to js_manager.php
|
||||||
|
|
||||||
|
$CSSORDER = deftrue('CSSORDER') ? explode(",",CSSORDER) : array('other','core','plugin','theme','inline');
|
||||||
|
|
||||||
|
foreach($CSSORDER as $val)
|
||||||
|
{
|
||||||
|
$cssId = $val."_css";
|
||||||
|
$e_js->renderJs($cssId, false, 'css', false);
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($CSSORDER);
|
||||||
|
|
||||||
|
/*
|
||||||
$e_js->renderJs('other_css', false, 'css', false);
|
$e_js->renderJs('other_css', false, 'css', false);
|
||||||
echo "\n<!-- footer_other_css -->\n";
|
echo "\n<!-- footer_other_css -->\n";
|
||||||
|
|
||||||
@@ -313,9 +331,12 @@ echo "\n<!-- footer_plugin_css -->\n";
|
|||||||
$e_js->renderJs('theme_css', false, 'css', false);
|
$e_js->renderJs('theme_css', false, 'css', false);
|
||||||
echo "\n<!-- footer_theme_css -->\n";
|
echo "\n<!-- footer_theme_css -->\n";
|
||||||
|
|
||||||
|
|
||||||
// Inline CSS - not sure if this should stay at all!
|
// Inline CSS - not sure if this should stay at all!
|
||||||
$e_js->renderJs('inline_css', false, 'css', false);
|
$e_js->renderJs('inline_css', false, 'css', false);
|
||||||
echo "\n<!-- footer_inline_css -->\n";
|
echo "\n<!-- footer_inline_css -->\n";
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Style for unobtrusive JS, prevent 3rd party code overload
|
// Style for unobtrusive JS, prevent 3rd party code overload
|
||||||
|
@@ -519,7 +519,7 @@ class e107_db_debug {
|
|||||||
$inc = array(
|
$inc = array(
|
||||||
'HEADERF','FOOTERF','FILE_UPLOADS','FLOODPROTECT','FLOODTIMEOUT','CHARSET',
|
'HEADERF','FOOTERF','FILE_UPLOADS','FLOODPROTECT','FLOODTIMEOUT','CHARSET',
|
||||||
'GUESTS_ONLINE','MEMBERS_ONLINE','PAGE_NAME','STANDARDS_MODE','TIMEOFFSET',
|
'GUESTS_ONLINE','MEMBERS_ONLINE','PAGE_NAME','STANDARDS_MODE','TIMEOFFSET',
|
||||||
'TOTAL_ONLINE','THEME','THEME_ABS','THEME_LAYOUT','META_OG','META_DESCRIPTION','MPREFIX'
|
'TOTAL_ONLINE','THEME','THEME_ABS','THEME_LAYOUT','THEME_STYLE','META_OG','META_DESCRIPTION','MPREFIX','VIEWPORT','BODYTAG','CSSORDER'
|
||||||
);
|
);
|
||||||
|
|
||||||
$userCon = get_defined_constants(true);
|
$userCon = get_defined_constants(true);
|
||||||
|
@@ -222,7 +222,7 @@ class themeHandler
|
|||||||
|
|
||||||
$reject = array('e_.*');
|
$reject = array('e_.*');
|
||||||
|
|
||||||
$handle2 = e107::getFile()->get_files(e_THEME.$file."/", ".php|.css|.xml|preview.jpg|preview.png", $reject, 1);
|
$handle2 = e107::getFile()->get_files(e_THEME.$file."/", ".php|.css|.xml|preview.jpg|preview.png", $reject, 0);
|
||||||
|
|
||||||
|
|
||||||
foreach ($handle2 as $fln)
|
foreach ($handle2 as $fln)
|
||||||
@@ -1337,7 +1337,7 @@ class themeHandler
|
|||||||
|
|
||||||
if($mode == 1) // SITE-THEME Mode
|
if($mode == 1) // SITE-THEME Mode
|
||||||
{
|
{
|
||||||
if(substr($css['name'], 0, 6) == "admin_" || !strstr($css['name'],'style'))
|
if(substr($css['name'], 0, 6) == "admin_")
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@@ -9,12 +9,23 @@ define("BODYTAG", '<body data-spy="scroll" data-target=".bs-docs-sidebar" >');
|
|||||||
|
|
||||||
e107::lan('theme');
|
e107::lan('theme');
|
||||||
e107::js('core','bootstrap/js/bootstrap.min.js');
|
e107::js('core','bootstrap/js/bootstrap.min.js');
|
||||||
e107::css('core','bootstrap/css/bootstrap.min.css');
|
|
||||||
|
if(THEME_STYLE != 'style.css') // allow for drop-in bootstrap replacement. See http://bootswatch.com
|
||||||
|
{
|
||||||
|
define("CSSORDER", "theme,core,other,plugin,inline");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
e107::css('core','bootstrap/css/bootstrap.min.css');
|
||||||
|
}
|
||||||
|
|
||||||
e107::css('core','bootstrap/css/bootstrap-responsive.min.css');
|
e107::css('core','bootstrap/css/bootstrap-responsive.min.css');
|
||||||
e107::css('core','bootstrap/css/jquery-ui.custom.css');
|
e107::css('core','bootstrap/css/jquery-ui.custom.css');
|
||||||
|
|
||||||
e107::css('theme', 'js/google-code-prettify/prettify.css');
|
e107::css('theme', 'js/google-code-prettify/prettify.css');
|
||||||
e107::js('theme', "js/google-code-prettify/prettify.js");
|
e107::js('theme', "js/google-code-prettify/prettify.js");
|
||||||
|
|
||||||
|
e107::css('inline','@media (min-width: 1000px){ body { padding-top: 75px; } } ');
|
||||||
|
|
||||||
if(THEME_LAYOUT == 'docs')
|
if(THEME_LAYOUT == 'docs')
|
||||||
{
|
{
|
||||||
@@ -25,6 +36,7 @@ if(THEME_LAYOUT == 'docs')
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//$no_core_css = TRUE;
|
//$no_core_css = TRUE;
|
||||||
|
|
||||||
//define("STANDARDS_MODE",TRUE);
|
//define("STANDARDS_MODE",TRUE);
|
||||||
|
Reference in New Issue
Block a user