diff --git a/e107_handlers/theme_handler.php b/e107_handlers/theme_handler.php index de1dbcd30..c6ed40e3c 100644 --- a/e107_handlers/theme_handler.php +++ b/e107_handlers/theme_handler.php @@ -1186,7 +1186,7 @@ class themeHandler if($this->themeConfigObj && call_user_func(array(&$this->themeConfigObj, 'config')) && $mode == 1) { - $text .= "
  • ".LAN_CUSTOM."
  • \n"; + $text .= "
  • ".LAN_PREFS."
  • \n"; } if($this->themeConfigObj && call_user_func(array(&$this->themeConfigObj, 'help'))) diff --git a/e107_themes/bootstrap3/style.css b/e107_themes/bootstrap3/style.css index 79f15e600..7d75da370 100644 --- a/e107_themes/bootstrap3/style.css +++ b/e107_themes/bootstrap3/style.css @@ -13,6 +13,11 @@ body { margin-top:20px } +img.logo { + margin-top: -5px; + margin-right: 5px; +} + /* Make posted content images responsive too */ .bbcode-img { display: block; max-width: 100%; height: auto; } diff --git a/e107_themes/bootstrap3/theme.php b/e107_themes/bootstrap3/theme.php index e98c1f32e..e71fe2f8e 100644 --- a/e107_themes/bootstrap3/theme.php +++ b/e107_themes/bootstrap3/theme.php @@ -126,11 +126,11 @@ $LAYOUT['_header_'] = ' - {SITENAME} + {BOOTSTRAP_BRANDING} - @@ -148,7 +148,9 @@ $LAYOUT['_footer_'] = '
    {XURL_ICONS: size=2x} + {BOOTSTRAP_USERNAV: placement=bottom&dir=up}
    +
    {SITEDISCLAIMER}
    diff --git a/e107_themes/bootstrap3/theme_config.php b/e107_themes/bootstrap3/theme_config.php new file mode 100644 index 000000000..dab4b4878 --- /dev/null +++ b/e107_themes/bootstrap3/theme_config.php @@ -0,0 +1,53 @@ +set('sitetheme_pref', $theme_pref); + return $pref->dataHasChanged(); + } + + function config() + { + $frm = e107::getForm(); + + $brandingOpts = array('sitename'=>'Site Name', 'logo' => 'Logo', 'sitenamelogo'=>'Logo & Site Name'); + + $var[0]['caption'] = "Branding"; + $var[0]['html'] = $frm->select('branding', $brandingOpts, e107::pref('theme', 'branding', 'sitename')); + $var[0]['help'] = ""; + + $var[1]['caption'] = "Navbar Alignment"; + $var[1]['html'] = $frm->select('nav_alignment', array('left', 'right'), e107::pref('theme', 'nav_alignment', 'left'),'useValues=1' ); + $var[1]['help'] = ""; + + $var[2]['caption'] = "Signup/Login Placement"; + $var[2]['html'] = $frm->select('usernav_placement', array('top', 'bottom'), e107::pref('theme', 'usernav_placement', 'top'),'useValues=1' ); + $var[2]['help'] = ""; + + // $var[1]['caption'] = "Sample configuration field 2"; + // $var[1]['html'] = $frm->text('_blank_example2', e107::pref('theme', 'example2', 'default')); + + return $var; + } + + function help() + { + return ''; + } +} + + +?> \ No newline at end of file diff --git a/e107_themes/bootstrap3/theme_shortcodes.php b/e107_themes/bootstrap3/theme_shortcodes.php index 4a0569136..46a354f83 100644 --- a/e107_themes/bootstrap3/theme_shortcodes.php +++ b/e107_themes/bootstrap3/theme_shortcodes.php @@ -17,20 +17,77 @@ class theme_shortcodes extends e_shortcode { } - - function sc_bootstrap_usernav() + + + function sc_bootstrap_branding() { + $pref = e107::pref('theme', 'branding', 'sitename'); + + switch($pref) + { + case 'logo': + + return e107::getParser()->parseTemplate('{SITELOGO: h=30}',true); + + break; + + case 'sitenamelogo': + + return "".e107::getParser()->parseTemplate('{SITELOGO: h=30}',true)."".SITENAME; + + break; + + case 'sitename': + default: + + return SITENAME; + + break; + } + + } + + + + function sc_bootstrap_nav_align() + { + $pref = e107::pref('theme', 'nav_alignment'); + + if($pref == 'right') + { + return "navbar-right"; + } + else + { + return ""; + } + } + + + + function sc_bootstrap_usernav($parm='') + { + + $placement = e107::pref('theme', 'usernav_placement', 'top'); + + if($parm['placement'] != $placement) + { + return ''; + } + include_lan(e_PLUGIN."login_menu/languages/".e_LANGUAGE.".php"); $tp = e107::getParser(); require_once(e_PLUGIN."login_menu/login_menu_shortcodes.php"); + + $direction = vartrue($parm['dir']) == 'up' ? ' dropup' : ''; $userReg = defset('USER_REGISTRATION'); if(!USERID) // Logged Out. { $text = ' -