mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
Added missing class param on Social Login shortcode. eg. {SOCIAL_LOGIN: class=x}
This commit is contained in:
parent
1ba4f85570
commit
e484795de6
@ -66,8 +66,10 @@ class signup_shortcodes extends e_shortcode
|
||||
$pref = e107::getPref('social_login_active');
|
||||
$tp = e107::getParser();
|
||||
|
||||
$size = empty($parm['size']) ? '3x' : $parm['size'];
|
||||
|
||||
$size = empty($parm['size']) ? '3x' : $parm['size'];
|
||||
$class = empty($parm['class']) ? 'btn btn-primary' : $parm['class'] ;
|
||||
|
||||
|
||||
if(!empty($pref))
|
||||
{
|
||||
$text = "";
|
||||
@ -90,8 +92,8 @@ class signup_shortcodes extends e_shortcode
|
||||
|
||||
// 'signup' Creates a new XUP user if not found, otherwise it logs the person in.
|
||||
|
||||
$button = (defset('FONTAWESOME') === 4) ? $tp->toGlyph('fa-'.$ic, array('size'=>$size)) : "<img class='e-tip' title='".$tp->lanVars(LAN_PLUGIN_SOCIAL_XUP_SIGNUP, $p)."' src='".e_IMAGE_ABS."xup/{$p}.png' alt='' />";
|
||||
$text .= " <a title='".$tp->lanVars(LAN_PLUGIN_SOCIAL_XUP_SIGNUP, $p)." ' role='button' class='signup-xup btn btn-primary' href='".e107::getUrl()->create('system/xup/signup?provider='.$p.'&back='.base64_encode(e_REQUEST_URL))."'>".$button."</a> ";
|
||||
$button = (defset('FONTAWESOME') === 4) ? $tp->toGlyph('fa-'.$ic, array('size'=>$size, 'fw'=>true)) : "<img class='e-tip' title='".$tp->lanVars(LAN_PLUGIN_SOCIAL_XUP_SIGNUP, $p)."' src='".e_IMAGE_ABS."xup/{$p}.png' alt='' />";
|
||||
$text .= " <a title='".$tp->lanVars(LAN_PLUGIN_SOCIAL_XUP_SIGNUP, $p)." ' role='button' class='signup-xup ".$class."' href='".e107::getUrl()->create('system/xup/signup?provider='.$p.'&back='.base64_encode(e_REQUEST_URL))."'>".$button."</a> ";
|
||||
}
|
||||
//TODO different icon options. see: http://zocial.smcllns.com/
|
||||
}
|
||||
@ -106,6 +108,8 @@ class signup_shortcodes extends e_shortcode
|
||||
{
|
||||
$pref = e107::getPref('social_login_active');
|
||||
$tp = e107::getParser();
|
||||
|
||||
|
||||
|
||||
if(!empty($pref))
|
||||
{
|
||||
@ -120,8 +124,11 @@ class signup_shortcodes extends e_shortcode
|
||||
$class .= ' btn-lg';
|
||||
}
|
||||
|
||||
|
||||
foreach($providers as $p=>$v)
|
||||
{
|
||||
|
||||
|
||||
$p = strtolower($p);
|
||||
if($v['enabled'] == 1)
|
||||
{
|
||||
@ -131,8 +138,8 @@ class signup_shortcodes extends e_shortcode
|
||||
{
|
||||
$ic = 'windows';
|
||||
}
|
||||
|
||||
$button = (defset('FONTAWESOME') === 4) ? "<span title='".$tp->lanVars(LAN_PLUGIN_SOCIAL_XUP_REG, $p)."'>".$tp->toGlyph('fa-'.$ic, array('size'=>$size))."</span>" : "<img class='e-tip' title='".$tp->lanVars(LAN_PLUGIN_SOCIAL_XUP_SIGNUP, $p)."' src='".e_IMAGE_ABS."xup/{$p}.png' alt='' />";
|
||||
|
||||
$button = (defset('FONTAWESOME') === 4) ? "<span title='".$tp->lanVars(LAN_PLUGIN_SOCIAL_XUP_REG, $p)."'>".$tp->toGlyph('fa-'.$ic, array('size'=>$size, 'fw'=>true))."</span>" : "<img class='e-tip' title='".$tp->lanVars(LAN_PLUGIN_SOCIAL_XUP_SIGNUP, $p)."' src='".e_IMAGE_ABS."xup/{$p}.png' alt='' />";
|
||||
|
||||
$text .= " <a class='signup-xup ".$class."' role='button' href='".e107::getUrl()->create('system/xup/signup?provider='.$p.'&back='.base64_encode(e_REQUEST_URL))."'>".$button."</a> ";
|
||||
}
|
||||
|
@ -164,10 +164,12 @@ class social_shortcodes extends e_shortcode
|
||||
function sc_social_login($parm=null)
|
||||
{
|
||||
$pref = e107::pref('core', 'social_login_active');
|
||||
|
||||
|
||||
|
||||
|
||||
if(empty($pref))
|
||||
{
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
$sc = e107::getScBatch('signup');
|
||||
|
Loading…
x
Reference in New Issue
Block a user