[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 »

prinxpronx wrote:Thank you for your reply! I tried the new version of "functions_alternatelogin.php" and I haven't any error but, when I enter on "user panel" -> "Social Login Options", it return on index page....why? :?
And the facebook user, How he can delete his registration on forum? Thanks
When you enter the Social Login Options are you logged in as an Facebook user?

What do you mean by: "How he can delete his registration on forum?"
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 »

prinxpronx wrote:
mjimeyg wrote:When you enter the Social Login Options are you logged in as an Facebook user?
yes, with facebook user but as moderator or administrator
mjimeyg wrote:What do you mean by: "How he can delete his registration on forum?"
If the facebook users would like delete their account, how they can do?

And excuse me...how I can insert the facebook login button on top near to login?
Thanks again :)

For the Social Login Options page you will need to check the code changes all went through if you installed it manually.

If you want users to be able to delete their own accounts you will probably need to either write your own code or install a different MOD.

To change or add a Facebook sign in button you just need to move or copy the code for the button from the index_body.html file to the place where you want it in the overall_header.html file.
Questions answered via forums only, no pms or emails. Thank you.

ConSof Alternate Login for phpBB

Image Image

zamolxis
Registered User
Posts: 13
Joined: Thu Oct 04, 2012 2:46 am

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

Post by zamolxis »

{$phpEx} doesn't seem to work in hook_alternatelogin.php.
The twitter and openid urls are not built correctly - the ".php" extension is missing.

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 »

zamolxis wrote:{$phpEx} doesn't seem to work in hook_alternatelogin.php.
The twitter and openid urls are not built correctly - the ".php" extension is missing.
That was unfortunate oversight on my part, I forgot to add $phpEx to the global declaration.

You can replace the contents of includes/hooks/hook_alternatelogin.php with the following:

Code: Select all

<?php

class CSAlternateLogin
{
	function page_header(&$hook)
	{
		global $template, $user, $phpbb_root_path, $phpEx, $config;
		
		$result = $hook->previous_hook_result('phpbb_user_session_handler');
		
		// Begin Alternate Login code
        require_once($phpbb_root_path . 'includes/functions_alternatelogin.php'); // Include the functions for Alternate Login module
        $user->add_lang('mods/info_ucp_alternatelogin');
        if($user->data['session_fb_access_token'])
        {
            $graph_url = "https://graph.facebook.com/me?" . $user->data['session_fb_access_token'];


            $fb_user = json_decode(get_fb_data($graph_url));
            
            $fb_lang = $fb_user->locale;
        }
		
		$template->assign_vars(array(
			'S_AL_FB_ENABLED'								=> isset($config['al_fb_login']) ? $config['al_fb_login'] : false,
			'S_AL_TW_ENABLED'								=> isset($config['al_tw_login']) ? $config['al_tw_login'] : false,
			'S_AL_WL_ENABLED'								=> isset($config['al_wl_login']) ? $config['al_wl_login'] : false,
            'S_AL_OI_ENABLED'                               => isset($config['al_oi_login']) ? $config['al_oi_login'] : false,
			'S_AL_WL_USER'									=> isset($user->data['al_wl_id']) ? $user->data['al_wl_id'] : false,
			'S_AL_FB_USER'                                  => isset($user->data['al_fb_id']) ? $user->data['al_fb_id'] : false,
			'S_AL_TW_USER'                                  => isset($user->data['al_tw_id']) ? $user->data['al_tw_id'] : false,
			'S_AL_OI_USER'                                  => isset($user->data['al_oi_id']) ? $user->data['al_oi_id'] : false,
			'AL_FB_APPID'									=> isset($config['al_fb_id']) ? $config['al_fb_id'] : false,
			'AL_FB_SITE_DOMAIN'                             => isset($config['al_site_domain']) ? $config['al_site_domain'] : false,
			'AL_FB_ACTIVITY'                                => isset($config['al_fb_activity']) ? $config['al_fb_activity'] : false,
			'AL_FB_FACEPILE'                                => isset($config['al_fb_facepile']) ? $config['al_fb_facepile'] : false,
			'AL_FB_STREAM'                                  => isset($config['al_fb_stream']) ? $config['al_fb_stream'] : false,
			'AL_FB_LIKE_BOX'                                => isset($config['al_fb_like_box']) ? $config['al_fb_like_box'] : false,
			'S_AL_WL_CLIENT_ID'								=> isset($config['al_wl_client_id']) ? $config['al_wl_client_id'] : false,
			'S_AL_WL_WRAP_CALLBACK'                         => isset($config['al_wl_callback']) ? $config['al_wl_callback'] : false,
			'S_AL_WL_WRAP_CHANNEL'                          => isset($config['al_wl_channel']) ? $config['al_wl_channel'] : false,
			'AL_FB_APP_ID'                                  => isset($config['al_fb_id']) ? $config['al_fb_id'] : false,
			'AL_FB_PAGE_URL'                                => isset($config['al_fb_page_url']) ? $config['al_fb_page_url'] : false,
			'FB_APP_ID'                                     => isset($config['al_fb_id']) ? $config['al_fb_id'] : false,
			'AL_FB_USER_HIDE_ACTIVITY'                      => isset($user->data['al_fb_hide_activity']) ? $user->data['al_fb_hide_activity'] : false,
			'AL_FB_USER_HIDE_STREAM'                        => isset($user->data['al_fb_hide_stream']) ? $user->data['al_fb_hide_stream'] : false,
			'AL_FB_USER_HIDE_FACEPILE'                      => isset($user->data['al_fb_hide_facepile']) ? $user->data['al_fb_hide_facepile'] : false,
			'AL_FB_USER_HIDE_LIKE_BOX'                      => isset($user->data['al_fb_hide_like_box']) ? $user->data['al_fb_hide_like_box'] : false,
			'U_AL_WL_AUTHORIZE'                             => "https://oauth.live.com/authorize?client_id={$config['al_wl_client_id']}&scope=wl.signin%20wl.basic%20wl.birthday%20wl.emails%20wl.work_profile%20wl.postal_addresses&response_type=code&redirect_uri=" . urlencode($config['al_wl_callback']),
			'U_AL_TW_REQUEST'                               => "{$phpbb_root_path}alternatelogin/al_tw_connect.{$phpEx}?authentication=1",
			'U_AL_OI_LOGIN'                                 => "{$phpbb_root_path}alternatelogin/al_oi_auth.{$phpEx}",
			'S_FB_LOCALE'                                   => ($fb_lang) ? $fb_lang : 'en_GB',
			'S_RETURN_TO_PAGE'                              => "?return_to_page=" . base64_encode(build_url()),
			
			'U_PAGE_URL'                    				=> generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id",
		));
		
		
	}
}

$phpbb_hook->register('phpbb_user_session_handler', array('CSAlternateLogin', 'page_header'));

?>
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 »

prinxpronx wrote:I would like to insert it here:
Image

how can I do?

As I said before, to change or add a Facebook sign in button you just need to move or copy the code for the button from the index_body.html file to the place where you want it in the overall_header.html file.
Questions answered via forums only, no pms or emails. Thank you.

ConSof Alternate Login for phpBB

Image Image

User avatar
_Vinny_
Style Customisations
Style Customisations
Posts: 8575
Joined: Tue Aug 11, 2009 12:45 am
Location: Brazil
Name: Marcus Vinicius
Contact:

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

Post by _Vinny_ »

I'm testing this mod and after installation I get this error:
[phpBB Debug] PHP Notice: in file [ROOT]/includes/hooks/hook_alternatelogin.php on line 49: Undefined index: al_wl_callback
[phpBB Debug] PHP Notice: in file [ROOT]/includes/hooks/hook_alternatelogin.php on line 50: Undefined variable: phpEx
[phpBB Debug] PHP Notice: in file [ROOT]/includes/hooks/hook_alternatelogin.php on line 51: Undefined variable: phpEx
[phpBB Debug] PHP Notice: in file [ROOT]/includes/hooks/hook_alternatelogin.php on line 52: Undefined variable: fb_lang
[phpBB Debug] PHP Notice: in file [ROOT]/includes/hooks/hook_alternatelogin.php on line 55: Undefined variable: phpEx
[phpBB Debug] PHP Notice: in file [ROOT]/includes/hooks/hook_alternatelogin.php on line 55: Undefined variable: forum_id
[phpBB Debug] PHP Notice: in file [ROOT]/includes/hooks/hook_alternatelogin.php on line 55: Undefined variable: topic_id
And this o registration page:
Fatal error: Cannot redeclare get_wl_tokens() (previously declared in C:\xampp\htdocs\qi\boards\miolos\includes\functions_alternatelogin.php:49) in C:\xampp\htdocs\qi\boards\miolos\includes\functions_alternatelogin.php on line 99

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 »

_Vinny_ wrote:I'm testing this mod and after installation I get this error:
[phpBB Debug] PHP Notice: in file [ROOT]/includes/hooks/hook_alternatelogin.php on line 49: Undefined index: al_wl_callback
[phpBB Debug] PHP Notice: in file [ROOT]/includes/hooks/hook_alternatelogin.php on line 50: Undefined variable: phpEx
[phpBB Debug] PHP Notice: in file [ROOT]/includes/hooks/hook_alternatelogin.php on line 51: Undefined variable: phpEx
[phpBB Debug] PHP Notice: in file [ROOT]/includes/hooks/hook_alternatelogin.php on line 52: Undefined variable: fb_lang
[phpBB Debug] PHP Notice: in file [ROOT]/includes/hooks/hook_alternatelogin.php on line 55: Undefined variable: phpEx
[phpBB Debug] PHP Notice: in file [ROOT]/includes/hooks/hook_alternatelogin.php on line 55: Undefined variable: forum_id
[phpBB Debug] PHP Notice: in file [ROOT]/includes/hooks/hook_alternatelogin.php on line 55: Undefined variable: topic_id
And this o registration page:
Fatal error: Cannot redeclare get_wl_tokens() (previously declared in C:\xampp\htdocs\qi\boards\miolos\includes\functions_alternatelogin.php:49) in C:\xampp\htdocs\qi\boards\miolos\includes\functions_alternatelogin.php on line 99

The first is a missing global declaration for the $phpEx variable in the specified hook file.

The second I have no idea what is causing it but I added checks to the new version of the file in the post after this one.

You can download the full version which includes an upgrade path in the post below.
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 »

New Version:

Modification Download: http://sourceforge.net/projects/alterna ... p/download

GitHub Repository (Nightly builds): https://github.com/mjimeyg/alternate-login


Major changes to current version:
  • Added missing global declaration for $phpEx variable.
  • functions_alternatelogin.php: Added function_exists check for all functions to prevent function redeclaration error.
Questions answered via forums only, no pms or emails. Thank you.

ConSof Alternate Login for phpBB

Image Image

kamil-sat
Registered User
Posts: 15
Joined: Mon Dec 10, 2012 10:07 am
Location: Poland

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

Post by kamil-sat »

After install I have got this:

XML error: mismatched tag at line 341. View the file ./../store/mods/alternate-login-master/install_mod.xml in a web browser for a more detailed error message.

And then I have to manualy delete MOD folder from /store/mods/ because my ACP it's blocked on MOD's card (it shows error 404).
http://powiat-zabkowice.tk

User avatar
Louis7777
Registered User
Posts: 247
Joined: Sat Apr 21, 2012 9:22 pm

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

Post by Louis7777 »

kamil-sat wrote: XML error: mismatched tag at line 341. View the file ./../store/mods/alternate-login-master/install_mod.xml in a web browser for a more detailed error message.
You have to delete an extra <entry> tag from that file.

User avatar
_Vinny_
Style Customisations
Style Customisations
Posts: 8575
Joined: Tue Aug 11, 2009 12:45 am
Location: Brazil
Name: Marcus Vinicius
Contact:

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

Post by _Vinny_ »

kamil-sat wrote:After install I have got this:

XML error: mismatched tag at line 341. View the file ./../store/mods/alternate-login-master/install_mod.xml in a web browser for a more detailed error message.

And then I have to manualy delete MOD folder from /store/mods/ because my ACP it's blocked on MOD's card (it shows error 404).
http://powiat-zabkowice.tk
Open install_mod.xml on a text editor and delete the line 64.


@mjimeyg thank you for the update, but I still have the error.
UMIL installer: http://i.imgur.com/qh0vf.png
My ACP: http://i.imgur.com/9paEA.png

And this on registration pagen:
[phpBB Debug] PHP Notice: in file [ROOT]/includes/hooks/hook_alternatelogin.php on line 49: Undefined index: al_wl_callback
[phpBB Debug] PHP Notice: in file [ROOT]/includes/hooks/hook_alternatelogin.php on line 52: Undefined variable: fb_lang
[phpBB Debug] PHP Notice: in file [ROOT]/includes/hooks/hook_alternatelogin.php on line 55: Undefined variable: forum_id
[phpBB Debug] PHP Notice: in file [ROOT]/includes/hooks/hook_alternatelogin.php on line 55: Undefined variable: topic_id
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_alternatelogin.php on line 24: Constant AL_FACEBOOK_LOGIN already defined
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_alternatelogin.php on line 25: Constant AL_OPENID_LOGIN already defined
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_alternatelogin.php on line 26: Constant AL_OPENID_PROFILE already defined
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_alternatelogin.php on line 27: Constant AL_GOOGLE_LOGIN already defined
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_alternatelogin.php on line 28: Constant AL_GOOGLE_PROFILE already defined
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_alternatelogin.php on line 29: Constant AL_TWITTER_LOGIN already defined
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_alternatelogin.php on line 30: Constant AL_TWITTER_PROFILE already defined
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_alternatelogin.php on line 31: Constant AL_WINDOWSLIVE_LOGIN already defined
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_alternatelogin.php on line 32: Constant AL_WINDOWSLIVE_PROFILE already defined
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_alternatelogin.php on line 34: Constant AL_FB_SYNC_PROFILE already defined
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_alternatelogin.php on line 35: Constant AL_FB_SYNC_AVATAR already defined
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_alternatelogin.php on line 36: Constant AL_FB_SYNC_STATUS already defined
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_alternatelogin.php on line 38: Constant AL_HIDE_POST_LOGON already defined
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_alternatelogin.php on line 40: Constant AL_USER_OPTION_COUNT already defined
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_alternatelogin.php on line 42: Constant WL_COOKIE already defined
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_alternatelogin.php on line 43: Constant PCOOKIE already defined
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_alternatelogin.php on line 45: Constant HTTP_GET already defined
[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_alternatelogin.php on line 46: Constant HTTP_POST already defined
[phpBB Debug] PHP Notice: in file [ROOT]/includes/ucp/ucp_register.php on line 68: Trying to get property of non-object
[phpBB Debug] PHP Notice: in file [ROOT]/includes/ucp/ucp_register.php on line 256: Undefined variable: al_login
[phpBB Debug] PHP Notice: in file [ROOT]/includes/ucp/ucp_register.php on line 590: Undefined variable: al_login
[phpBB Debug] PHP Notice: in file [ROOT]/includes/ucp/ucp_register.php on line 591: Undefined variable: al_login_type
[phpBB Debug] PHP Notice: in file [ROOT]/includes/ucp/ucp_register.php on line 640: Undefined variable: al_login
[phpBB Debug] PHP Notice: in file [ROOT]/includes/ucp/ucp_register.php on line 641: Undefined variable: al_login_type
[phpBB Debug] PHP Notice: in file [ROOT]/includes/ucp/ucp_register.php on line 642: Undefined variable: al_login_type
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)

kamil-sat
Registered User
Posts: 15
Joined: Mon Dec 10, 2012 10:07 am
Location: Poland

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

Post by kamil-sat »

Thanks Vinny. I have done all installation process of this MOD. Without any errors. I want to set up a login through facebook on my forum. I have my app ID/secret keys and i used them in ACP.
On my forum everything seems is OK but when I try to login by Facebook, for a second I see that I am logged in, and then the page refreshes and I'm logged out again.
http://powiat-zabkowice.tk


edit:
Hmm
When I clicked on the "sign in" and logged in to FB, for a while I see a message on my forum that I logged in correctly. Then the page automatically refreshes and I'm logged out. But if I keep this page with a message that a successful login, all is well and I can use the forum as a Facebook user. How to fix it?

ps. I hope you understand my poor english

Locked

Return to “[3.0.x] Abandoned MODs”