mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Added missing class param on Social Login shortcode. eg. {SOCIAL_LOGIN: class=x}
This commit is contained in:
@@ -67,6 +67,8 @@ class signup_shortcodes extends e_shortcode
|
|||||||
$tp = e107::getParser();
|
$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))
|
if(!empty($pref))
|
||||||
{
|
{
|
||||||
@@ -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.
|
// '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='' />";
|
$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 btn btn-primary' href='".e107::getUrl()->create('system/xup/signup?provider='.$p.'&back='.base64_encode(e_REQUEST_URL))."'>".$button."</a> ";
|
$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/
|
//TODO different icon options. see: http://zocial.smcllns.com/
|
||||||
}
|
}
|
||||||
@@ -107,6 +109,8 @@ class signup_shortcodes extends e_shortcode
|
|||||||
$pref = e107::getPref('social_login_active');
|
$pref = e107::getPref('social_login_active');
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(!empty($pref))
|
if(!empty($pref))
|
||||||
{
|
{
|
||||||
$text = "";
|
$text = "";
|
||||||
@@ -120,8 +124,11 @@ class signup_shortcodes extends e_shortcode
|
|||||||
$class .= ' btn-lg';
|
$class .= ' btn-lg';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach($providers as $p=>$v)
|
foreach($providers as $p=>$v)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$p = strtolower($p);
|
$p = strtolower($p);
|
||||||
if($v['enabled'] == 1)
|
if($v['enabled'] == 1)
|
||||||
{
|
{
|
||||||
@@ -132,7 +139,7 @@ class signup_shortcodes extends e_shortcode
|
|||||||
$ic = 'windows';
|
$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> ";
|
$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> ";
|
||||||
}
|
}
|
||||||
|
@@ -165,9 +165,11 @@ class social_shortcodes extends e_shortcode
|
|||||||
{
|
{
|
||||||
$pref = e107::pref('core', 'social_login_active');
|
$pref = e107::pref('core', 'social_login_active');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(empty($pref))
|
if(empty($pref))
|
||||||
{
|
{
|
||||||
return;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sc = e107::getScBatch('signup');
|
$sc = e107::getScBatch('signup');
|
||||||
|
Reference in New Issue
Block a user