open('newsletter','post', e_SIGNUP, array('class'=>'form-inline'));
$text .= "
";
$text .= $frm->text('email','', null, array('placeholder'=>"Enter your email"));
$text .= $frm->button('subscribe', 1, 'primary', "Subscribe");
$text .= "
";
$text .= $frm->close();
return $text;
}
function sc_bootstrap_branding()
{
$pref = e107::pref('theme', 'branding');
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=null)
{
$placement = e107::pref('theme', 'usernav_placement', 'bottom');
if($parm['placement'] != $placement)
{
return '';
}
e107::includeLan(e_PLUGIN."login_menu/languages/".e_LANGUAGE.".php");
$tp = e107::getParser();
require(e_PLUGIN."login_menu/login_menu_shortcodes.php"); // don't use 'require_once'.
$direction = vartrue($parm['dir']) == 'up' ? ' dropup' : '';
$userReg = defset('USER_REGISTRATION');
if(!USERID) // Logged Out.
{
$text = '
';
if($userReg==1)
{
$text .= '
- '.LAN_LOGINMENU_3.'
'; // Signup
}
$socialActive = e107::pref('core', 'social_login_active');
if(!empty($userReg) || !empty($socialActive)) // e107 or social login is active.
{
$text .= '
-
'.LAN_LOGINMENU_51.'
";
}
$text .= "
";
return $tp->parseTemplate($text, true, $login_menu_shortcodes);
}
// Logged in.
//TODO Generic LANS. (not theme LANs)
if($placement == 'bottom')
{
$text = '