mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Added social-app key-registration links to admin -> prefs. Fixed 'hide email' signup option. Added rel=external link option to jquery lib.
This commit is contained in:
@@ -706,7 +706,7 @@ $text .= "
|
|||||||
// Single Login / / copied from hybridAuth config.php so it's easy to add more.
|
// Single Login / / copied from hybridAuth config.php so it's easy to add more.
|
||||||
// Used Below.
|
// Used Below.
|
||||||
|
|
||||||
$single_logins = array (
|
$social_logins = array (
|
||||||
// openid providers
|
// openid providers
|
||||||
"OpenID" => array (
|
"OpenID" => array (
|
||||||
"enabled" => true
|
"enabled" => true
|
||||||
@@ -765,8 +765,15 @@ $single_logins = array (
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Key registration
|
||||||
|
$social_external = array(
|
||||||
|
"Facebook" => "https://developers.facebook.com/apps",
|
||||||
|
"Twitter" => "https://dev.twitter.com/apps/new",
|
||||||
|
"Google" => "https://code.google.com/apis/console/",
|
||||||
|
"Live" => "https://manage.dev.live.com/ApplicationOverview.aspx",
|
||||||
|
"LinkedIn" => "https://www.linkedin.com/secure/developer",
|
||||||
|
"Foursquare" => "https://www.foursquare.com/oauth/"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
$text .= "
|
$text .= "
|
||||||
@@ -791,12 +798,14 @@ $text .= "
|
|||||||
$pref['social_login'] = array();
|
$pref['social_login'] = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($single_logins as $prov=>$val)
|
foreach($social_logins as $prov=>$val)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$label = varset($social_external[$prov]) ? "<a class='e-tip' rel='external' title='Get a key from the provider' href='".$social_external[$prov]."'>".$prov."</a>" : $prov;
|
||||||
|
|
||||||
$text .= "
|
$text .= "
|
||||||
<tr>
|
<tr>
|
||||||
<td class='label'>".$prov."</td>
|
<td class='label'>".$label."</td>
|
||||||
<td class='control'>
|
<td class='control'>
|
||||||
";
|
";
|
||||||
foreach($val as $k=>$v)
|
foreach($val as $k=>$v)
|
||||||
|
@@ -229,9 +229,10 @@ class signup_shortcodes extends e_shortcode
|
|||||||
|
|
||||||
function sc_signup_hide_email()
|
function sc_signup_hide_email()
|
||||||
{
|
{
|
||||||
global $rs,$pref;
|
global $rs;
|
||||||
$default_email_setting = 1; // Gives option of turning into a pref later if wanted
|
$default_email_setting = 1; // Gives option of turning into a pref later if wanted
|
||||||
if ($pref['signup_option_realname'])
|
$pref = e107::getPref('signup_option_hideemail');
|
||||||
|
if ($pref)
|
||||||
{
|
{
|
||||||
return $rs->form_radio("hideemail", 1, $default_email_setting==1)." ".LAN_YES." ".$rs->form_radio("hideemail", 0,$default_email_setting==0)." ".LAN_NO;
|
return $rs->form_radio("hideemail", 1, $default_email_setting==1)." ".LAN_YES." ".$rs->form_radio("hideemail", 0,$default_email_setting==0)." ".LAN_NO;
|
||||||
}
|
}
|
||||||
|
@@ -435,6 +435,19 @@ $(document).ready(function()
|
|||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Does the same as externalLinks();
|
||||||
|
$('a').each(function() {
|
||||||
|
var href = $(this).attr("href");
|
||||||
|
var rel = $(this).attr("rel");
|
||||||
|
if(href && rel == 'external')
|
||||||
|
{
|
||||||
|
$(this).attr("target",'_blank');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user