[ABD]AlternateLogin(Windows Live,Facebook,OpenID)

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
User avatar
mjimeyg
Registered User
Posts: 840
Joined: Sat Aug 29, 2009 7:38 pm
Location: London

Re: [RC]AlternateLogin(Windows Live,Facebook,Twitter,OpenID)

Post by mjimeyg »

d3v1l13 wrote:
mjimeyg wrote:The mod shouldn't affect your password at all, but if it seems to have done so you can change your password in the UCP and then try logging into the ACP again.
Yes, probably it shouldn't, but it did... and i cannot change my passwors ad it keep saying that current password is incorect...

I have installed the mod, set details for logging in with facebook and twitter, tested it with facebook, worked. I logout and then tested with twitter, asked me if i want to link accounts or something like that, i said yes. I logout again and when i put my old username and password, says invalid username or password.
And i wrote them corectly.
I could login again with twitter, as administrator, but as i said before, i cannot access my admin control pannel because there is no social login there and the password doesn't work anymore.
Ugly situation... i cannot do anything without acp... isn't any way to solve that besides restore a backup ?

Later edit: i solved it with "i forgot my password" option. I'm pretty sure that the problem was somehow caused by this mod. Anyway, thanks for the mod, it's really great.

A question: i have added openid login option, but can i elliminate some of the options ?
I mean keep only steam, yahoo and google there and join them with the facebook and twitter line
You need to edit the openid-en.js file and remove the sections you don't want, I'm not sure about putting it in line, you will need to consult a style editor.
Questions answered via forums only, no pms or emails. Thank you.

ConSof Alternate Login for phpBB

Image Image
User avatar
d3v1l13
Registered User
Posts: 52
Joined: Thu Jul 22, 2010 9:07 am

Re: [RC]AlternateLogin(Windows Live,Facebook,Twitter,OpenID)

Post by d3v1l13 »

I solved that, but social login options are not showing to the visitors, where can i change that ?

Another thing: in order to put those social login options as a button in my index body, can i use some other link besides "javascript:openid.signin('steam');" for example, i mean an url that should connect players to the steam / yahoo / google connection page ?
The facebook and twitter work that way, but the others don't.

Thanks.
sevenalive
Registered User
Posts: 437
Joined: Thu Feb 07, 2008 4:45 am

Re: [RC]AlternateLogin(Windows Live,Facebook,Twitter,OpenID)

Post by sevenalive »

[ROOT]/alternatelogin/al_fb_connect.php on line 203: sprintf() [function.sprintf]: Too few arguments

Installed the new version through automod, getting this error on the redirect during fb login.
User avatar
mjimeyg
Registered User
Posts: 840
Joined: Sat Aug 29, 2009 7:38 pm
Location: London

Re: [RC]AlternateLogin(Windows Live,Facebook,Twitter,OpenID)

Post by mjimeyg »

d3v1l13 wrote:I solved that, but social login options are not showing to the visitors, where can i change that ?

Another thing: in order to put those social login options as a button in my index body, can i use some other link besides "javascript:openid.signin('steam');" for example, i mean an url that should connect players to the steam / yahoo / google connection page ?
The facebook and twitter work that way, but the others don't.

Thanks.
The openid buttons are part of a jquery plugin which is why they use a javascript call. All the buttons eventually redirect to one of the al_*_connect.php files in the alternatelogin directory.
Questions answered via forums only, no pms or emails. Thank you.

ConSof Alternate Login for phpBB

Image Image
User avatar
mjimeyg
Registered User
Posts: 840
Joined: Sat Aug 29, 2009 7:38 pm
Location: London

Re: [RC]AlternateLogin(Windows Live,Facebook,Twitter,OpenID)

Post by mjimeyg »

sevenalive wrote:[ROOT]/alternatelogin/al_fb_connect.php on line 203: sprintf() [function.sprintf]: Too few arguments

Installed the new version through automod, getting this error on the redirect during fb login.
I checked the code and retested my development and demo boards and I don't get that error.

Can you try replacing the code in the al_fb_connect.php file with this code:

Code: Select all

<?php
/*
	COPYRIGHT 2009 Michael J Goonawardena

	This file is part of ConSof Alternate Login.

    ConSof Alternate Login is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    ConSof Alternate Login is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with ConSof Alternate Login.  If not, see <http://www.gnu.org/licenses/>.*/


// Basic setup of phpBB variables.
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);

// Load include files.
include($phpbb_root_path . 'common.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
include_once($phpbb_root_path . 'includes/functions_alternatelogin.' . $phpEx);	// Custom Alternate Login functions.

// Set up a new user session.
$user->session_begin();
$auth->acl($user->data);
$user->setup('ucp');
$user->add_lang('mods/info_acp_alternatelogin');	// Global Alternate Login language file.
$user->add_lang('mods/info_ucp_alternatelogin');


// Make sure that Facebook login is enabled for this site.
if($config['al_fb_login'] == 0)
{
	// Inform the user that this feature is unavailable
	trigger_error(sprintf($user->lang['AL_LOGIN_UNAVAILABLE'], $user->lang['FACEBOOK']));
}

$return_to_page = request_var('return_to_page', base64_encode("{$phpbb_root_path}index.{$phpEx}"));
$admin = request_var('admin', 0);

$access_token = get_fb_access_token($return_to_page);

if(!$access_token)
{
    add_log('critical', $user->data['user_id'], 'FB_ERROR_ACCESS_TOKEN');
    trigger_error($user->lang['FB_ERROR_ACCESS_TOKEN']);
}
$return_to_page = base64_decode($return_to_page);
$return_to_page = str_replace("../", "", $return_to_page);
$return_to_page = str_replace("./", "", $return_to_page);

// Store the access token for use with this session.
        $sql_array = array(
            'session_fb_access_token'   => $access_token,
        );

        $sql = "UPDATE " . SESSIONS_TABLE . " SET " . $db->sql_build_array('UPDATE', $sql_array) . " WHERE session_id='" . $user->data['session_id'] . "'";
        
        $db->sql_query($sql);
        
//echo 'token:' . print_r($token_url);
$graph_url = "https://graph.facebook.com/me?" . $access_token;


$fb_user = json_decode(get_fb_data($graph_url));

//echo("Hello " . $fb_user->name);
//print_r($fb_user);
// Check to see if we have a valid Facebook user.
if(!$fb_user)
{
    add_log('critical', $user->data['user_id'], 'FB_ERROR_USER');
    // Inform the user that we couldn't get their Facebook Id.
    trigger_error(sprintf($user->lang['FB_ERROR_USER'], $user->lang['FACEBOOK']));
}
$user->lang_name = substr($fb_user->locale, 0, 2);
// Select the user_id from the Alternate Login user data table which has the same Facebook Id.



$sql = 'SELECT user_id, username, user_password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts
		FROM ' . USERS_TABLE . "
		WHERE al_fb_id = " . $fb_user->id;
        

// Execute the query.
$result = $db->sql_query($sql);

// Retrieve the row data.
$row = $db->sql_fetchrow($result);

// Free up the result handle from the query.
$db->sql_freeresult($result);

// Check to see if we found a user_id with the associated Facebook Id.
if ($row)   // User is registered already, let's log him in!
{
        
	$old_session_id = $user->session_id;

        if ($admin)
        {
                global $SID, $_SID;

                $cookie_expire = time() - 31536000;
                $user->set_cookie('u', '', $cookie_expire);
                $user->set_cookie('sid', '', $cookie_expire);
                unset($cookie_expire);

                $SID = '?sid=';
                $user->session_id = $_SID = '';
        }

        $admin = false;
		$autologin = true;
		$viewonline = true;
        $result = $user->session_create($row['user_id'], $admin, $autologin, $viewonline);
		
        // Successful session creation
        if ($result === true)
        {
                // If admin re-authentication we remove the old session entry because a new one has been created...
                if ($admin)
                {
                        // the login array is used because the user ids do not differ for re-authentication
                        $sql = 'DELETE FROM ' . SESSIONS_TABLE . "
                                WHERE session_id = '" . $db->sql_escape($old_session_id) . "'
                                AND session_user_id = {$row['user_id']}";
                        $db->sql_query($sql);
                }

                // Store the access token for use with this session.
                $sql_array = array(
                    'session_fb_access_token'   => $access_token,
                );

                $sql = "UPDATE " . SESSIONS_TABLE . " SET " . $db->sql_build_array('UPDATE', $sql_array) . " WHERE session_id='" . $user->data['session_id'] . "'";

                $db->sql_query($sql);
                $data = array();
                // Update the stored data such as profile and signatures.  Avatar is a dynamic field and doesn't require changing.

                if($user->data['al_fb_profile_sync'])
                {

                    $graph_url = "https://graph.facebook.com/me?" . $access_token;

                    $fb_user = json_decode(get_fb_data($graph_url));

                    $data['user_website']                    = isset($fb_user->website) ? $fb_user->website : '';
                    $data['user_from']                   = isset($fb_user->location->name) ? $fb_user->location->name : '';
                    $data['user_occ']                 = isset($fb_user->work[0]->employer->name) ? $fb_user->work[0]->employer->name : '';
					if(isset($fb_user->birthday))
					{
						$bday = explode('/', $fb_user->birthday);
						$data['user_birthday']              = sprintf('%2d-%2d-%4d', $bday[1], $bday[0], $bday[2]);
					}

                }

                if($user->data['al_fb_status_sync'])
                {
                    include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
                    $graph_url = "https://graph.facebook.com/me/statuses?" . $access_token;

                    $fb_user = json_decode(get_fb_data($graph_url));

                    $signature = $fb_user->data[0]->message;

                    $enable_bbcode                      = ($config['allow_sig_bbcode']) ? (bool) $user->optionget('sig_bbcode') : false;
                    $enable_smilies                     = ($config['allow_sig_smilies']) ? (bool) $user->optionget('sig_smilies') : false;
                    $enable_urls                        = ($config['allow_sig_links']) ? (bool) $user->optionget('sig_links') : false;

                    $message_parser = new parse_message($signature);

                    // Allowing Quote BBCode
                    $message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, $config['allow_sig_links'], true, 'sig');

                    $data['user_sig']                   = (string) $message_parser->message;
                    $data['user_options']               = $user->data['user_options'];
                    $data['user_sig_bbcode_uid']	= (string) $message_parser->bbcode_uid;
                    $data['user_sig_bbcode_bitfield']	= $message_parser->bbcode_bitfield;
                }

                if($user->data['al_fb_profile_sync'] || $user->data['al_fb_status_sync'])
                {
                    $sql = 'UPDATE ' . USERS_TABLE . '
                            SET ' . $db->sql_build_array('UPDATE', $data) . '
                            WHERE user_id = ' . $user->data['user_id'];

                    $db->sql_query($sql);
                }
                
                meta_refresh(3, "$phpbb_root_path$return_to_page");
                trigger_error(sprintf($user->lang['LOGIN_SUCCESS'] . "<br /><br />" . sprintf($user->lang['RETURN_PAGE'], "<a href='{$phpbb_root_path}{$return_to_page}'>", "</a>")));
                
                redirect("{$phpbb_root_path}index.$phpEx");
        }
        else
        {
            trigger_error($user->lang['LOGIN_FAILED']);
        }
        

        

}

$sql = 'SELECT user_id, username, user_password, user_passchg, user_pass_convert, user_email, user_type, user_login_attempts
		FROM ' . USERS_TABLE . "
		WHERE user_email = '" . mysql_escape_string($fb_user->email) . "'";
        

// Execute the query.
$result = $db->sql_query($sql);

// Retrieve the row data.
$row = $db->sql_fetchrow($result);

// Free up the result handle from the query.
$db->sql_freeresult($result);

if($row)
{
    $old_session_id = $user->session_id;

        if ($admin)
        {
                global $SID, $_SID;

                $cookie_expire = time() - 31536000;
                $user->set_cookie('u', '', $cookie_expire);
                $user->set_cookie('sid', '', $cookie_expire);
                unset($cookie_expire);

                $SID = '?sid=';
                $user->session_id = $_SID = '';
        }

        $result = $user->session_create($row['user_id'], $admin, $autologin, $viewonline);

        // Store the access token for use with this session.
        $sql_array = array(
            'session_fb_access_token'   => $access_token,
        );

        $sql = "UPDATE " . SESSIONS_TABLE . " SET " . $db->sql_build_array('UPDATE', $sql_array) . " WHERE session_id='" . $user->data['session_id'] . "'";

        $db->sql_query($sql);
        
        // Successful session creation
        if ($result === true)
        {
                // If admin re-authentication we remove the old session entry because a new one has been created...
                if ($admin)
                {
                        // the login array is used because the user ids do not differ for re-authentication
                        $sql = 'DELETE FROM ' . SESSIONS_TABLE . "
                                WHERE session_id = '" . $db->sql_escape($old_session_id) . "'
                                AND session_user_id = {$row['user_id']}";
                        $db->sql_query($sql);
                }

                $sql_array = array(
                    'al_fb_id'      => $fb_user->id,
                    'al_wl_id'      => 0,
                    'al_tw_id'      => 0,
                    'al_oi_id'      => 0,
                );

                // Prepare the query to update the users Alternate Login record.
                $sql = 'UPDATE ' . USERS_TABLE
                . " SET " . $db->sql_build_array('UPDATE', $sql_array)
                . " WHERE user_id='{$user->data['user_id']}'";


                // Execute the query.
		$result = $db->sql_query($sql);

                if(!$result)
		{
			trigger_error($user->lang['AL_PHPBB_DB_FAILURE']);
		}
                else
		{
			trigger_error(sprintf($user->lang['LOGIN_SUCCESS'] . "<br /><br />" . sprintf($user->lang['RETURN_INDEX'], "<a href='{$phpbb_root_path}index.php'>", "</a>")));
		}
        }
        else
        {
            trigger_error($user->lang['LOGIN_FAILED']);
        }
}
else
{
	// No user was registered with the associate Facebook Id.
	// We need to see if they are anonymous.
	// If they are then that means they might want to register.
	// We will check to see if they wish to register.
	if($user->data['user_id'] == ANONYMOUS)
	{
            if(!$config['al_fb_quick_accounts'])
            {
                // Check to make sure the email is not already registered.
                $sql_array = array(
                    'SELECT'    => 'COUNT(user_email) AS user_email',
                    'FROM'      => array(USERS_TABLE => 'u'),
                    'WHERE'     => "user_email ='" . mysql_escape_string($fb_user->email) . "'",
                );
                
                $sql = $db->sql_build_query('SELECT', $sql_array);
                
                $result = $db->sql_query($sql);
                
                $email_registered = (int)$db->sql_fetchfield('user_email');
                
                if($email_registered > 0)
                {
                    trigger_error($user->lang['EMAIL_TAKEN_EMAIL']);
                }
		
                // Most of this code comes straight out of ucp_register.php
                $message = 'TERMS_OF_USE_CONTENT';
                $title = 'TERMS_USE';
                $user->lang_name = substr($fb_user->locale, 0, 2);
                if (empty($user->lang[$message]))
                {
                        if ($user->data['is_registered'])
                        {
                                redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
                        }

                        login_box();
                }

                $template->set_filenames(array(
                        'body'		=> 'ucp_agreement.html')
                );

                // Disable online list
                page_header($user->lang[$title], false);

                $s_hidden_fields = array(	'al_login' 		=> 1,
                                                                        'al_login_type'	=> AL_FACEBOOK_LOGIN,
                                                                        'al_fb_user'	=> $fb_user->id
                );

                $add_lang                       = '&int=' . $fb_user->locale;
                $coppa				= (isset($_REQUEST['coppa'])) ? ((!empty($_REQUEST['coppa'])) ? 1 : 0) : false;
                        if ($coppa === false && $config['coppa_enable'])
                        {
                                $now = getdate();
                                $coppa_birthday = $user->format_date(mktime($now['hours'] + $user->data['user_dst'], $now['minutes'], $now['seconds'], $now['mon'], $now['mday'] - 1, $now['year'] - 13), $user->lang['DATE_FORMAT']);
                                unset($now);

                                $template->assign_vars(array(
                                        'L_COPPA_NO'		=> sprintf($user->lang['UCP_COPPA_BEFORE'], $coppa_birthday),
                                        'L_COPPA_YES'		=> sprintf($user->lang['UCP_COPPA_ON_AFTER'], $coppa_birthday),

                                        'U_COPPA_NO'		=> append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register&coppa=0' . $add_lang),
                                        'U_COPPA_YES'		=> append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register&coppa=1' . $add_lang),

                                        'S_SHOW_COPPA'		=> true,
                                        'S_HIDDEN_FIELDS'	=> build_hidden_fields($s_hidden_fields),
                                        'S_UCP_ACTION'		=> append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register' . $add_lang),
                                ));
                        }
                        else
                        {
                                $template->assign_vars(array(
                                        'L_TERMS_OF_USE'	=> sprintf($user->lang['TERMS_OF_USE_CONTENT'], $config['sitename'], generate_board_url()),

                                        'S_SHOW_COPPA'		=> false,
                                        'S_REGISTRATION'	=> true,
                                        'S_HIDDEN_FIELDS'	=> build_hidden_fields($s_hidden_fields),
                                        'S_UCP_ACTION'		=> append_sid("{$phpbb_root_path}alternatelogin/al_fb_registration.$phpEx", 'mode=register' . $add_lang . $add_coppa),
                                        )
                                );
                        }

                page_footer();
            }
            else 
            {
                $data = array(
                    'username'		=> $fb_user->name,
                    'email'			=> strtolower($fb_user->email),
                    'email_confirm'		=> strtolower($fb_user->email),
                    'lang'                   => substr($fb_user->locale, 0, 2),
                    'tz'			=> (float) $fb_user->timezone,
                );
                
                $validate_username = validate_username($data['username']);

                if($validate_username)
                {
                    trigger_error($user->lang[$validate_username . '_USERNAME'] . ' <br /><br /><a href="' . $phpbb_root_path . '/alternatelogin/al_fb_registration.' . $phpEx . '?mode=register">' . $user->lang['BACK_TO_PREV'] . "</a>");            
                }

                $new_password = $fb_reg_data['user_id'] . $config['al_fb_key'] . $config['al_fb_secret'];


                $data['new_password'] = $new_password;
                $data['password_confirm'] = $new_password;
                add_log('critical', $user->data['user_id'], 'FB Password', $new_password);
                $error = validate_data($data, array(
                    'username'			=> array(
                                                        array('string', false, $config['min_name_chars'], $config['max_name_chars']),
                                                        array('username', '')),

                    'email'                     => array(
                                                        array('string', false, 6, 60),
                                                        array('email')),
                    'email_confirm'		=> array('string', false, 6, 60),
                    'tz'			=> array('num', false, -14, 14),
                    'lang'			=> array('match', false, '#^[a-z_\-]{2,}$#i'),
                ));


        
                // DNSBL check
                if ($config['check_dnsbl'])
                {
                    if (($dnsbl = $user->check_dnsbl('register')) !== false)
                    {
                        $error[] = sprintf($user->lang['IP_BLACKLISTED'], $user->ip, $dnsbl[1]);
                    }
                }

                if (!sizeof($error))
                {
                    if ($data['new_password'] != $data['password_confirm'])
                    {
                        $error[] = $user->lang['NEW_PASSWORD_ERROR'];
                    }

                    if ($data['email'] != $data['email_confirm'])
                    {
                        $error[] = $user->lang['NEW_EMAIL_ERROR'];
                    }
                }

                if (!sizeof($error))
                {
                    $server_url = generate_board_url();

                    // Which group by default?
                    $group_name = ($coppa) ? 'REGISTERED_COPPA' : 'REGISTERED';

                    $sql = 'SELECT group_id
                            FROM ' . GROUPS_TABLE . "
                            WHERE group_name = '" . $db->sql_escape($group_name) . "'
                                    AND group_type = " . GROUP_SPECIAL;
                    $result = $db->sql_query($sql);
                    $row = $db->sql_fetchrow($result);
                    $db->sql_freeresult($result);

                    if (!$row)
                    {
                        trigger_error('NO_GROUP');
                    }

                    $group_id = $row['group_id'];

                    
                        $user_type = USER_NORMAL;
                        $user_actkey = '';
                        $user_inactive_reason = 0;
                        $user_inactive_time = 0;
                    
                    $bday = explode('/', $fb_user->birthday);
                    $user_row = array(
                        'username'				=> $data['username'],
                        'user_password'			=> phpbb_hash($data['new_password']),
                        'user_email'			=> $data['email'],
                        'group_id'				=> (int) $group_id,
                        'user_timezone'			=> (float) $data['tz'],
                        'user_dst'				=> $is_dst,
                        'user_lang'				=> $data['lang'],
                        'user_type'				=> $user_type,
                        'user_actkey'			=> $user_actkey,
                        'user_ip'				=> $user->ip,
                        'user_regdate'			=> time(),
                        'user_inactive_reason'	=> $user_inactive_reason,
                        'user_inactive_time'	=> $user_inactive_time,
                        'al_fb_id'              => $fb_user->id,
                        'user_avatar_type'      => AVATAR_REMOTE,
                        'user_avatar_width'     => 100,
                        'user_avatar_height'    => 100,
                        'user_avatar'           => 'https://graph.facebook.com/' . $fb_user->id . '/picture?type=normal',
                        'al_fb_avatar_sync'     => 1,
                        'al_fb_profile_sync'    => 1,
                    
                        'user_website'                    => (!$fb_user->website) ? '' : $fb_user->website,
                        'user_from'                   => (!$fb_user->location->name) ? '' : $fb_user->location->name,
                        'user_occ'                 => (!$fb_user->work[0]->employer->name) ? '' : $fb_user->work[0]->employe->name,

                        'user_birthday'              => sprintf('%2d-%2d-%4d', $bday[1], $bday[0], $bday[2]),
                    );
                    
                    if ($config['new_member_post_limit'])
                    {
                        $user_row['user_new'] = 1;
                    }
                    
                    // Register user...
                    $user_id = user_add($user_row, $cp_data);

                    // This should not happen, because the required variables are listed above...
                    if ($user_id === false)
                    {
                        trigger_error('NO_USER', E_USER_ERROR);
                    }
                    
                    redirect("{$phpbb_root_path}/alternatelogin/al_fb_connect.{$phpEx}");
                }
                else
                {
                    trigger_error(implode('<br />', $error));
                }
            }
        }
		else
		{
			// No user was registered with the associate Facebook Id.
			// We need to see if they are anonymous.
			// If they are then that means they might want to register.
			// We will check to see if they wish to register.
			if($user->data['user_id'] == ANONYMOUS)
			{
				
					redirect(append_sid("{$phpbb_root_path}ucp.$phpEx?mode=register"));
				
			}
			else
			{
				// If they are not anonymous then we can assume they are current users wishing
				// to link their accounts.
		
				
		
				// Did we get data, if yes then the user has another account registered.
				// We need to unlink that account as well.
				$sql_array = array(
					'al_fb_id'      => $fb_user->id,
					'al_wl_id'      => 0,
					'al_tw_id'      => 0,
					'al_oi_id'      => 0,
				);
		
				// Prepare the query to update the users Alternate Login record.
				$sql = 'UPDATE ' . USERS_TABLE
				. " SET " . $db->sql_build_array('UPDATE', $sql_array)
				. " WHERE user_id='{$user->data['user_id']}'";
		
		
				// Execute the query.
				$result = $db->sql_query($sql);
		
						if(!$result)
				{
					trigger_error($user->lang['AL_PHPBB_DB_FAILURE']);
				}
		
					   
		
				// Tell the user if they suceeded or not.
				if(!$result)
				{
					trigger_error($user->lang['AL_PHPBB_DB_FAILURE']);
				}
				else
				{
					trigger_error(sprintf($user->lang['AL_LINK_SUCCESS'], $user->lang['FACEBOOK'], $user->lang['FACEBOOK']));
				}
			}
		}
}

?>
Questions answered via forums only, no pms or emails. Thank you.

ConSof Alternate Login for phpBB

Image Image
neilsav
Registered User
Posts: 27
Joined: Tue Apr 20, 2010 3:16 am

Re: [RC]AlternateLogin(Windows Live,Facebook,Twitter,OpenID)

Post by neilsav »

This is weird, after months of using this plugin all of the sudden I am getting this error when trying to use facebook connect (http://www.thelocalgolfer.com/golf-foru ... e=register#):

An error occurred. Please try again later.

API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: Invalid redirect_uri: Given URL is not allowed by the Application configuration.

Did something change on Facebook's side?
sevenalive
Registered User
Posts: 437
Joined: Thu Feb 07, 2008 4:45 am

Re: [RC]AlternateLogin(Windows Live,Facebook,Twitter,OpenID)

Post by sevenalive »

Checked the file, it's identical. The login still works, but the error still showing.

Wasn't a problem before. I uninstalled via automod. That all went fine. Seems to be point to the functions file, output header errors.
User avatar
mjimeyg
Registered User
Posts: 840
Joined: Sat Aug 29, 2009 7:38 pm
Location: London

Re: [RC]AlternateLogin(Windows Live,Facebook,Twitter,OpenID)

Post by mjimeyg »

neilsav wrote:This is weird, after months of using this plugin all of the sudden I am getting this error when trying to use facebook connect (http://www.thelocalgolfer.com/golf-foru ... e=register#):

An error occurred. Please try again later.

API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: Invalid redirect_uri: Given URL is not allowed by the Application configuration.

Did something change on Facebook's side?
I haven't noticed any changes and I haven't made any changes to the alternate login facebook code.

I can only suggest rechecking all your keys, secrets and urls match up in the ACP and the Facebook app page.
Questions answered via forums only, no pms or emails. Thank you.

ConSof Alternate Login for phpBB

Image Image
User avatar
mjimeyg
Registered User
Posts: 840
Joined: Sat Aug 29, 2009 7:38 pm
Location: London

Re: [RC]AlternateLogin(Windows Live,Facebook,Twitter,OpenID)

Post by mjimeyg »

sevenalive wrote:Checked the file, it's identical. The login still works, but the error still showing.

Wasn't a problem before. I uninstalled via automod. That all went fine. Seems to be point to the functions file, output header errors.
Can you post a link to your site?
Questions answered via forums only, no pms or emails. Thank you.

ConSof Alternate Login for phpBB

Image Image
sevenalive
Registered User
Posts: 437
Joined: Thu Feb 07, 2008 4:45 am

Re: [RC]AlternateLogin(Windows Live,Facebook,Twitter,OpenID)

Post by sevenalive »

http://ittakestime.org/forum

The login still works, the redirect message is missing.

Error also points to the functions file.
User avatar
mjimeyg
Registered User
Posts: 840
Joined: Sat Aug 29, 2009 7:38 pm
Location: London

Re: [RC]AlternateLogin(Windows Live,Facebook,Twitter,OpenID)

Post by mjimeyg »

sevenalive wrote:http://ittakestime.org/forum

The login still works, the redirect message is missing.

Error also points to the functions file.
I tried to access the link you gave but every time I try and visit the site it attempts to log me in regardless of the page I am on and I get a Facebook Error. This isn't part of the behaviour of the AlternateLogin Mod so I can only assume this is an edit you made yourself.

Also, can you provide the text of the error that tells you it is in the function file as the previous error you posted shows it to be in the al_fb_alternatelogin.php file.
Questions answered via forums only, no pms or emails. Thank you.

ConSof Alternate Login for phpBB

Image Image
User avatar
d3v1l13
Registered User
Posts: 52
Joined: Thu Jul 22, 2010 9:07 am

Re: [RC]AlternateLogin(Windows Live,Facebook,Twitter,OpenID)

Post by d3v1l13 »

mjimeyg wrote:
d3v1l13 wrote:I solved that, but social login options are not showing to the visitors, where can i change that ?

Another thing: in order to put those social login options as a button in my index body, can i use some other link besides "javascript:openid.signin('steam');" for example, i mean an url that should connect players to the steam / yahoo / google connection page ?
The facebook and twitter work that way, but the others don't.

Thanks.
The openid buttons are part of a jquery plugin which is why they use a javascript call. All the buttons eventually redirect to one of the al_*_connect.php files in the alternatelogin directory.
Can you provide me an example of url, for steam or yahoo, for example please ?
User avatar
robra
Registered User
Posts: 147
Joined: Thu Dec 09, 2010 2:09 am
Location: Brazil

Error on install_mod_update_2012.11.27.01-2012.12.10.01.xml

Post by robra »

The file contrib\install_mod_update_2012.11.27.01-2012.12.10.01.xml has an error. Look the lines below, 49 - 65:

Code: Select all

                    <entry>
                        <date>2012.12.10</date>
                        <rev-version>2012.12.10.01</rev-version>
                        <changelog lang="en">
							<change>functions_alternatelogin.php: Added function_exists check for all functions to combat redeclaration error.</change>
							<change>hook_alternatelogin.php: Added missing $phpEx global declaration.</change>
                        </changelog>
                    </entry>
				<entry>
				<entry>
                        <date>2012.11.27</date>
                        <rev-version>2012.11.27.01</rev-version>
                        <changelog lang="en">
							<change>functions_alternatelogin.php: Removed deprecated function al_validate_admin.</change>
							
                        </changelog>
                    </entry>
On the line 57 and 58 has the tag <entry> when would be only 1 line with this tag.
It generates an error when we use the AutoMOD to apply the MOD on other style.

[ ].
Last edited by robra on Fri Dec 28, 2012 12:15 pm, edited 8 times in total.
neilsav
Registered User
Posts: 27
Joined: Tue Apr 20, 2010 3:16 am

Re: [RC]AlternateLogin(Windows Live,Facebook,Twitter,OpenID)

Post by neilsav »

mjimeyg wrote:
neilsav wrote:This is weird, after months of using this plugin all of the sudden I am getting this error when trying to use facebook connect (http://www.thelocalgolfer.com/golf-foru ... e=register#):

An error occurred. Please try again later.

API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: Invalid redirect_uri: Given URL is not allowed by the Application configuration.

Did something change on Facebook's side?
I haven't noticed any changes and I haven't made any changes to the alternate login facebook code.

I can only suggest rechecking all your keys, secrets and urls match up in the ACP and the Facebook app page.
Just reset the secret, the URL's and Keys match exactly. I did notice in the facebook settings it does require a secure canvas URL - does facebook now require SSL? Anything else to try?
User avatar
mjimeyg
Registered User
Posts: 840
Joined: Sat Aug 29, 2009 7:38 pm
Location: London

Re: [RC]AlternateLogin(Windows Live,Facebook,Twitter,OpenID)

Post by mjimeyg »

neilsav wrote:
mjimeyg wrote:
neilsav wrote:This is weird, after months of using this plugin all of the sudden I am getting this error when trying to use facebook connect (http://www.thelocalgolfer.com/golf-foru ... e=register#):

An error occurred. Please try again later.

API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: Invalid redirect_uri: Given URL is not allowed by the Application configuration.

Did something change on Facebook's side?
I haven't noticed any changes and I haven't made any changes to the alternate login facebook code.

I can only suggest rechecking all your keys, secrets and urls match up in the ACP and the Facebook app page.
Just reset the secret, the URL's and Keys match exactly. I did notice in the facebook settings it does require a secure canvas URL - does facebook now require SSL? Anything else to try?
Where are you seeing the aforementioned error? Whenever I try to sign up to your site I get redirected to a Facebook Error page with no details.

Is your Facebook App in Sandbox Mode?
Questions answered via forums only, no pms or emails. Thank you.

ConSof Alternate Login for phpBB

Image Image
Locked

Return to “[3.0.x] Abandoned MODs”