diff --git a/e107_core/templates/header_default.php b/e107_core/templates/header_default.php index 313c98471..2b5abebe7 100644 --- a/e107_core/templates/header_default.php +++ b/e107_core/templates/header_default.php @@ -81,12 +81,14 @@ if (!function_exists("parseheader")) { $tp = e107::getParser(); $tmp = explode("\n", $LAYOUT); + + $sc = e107::getScBatch('_theme_'); foreach ($tmp as $line) { if (preg_match("/{.+?}/", $line)) { - echo $tp->parseTemplate($line)."\n"; // retain line-breaks. + echo $tp->parseTemplate($line, true, $sc)."\n"; // retain line-breaks. } else { diff --git a/e107_handlers/shortcode_handler.php b/e107_handlers/shortcode_handler.php index dd82ce0ef..f942e4705 100644 --- a/e107_handlers/shortcode_handler.php +++ b/e107_handlers/shortcode_handler.php @@ -335,7 +335,13 @@ class e_parse_shortcode } } - if(!$pluginName) + + if($className == '_theme__shortcodes') // Check for theme shortcode batch. - @see header_default.php //XXX Discuss. + { + $className = 'theme_shortcodes'; + $path = THEME.'theme_shortcodes.php'; + } + elseif(!$pluginName) { if(!$globalOverride) { @@ -366,6 +372,10 @@ class e_parse_shortcode $className = 'override_'.$className; } } + + + + // Includes global Shortcode Classes (e_shortcode.php) or already loaded batch if ($this->isScClass($className)) @@ -377,7 +387,7 @@ class e_parse_shortcode if (class_exists($className, false)) // don't allow __autoload() { // $this->registerClassMethods($className, $path); // XXX Global registration should happen separately - here we want only the object. - $this->scClasses[$className] = new $className(); // located inside registerClassMethods() + $this->scClasses[$className] = new $className(); return $this->scClasses[$className]; } @@ -387,7 +397,7 @@ class e_parse_shortcode if (class_exists($className, false)) // don't allow __autoload() { // register instance directly to allow override - $this->scClasses[$className] = new $className(); // located inside registerClassMethods() + $this->scClasses[$className] = new $className(); // $this->registerClassMethods($className, $path); // XXX Global registration should happen separately - here we want only the object. return $this->scClasses[$className]; } @@ -444,10 +454,18 @@ class e_parse_shortcode * * @return e_parse_shortcode */ - public function loadThemeShortcodes() + protected function loadThemeShortcodes() { global $register_sc; - + + // $this->registered_codes[$code]['type'] = 'plugin'; + // $this->registered_codes[$code]['function'] = strtolower($code).'_shortcode'; + // $this->registered_codes[$code]['path'] = e_PLUGIN.$path.'/shortcodes/single/'; + // $this->registered_codes[$code]['perms'] = $uclass; + + + + if (isset($register_sc) && is_array($register_sc)) { foreach ($register_sc as $code) @@ -459,6 +477,7 @@ class e_parse_shortcode } } } + return $this; } diff --git a/e107_handlers/theme_handler.php b/e107_handlers/theme_handler.php index 1a765baf5..b41223017 100644 --- a/e107_handlers/theme_handler.php +++ b/e107_handlers/theme_handler.php @@ -910,9 +910,27 @@ class themeHandler function loadThemeConfig() { $mes = e107::getMessage(); - $confile = e_THEME.$this->id."/".$this->id."_config.php"; - if(($this->themeConfigObj === null) && is_readable($confile)) + $newConfile = e_THEME.$this->id."/theme_config.php"; + + $legacyConfile = e_THEME.$this->id."/".$this->id."_config.php"; // @Deprecated + + if(is_readable($newConfile)) + { + $confile = $newConfile; + } + elseif(is_readable($legacyConfile))// TODO Eventually remove it. + { + // NOTE: this is debug info.. do not translate. + e107::getMessage()->addDebug("Deprecated Theme Config File found! Rename ".$this->id."_config.php. to theme_config.php to correct this issue. ."); + $confile = $legacyConfile; + } + else + { + return; + } + + if(($this->themeConfigObj === null) ) { $mes->addDebug("Loading : ".$confile); include ($confile); diff --git a/e107_plugins/login_menu/login_menu_shortcodes.php b/e107_plugins/login_menu/login_menu_shortcodes.php index 036e83367..98a3466ab 100755 --- a/e107_plugins/login_menu/login_menu_shortcodes.php +++ b/e107_plugins/login_menu/login_menu_shortcodes.php @@ -35,7 +35,7 @@ $login_menu_shortcodes = $tp -> e_sc -> parse_scbatch(__FILE__); /* SC_BEGIN LM_USERNAME_INPUT global $pref; - return "\n"; + return "\n"; SC_END SC_BEGIN LM_USERNAME_LABEL @@ -54,7 +54,7 @@ SC_END SC_BEGIN LM_PASSWORD_INPUT global $pref; -$t_password = "\n"; +$t_password = "\n"; if (!USER && e107::getSession()->is('challenge') && varset($pref['password_CHAP'],0)) $t_password .= "\n\n"; return $t_password; SC_END diff --git a/e107_themes/bootstrap/style.css b/e107_themes/bootstrap/style.css index 0078ca4ff..be10f5924 100644 --- a/e107_themes/bootstrap/style.css +++ b/e107_themes/bootstrap/style.css @@ -7,10 +7,7 @@ body { padding-top: 75px; } } -.navbar-inverse .brand, .navbar-inverse .nav > li > a.no-block { - display: inline; - padding: 10px 0px; -} + .well { padding:10px; } footer { padding:60px } diff --git a/e107_themes/bootstrap/theme.php b/e107_themes/bootstrap/theme.php index b0880640d..c3db042a4 100644 --- a/e107_themes/bootstrap/theme.php +++ b/e107_themes/bootstrap/theme.php @@ -155,6 +155,11 @@ $SC_WRAPPER['NAVIGATION|s'] = ' diff --git a/e107_themes/bootstrap/bootstrap_config.php b/e107_themes/bootstrap/theme_config.php similarity index 100% rename from e107_themes/bootstrap/bootstrap_config.php rename to e107_themes/bootstrap/theme_config.php