[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.
Locked
Peter77sx
Registered User
Posts: 3258
Joined: Wed Nov 09, 2005 2:51 pm

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

Post by Peter77sx »

Hello, the facebook registration/login process worked flawlessly on the demo site. very nice :)

_mayhem_
Registered User
Posts: 53
Joined: Fri Apr 18, 2008 9:17 pm
Location: Turkey - istanbul
Name: Unsal ASLANBAS
Contact:

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

Post by _mayhem_ »

mjimeyg wrote:
_mayhem_ wrote:Modification Version:: 2011.05.08.01


install.xml -- can not be displayed

firefox
opera
ie

:(

.../alternatelogin/install.xml

Code: Select all

http://opensource.org/licenses/gpl-license.php GNU General Public License v2 Alternate Login Enable users to log in to a phpBB board via another website authentication method and synchronise profile information. Currently available: Facebook This is an ALPHA version. Has not been tested fully or under load. Michael J Goonawardena Mjimeyg http://www.consof.com michaelgoonawardena@googlemail.com 2011.03.05 easy 960 3.0.8 INSERT INTO `phpbb_config` ( `config_name` , `config_value` , `is_dynamic` ) VALUES ( 'alternatelogin_settings', '0', '0' ); INSERT INTO `phpbb_config` ( `config_name` , `config_value` , `is_dynamic` ) VALUES ( 'al_path', 'alternatelogin/', '0' ); 'U_TOPIC' => "{$server_path}viewtopic.$phpEx?f=$forum_id&t=$topic_id", 'U_PAGE_URL' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id", require($phpbb_root_path . 'includes/functions_module.' . $phpEx); require($phpbb_root_path . 'includes/functions_alternatelogin.' . $phpEx); login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false); if($user->data['al_fb_id'] || $user->data['al_oi_id'] || $user->data['al_wl_id']) { al_validate_admin(); } else { login_box('', $user->lang['LOGIN_ADMIN_CONFIRM'], $user->lang['LOGIN_ADMIN_SUCCESS'], true, false); } if (strpos($user_lang, '-x-') !== false) { $user_lang = substr($user_lang, 0, strpos($user_lang, '-x-')); } // Begin Alternate Login code require_once('functions_alternatelogin.php'); // Include the functions for Alternate Login module $user->add_lang('mods/alternatelogin'); 'SITENAME' => $config['sitename'], 'S_AL_FB_ENABLED' => $config['al_fb_login'], 'S_AL_OI_ENABLED' => $config['al_oi_login'], 'S_AL_WL_ENABLED' => $config['al_wl_login'], 'S_AL_WL_USER' => $user->data['al_wl_id'], 'S_AL_FB_USER' => $user->data['al_fb_id'], 'S_AL_OI_USER' => $user->data['al_oi_id'], 'AL_FB_APPID' => $config['al_fb_id'], 'AL_FB_SITE_DOMAIN' => $config['al_site_domain'], 'AL_FB_ACTIVITY' => $config['al_fb_activity'], 'AL_FB_FACEPILE' => $config['al_fb_facepile'], 'AL_FB_STREAM' => $config['al_fb_stream'], 'S_AL_WL_CLIENT_ID' => $config['al_wl_client_id'], 'S_AL_WL_WRAP_CALLBACK' => generate_board_url() . '/OAuthWrapCallBack.' . $phpEx, 'S_AL_WL_WRAP_CHANNEL' => generate_board_url() . '/alternatelogin/windowslive_app/channel.htm', 'AL_FB_APP_ID' => $config['al_fb_id'], 'FB_APP_ID' => $config['al_fb_id'], 'AL_PATH' => $config['al_path'], include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx); include($phpbb_root_path . 'includes/functions_alternatelogin.' . $phpEx); $fb_sync = ($_POST['fb_sync'] == 'on') ? 1 : 0; $user_data = array(); if($user->data['al_fb_id']) { $graph_url = "https://graph.facebook.com/me?" . $user->data['session_fb_access_token']; $fb_user = json_decode(file_get_contents($graph_url)); } 'interests' => utf8_normalize_nfc(request_var('interests', $user->data['user_interests'], true)), ); if($fb_sync) { $data['website'] = (!$fb_user->website) ? '' : $fb_user->website; $data['location'] = (!$fb_user->location->name) ? '' : $fb_user->location->name; $data['occupation'] = (!$fb_user->work[0]->employer->name) ? '' : $fb_user->work[0]->employer->name; } add_form_key('ucp_profile_info'); if($fb_sync) { $bday = explode('/', $fb_user->birthday); $data['bday_day'] = $bday[1]; $data['bday_month'] = $bday[0]; $data['bday_year'] = $bday[2]; $data['user_birthday'] = sprintf('%2d-%2d-%4d', $data['bday_day'], $data['bday_month'], $data['bday_year']); } $data['al_fb_profile_sync'] = $fb_sync; 'user_notify_type' => $data['notify'], 'al_fb_profile_sync' => $data['al_fb_profile_sync'], 'INTERESTS' => $data['interests'], 'FB_WEBSITE' => $fb_user->website, 'FB_LOCATION' => $fb_user->location->name, 'FB_OCCUPATION' => $fb_user->work[0]->employer->name, 'FB_SYNC' => ($user->data['al_fb_profile_sync']) ? 'checked="checked"' : '', 'AL_FB_USER' => $user->data['al_fb_id'] ? true : false, include($phpbb_root_path . 'includes/functions_posting.' . $phpEx); include($phpbb_root_path . 'includes/functions_display.' . $phpEx); if($user->data['al_fb_id']) { $graph_url = "https://graph.facebook.com/me/statuses?" . $user->data['session_fb_access_token']; //echo 'Graph: ' . $graph_url; $fb_user = json_decode(file_get_contents($graph_url)); } $fb_status = $user->data['al_fb_status_sync']; 'user_sig_bbcode_bitfield' => $message_parser->bbcode_bitfield 'user_sig_bbcode_bitfield' => $message_parser->bbcode_bitfield, 'al_fb_status_sync' => ($fb_status == NULL) ? 0 : $fb_status, 'S_LINKS_ALLOWED' => ($config['allow_sig_links']) ? true : false) 'S_LINKS_ALLOWED' => ($config['allow_sig_links']) ? true : false, 'AL_FB_USER' => $user->data['al_fb_id'] ? true : false, 'S_FB_STATUS_CHECKED' => $user->data['al_fb_status_sync'] ? 'checked="checked"' : '', 'S_FB_STATUS' => $fb_user->data[0]->message,) $display_gallery = request_var('display_gallery', '0'); include($phpbb_root_path . 'includes/functions_alternatelogin.' . $phpEx); $fb_avatar = ($_POST['fb_avatar'] == 'on') ? 1 : 0; if (check_form_key('ucp_avatar')) { $sql_array = array( 'al_fb_avatar_sync' => $fb_avatar, ); if (check_form_key('ucp_avatar')) { if($fb_avatar) { $sql_array = array_merge($sql_array, array( 'user_avatar' => 'https://graph.facebook.com/' . $user->data['al_fb_id'] . '/picture?type=normal', 'user_avatar_type' => AVATAR_REMOTE, 'user_avatar_width' => 100, 'user_avatar_height' => 100, )); $sql = "UPDATE " . USERS_TABLE . " SET " . $db->sql_build_array('UPDATE', $sql_array) . " WHERE user_id=" . $user->data['user_id']; $db->sql_query($sql); meta_refresh(3, $this->u_action); $message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>'); trigger_error($message); } 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024), 'AL_FB_USER' => $user->data['al_fb_id'] ? true : false, 'FB_AVATAR' => $user->data['al_fb_avatar_sync'] ? 'checked="checked"' : '', 'AL_FB_USER' => $user->data['al_fb_id'], include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx); include($phpbb_root_path . 'includes/functions_alternatelogin.' . $phpEx); $user_lang = request_var('lang', $user->lang_name); $al_login = (request_var('al_login', 0) == 1) ? true : false; $al_login_type = request_var('al_login_type', 0); $wl_cookie = request_var(WL_COOKIE, ''); $ms_user = request_var('al_ms_user', ''); $oi_user = request_var('al_oi_user', ''); if ($submit) { if($al_login) { switch($al_login_type) { case AL_WINDOWSLIVE_LOGIN: include_once($phpbb_root_path . $config['al_path'] . 'windowslive_app/windowslive-sdk/lib/windowslivelogin.php'); if(!$al_wll) { $al_wll = WindowsLiveLogin::initFromXml($phpbb_root_path . $config['al_path'] . 'windowslive_app/windowslive-sdk/Application-Key.xml'); $al_wll->setDebug(true); } if(!$wl_user) { $wl_user = $al_wll->processToken($wl_cookie); //trigger_error($_COOKIE[WL_COOKIE]); if ($wl_user) { $data['new_password'] = substr($wl_user->getId(), 0, $config['max_pass_chars']); $data['password_confirm'] = substr($wl_user->getId(), 0, $config['max_pass_chars']); } else { trigger_error('Could not get user'); } } break; case AL_OPENID_LOGIN: $data['new_password'] = substr($oi_user . $data['email'], 0, $config['max_pass_chars']); $data['password_confirm'] = substr($oi_user . $data['email'], 0, $config['max_pass_chars']); break; } } if ($config['new_member_post_limit']) { $user_row['user_new'] = 1; } if($al_login) { $al_user_settings = array_fill(0, 10, 0); switch($al_login_type) { case AL_WINDOWSLIVE_LOGIN: break; case AL_OPENID_LOGIN: $user_row['al_oi_id'] = $oi_user; $al_email_lang = $user->lang['OPENID']; break; } } $email_template = 'coppa_welcome_inactive'; if($al_login) { $email_template = 'coppa_welcome_inactive_alternatelogin'; } else { $email_template = 'coppa_welcome_inactive'; } $email_template = 'user_welcome_inactive'; if($al_login) { $email_template = 'user_welcome_inactive_alternatelogin'; } else { $email_template = 'user_welcome_inactive'; } $email_template = 'admin_welcome_inactive'; if($al_login) { $email_template = 'admin_welcome_inactive_alternatelogin'; } else { $email_template = 'admin_welcome_inactive'; } $email_template = 'user_welcome'; if($al_login) { $email_template = 'user_welcome_alternatelogin'; } else { $email_template = 'user_welcome'; } 'WELCOME_MSG' => htmlspecialchars_decode(sprintf($user->lang['WELCOME_SUBJECT'], $config['sitename'])), 'USERNAME' => htmlspecialchars_decode($data['username']), 'PASSWORD' => htmlspecialchars_decode($data['new_password']), 'AL_LOGIN_TYPE' => $al_email_lang, $message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>'); trigger_error($message); if($al_login_type == AL_WINDOWSLIVE_LOGIN) { $_SESSION['al_wl_logout'] = 'registration_success'; $_SESSION['al_wl_message'] = $message; header('Location:' . $al_wll->getLogoutUrl()); } else { $message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>'); trigger_error($message); } 'change_lang' => 0, 'al_login' => $al_login, 'al_login_type' => $al_login_type, 'al_oi_user' => $oi_user, 'L_PASSWORD_EXPLAIN' => sprintf($user->lang[$config['pass_complex'] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']), 'S_AL_LOGIN' => $al_login, <!-- INCLUDE forumlist_body.html --> <!-- IF AL_FB_FACEPILE | AL_FB_ACTIVITY --> <table width="100%"> <tr> <td valign="top"> <!-- ENDIF --> <!-- INCLUDE forumlist_body.html --> <!-- IF AL_FB_FACEPILE | AL_FB_ACTIVITY | AL_FB_STREAM --> </td> <!-- IF AL_FB_ACTIVITY --> <td width="200" valign="top"> <div class="forabg"> <div class="inner"><span class="corners-top"><span></span></span> <div class="panel"> <fb:activity site="{AL_FB_SITE_DOMAIN}" width="300" height="300" header="true" font="arial" border_color="" recommendations="true"></fb:activity> </div> <span class="corners-bottom"><span></span></span></div> </div> <!-- ENDIF --> <!-- IF AL_FB_STREAM --> <div class="forabg"> <div class="inner"><span class="corners-top"><span></span></span> <div class="panel"> <fb:live-stream event_app_id="{AL_FB_APPID}" width="300" height="500" xid="" always_post_to_friends="false"></fb:live-stream> </div> <span class="corners-bottom"><span></span></span></div> </div> <!-- ENDIF --> </td> </tr> <!-- IF AL_FB_FACEPILE --> <tr> <td<!-- IF AL_FB_ACTIVITY --> colspan="2"<!-- ENDIF -->> <div class="forabg"> <div class="inner"><span class="corners-top"><span></span></span> <div class="panel"> <fb:like href="{BOARD_URL}" show_faces="false" width="450" font="arial"></fb:like> <fb:facepile href="{BOARD_URL}" width="200" max_rows="1"></fb:facepile> </div> <span class="corners-bottom"><span></span></span></div> </div> </td> </tr> <!-- ENDIF --> </table> <!-- ENDIF --> <input type="submit" name="login" value="{L_LOGIN}" class="button2" /> <p> <!-- IF S_AL_WL_ENABLED --> <wl:app channel-url="{S_AL_WL_WRAP_CHANNEL}" callback-url="{S_AL_WL_WRAP_CALLBACK}" client-id="{S_AL_WL_CLIENT_ID}" scope="WL_Contacts.View, WL_Profiles.View,Messenger.SignIn" onload="appLoaded"> </wl:app> <wl:signin signed-in-text="Sign Out" signed-out-text="Sign In" on-signin="{{signInCompleted}}" /> <wl:userinfo cid="$user"></wl:userinfo> <!-- ENDIF --> <!-- IF S_AL_FB_ENABLED --> <a onclick="window.location='{AL_PATH}'+ 'al_fb_connect.php';" href="#"> <img src="http://static.ak.fbcdn.net/images/fbconnect/login-buttons/connect_light_medium_long.gif" alt="Login with your Facebook account!" /> </a> <!-- ENDIF --> <!-- IF S_AL_OI_ENABLED --> <a onclick="window.location='{AL_PATH}'+ 'al_oi_connect.php';" href="#"> <img src="{AL_PATH}images/openid-icon-100x100.png" alt="Login with your OpenID account!" height="21px" align="middle" />OpenID </a> <!-- ENDIF --> </p> </fieldset> <!-- IF S_AL_LOGIN_ENABLED and not S_ADMIN_AUTH --> <div> <!-- IF S_AL_WL_ENABLED --> <wl:app channel-url="{S_AL_WL_WRAP_CHANNEL}" callback-url="{S_AL_WL_WRAP_CALLBACK}" client-id="{S_AL_WL_CLIENT_ID}" scope="WL_Contacts.View, WL_Profiles.View,Messenger.SignIn" onload="appLoaded"> </wl:app> <wl:signin signed-in-text="Sign Out" signed-out-text="Sign In" on-signin="{{signInCompleted}}" /> <wl:userinfo cid="$user"></wl:userinfo> <!-- ENDIF --> <!-- IF S_AL_FB_ENABLED --> <a onclick="window.location='{AL_PATH}'+ 'al_fb_connect.php?{AL_ADMIN}';" href="#"> <img src="http://static.ak.fbcdn.net/images/fbconnect/login-buttons/connect_light_medium_long.gif" alt="Login with your Facebook account!" /> </a> <!-- ENDIF --> <!-- IF S_AL_OI_ENABLED --> <a onclick="window.location='{AL_PATH}'+ 'al_oi_connect.php?{AL_ADMIN}';" href="#"> <img src="{AL_PATH}images/openid-icon-100x100.png" alt="Login with your OpenID account!" height="21px" align="middle" />OpenID </a> <!-- ENDIF --> </div> <!-- ENDIF --> <html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wl="http://apis.live.net/js/2010" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}"> <title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title> <script type="text/javascript" src="http://js.live.net/4.1/loader.js"></script> <body id="phpbb" class="section-{SCRIPT_NAME} {S_CONTENT_DIRECTION}"> <div id="fb-root"></div> <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId={AL_FB_APPID}&xfbml=1"></script> <script> window.fbAsyncInit = function() { FB.init({appId: '{AL_FB_APPID}', status: true, cookie: true, xfbml: true}); }; (function() { var e = document.createElement('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; document.getElementById('fb-root').appendChild(e); }()); </script> <li class="icon-logout"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x">{L_LOGIN_LOGOUT}</a></li> <!-- IF S_USER_LOGGED_IN and S_AL_WL_USER --> <wl:app channel-url="{S_AL_WL_WRAP_CHANNEL}" callback-url="{S_AL_WL_WRAP_CALLBACK}" client-id="{S_AL_WL_CLIENT_ID}" scope="WL_Contacts.View, WL_Profiles.View,Messenger.SignIn" onload="appLoaded"> </wl:app> <wl:signin signed-in-text="Sign Out" signed-out-text="Sign In" on-signin="{{signInCompleted}}" /> <wl:userinfo cid="$user"></wl:userinfo> <!-- ELSE --> <li class="icon-logout"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x">{L_LOGIN_LOGOUT}</a></li> <!-- ENDIF --> <!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF --> <!-- IF AL_FB_USER --> <dl> <dt><label for="fb_avatar">{L_FB_AVATAR}</label><br /><span>{L_FB_AVATAR_EXPLAIN}</span></dt> <dd><input type="checkbox" name="fb_avatar" id="fb_avatar" {FB_AVATAR} /></dd> </dl> <!-- ENDIF --> <!-- INCLUDE ucp_header.html --> <script> function apply_fb_data() { var v_website = '{FB_WEBSITE}'; var v_location = '{FB_LOCATION}'; var v_occupation = '{FB_OCCUPATION}'; if(document.getElementById('fb_sync').checked) { document.getElementById('website').value = v_website; document.getElementById('location').value = v_location; document.getElementById('occupation').value = v_occupation; } } </script> <!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF --> <!-- IF AL_FB_USER --> <dl> <dt><label for="fb_sync">{L_FB_SYNC}:</label></dt> <dd><input type="checkbox" name="fb_sync" id="fb_sync" {FB_SYNC} class="checkbox" onclick="apply_fb_data();"/></dd> </dl> <!-- ENDIF --> <!-- INCLUDE ucp_header.html --> <script> var fb_status = "{S_FB_STATUS}"; function apply_fb_status() { document.getElementById('signature').innerHTML = fb_status; } </script> <h3>{L_OPTIONS}</h3> <fieldset> <!-- IF AL_FB_USER --> <div><label for="fb_status"><input type="checkbox" name="fb_status" id="fb_status"{S_FB_STATUS_CHECKED} onclick="apply_fb_status();"/> {L_FB_STATUS}</label></div> <!-- ENDIF --> <h2>{SITENAME} - {L_REGISTRATION}</h2> <!-- IF S_AL_LOGIN_ENABLED and not S_AL_LOGIN --> <div>{L_AL_REGISTRATION}</div> <div> <!-- IF S_AL_WL_ENABLED --> <wl:app channel-url="{S_AL_WL_WRAP_CHANNEL}" callback-url="{S_AL_WL_WRAP_CALLBACK}" client-id="{S_AL_WL_CLIENT_ID}" scope="WL_Contacts.View, WL_Profiles.View,Messenger.SignIn" onload="appLoaded"> </wl:app> <wl:signin signed-in-text="Sign Out" signed-out-text="Sign In" on-signin="{{signInCompleted}}" /> <wl:userinfo cid="$user"></wl:userinfo> <!-- ENDIF --> <!-- IF S_AL_FB_ENABLED --> <a onclick="window.location='{AL_PATH}'+ 'al_fb_connect.php';" href="#"> <img src="http://static.ak.fbcdn.net/images/fbconnect/login-buttons/connect_light_medium_long.gif" alt="Login with your Facebook account!" /> </a> <!-- ENDIF --> <!-- IF S_AL_OI_ENABLED --> <a onclick="window.location='{AL_PATH}'+ 'al_oi_connect.php';" href="#"> <img src="{AL_PATH}images/openid-icon-100x100.png" alt="Login with your OpenID account!" height="21px" align="middle" />OpenID </a> <!-- ENDIF --> </div> <!-- ENDIF --> <dl> <dt><label for="new_password">{L_PASSWORD}:</label><br /><span>{L_PASSWORD_EXPLAIN}</span></dt> <!-- IF not S_AL_LOGIN --> <dd><input type="password" tabindex="5" name="password_confirm" id="password_confirm" size="25" value="{PASSWORD_CONFIRM}" class="inputbox autowidth" title="{L_CONFIRM_PASSWORD}" /></dd> </dl> <!-- ENDIF --> <a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a> &nbsp;&nbsp;<fb:like href="{U_PAGE_URL}" show_faces="false" width="450" font="arial"></fb:like> <td class="row1" align="center"><span class="genmed">{L_USERNAME}:</span> <input class="post" type="text" name="username" size="10" />&nbsp; <span class="genmed">{L_PASSWORD}:</span> <input class="post" type="password" name="password" size="10" />&nbsp; <!-- IF S_AUTOLOGIN_ENABLED --> <span class="gensmall">{L_LOG_ME_IN}</span> <input type="checkbox" class="radio" name="autologin" /><!-- ENDIF -->&nbsp; <input type="submit" class="btnmain" name="login" value="{L_LOGIN}" /> <!-- IF S_AL_LOGIN_ENABLED --> <wl:app channel-url="{S_AL_WL_WRAP_CHANNEL}" callback-url="{S_AL_WL_WRAP_CALLBACK}" client-id="{S_AL_WL_CLIENT_ID}" scope="WL_Contacts.View, WL_Profiles.View,Messenger.SignIn" onload="appLoaded"> </wl:app> <wl:signin signed-in-text="Sign Out" signed-out-text="Sign In" on-signin="{{signInCompleted}}" /> <wl:userinfo cid="$user"></wl:userinfo> <!-- ENDIF --> <!-- IF S_AL_FB_ENABLED --> <a onclick="window.location='{AL_PATH}'+ 'al_fb_connect.php';" href="#"> <img src="http://static.ak.fbcdn.net/images/fbconnect/login-buttons/connect_light_medium_long.gif" alt="Login with your Facebook account!" /> </a> <!-- ENDIF --> <!-- IF S_AL_OI_ENABLED --> <a onclick="window.location='{AL_PATH}'+ 'al_oi_connect.php';" href="#"> <img src="{AL_PATH}images/openid-icon-100x100.png" alt="Login with your OpenID account!" height="21px" align="middle" />OpenID </a> <!-- ENDIF --> </td> </tr> <!-- ENDIF --> <td class="cat" <!-- IF not S_ADMIN_AUTH or S_CONFIRM_CODE -->colspan="2"<!-- ENDIF --> align="center">{S_HIDDEN_FIELDS}<input type="submit" name="login" class="btnmain" value="{L_LOGIN}" tabindex="5" /></td> </tr> <!-- IF S_AL_LOGIN_ENABLED and not S_ADMIN_AUTH --> <tr> <td align="center" valign="bottom"> <!-- IF S_AL_WL_ENABLED --> <wl:app channel-url="{S_AL_WL_WRAP_CHANNEL}" callback-url="{S_AL_WL_WRAP_CALLBACK}" client-id="{S_AL_WL_CLIENT_ID}" scope="WL_Contacts.View, WL_Profiles.View,Messenger.SignIn" onload="appLoaded"> </wl:app> <wl:signin signed-in-text="Sign Out" signed-out-text="Sign In" on-signin="{{signInCompleted}}" /> <wl:userinfo cid="$user"></wl:userinfo> <!-- ENDIF --> <!-- IF S_AL_FB_ENABLED --> <a onclick="window.location='{AL_PATH}'+ 'al_fb_connect.php?{AL_ADMIN}';" href="#"> <img src="http://static.ak.fbcdn.net/images/fbconnect/login-buttons/connect_light_medium_long.gif" alt="Login with your Facebook account!" /> </a> <!-- ENDIF --> <!-- IF S_AL_OI_ENABLED --> <a onclick="window.location='{AL_PATH}'+ 'al_oi_connect.php?{AL_ADMIN}';" href="#"> <img src="{AL_PATH}images/openid-icon-100x100.png" alt="Login with your OpenID account!" height="21px" align="middle" />OpenID </a> <!-- ENDIF --> </td> </tr> <!-- ENDIF --> <html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wl="http://apis.live.net/js/2010" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}"> <title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title> <script type="text/javascript" src="http://js.live.net/4.1/loader.js"></script> <script type="text/javascript" src="./alternatelogin/windowslive_app/script/profile-scripts.js"></script> <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script> <a href="{U_LOGIN_LOGOUT}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="*" /> {L_LOGIN_LOGOUT}</a>&nbsp; <!-- IF S_USER_LOGGED_IN and S_AL_WL_USER --> <iframe <wl:app channel-url="{S_AL_WL_WRAP_CHANNEL}" callback-url="{S_AL_WL_WRAP_CALLBACK}" client-id="{S_AL_WL_CLIENT_ID}" scope="WL_Contacts.View, WL_Profiles.View,Messenger.SignIn" onload="appLoaded"> </wl:app> <wl:signin signed-in-text="Sign Out" signed-out-text="Sign In" on-signin="{{signInCompleted}}" /> <wl:userinfo cid="$user"></wl:userinfo> <!-- ELSE --> <a href="{U_LOGIN_LOGOUT}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="*" /> {L_LOGIN_LOGOUT}</a>&nbsp; <!-- ENDIF --> <tr> <th colspan="2" valign="middle">{L_REGISTRATION}</th> </tr> <!-- IF S_AL_LOGIN_ENABLED and not S_AL_LOGIN --> <tr> <td colspan="2" align="center" valign="middle">{L_AL_REGISTRATION}</td> </tr> <tr> <td colspan="2" align="center" valign="bottom"> <!-- IF S_AL_WL_ENABLED --> <wl:app channel-url="{S_AL_WL_WRAP_CHANNEL}" callback-url="{S_AL_WL_WRAP_CALLBACK}" client-id="{S_AL_WL_CLIENT_ID}" scope="WL_Contacts.View, WL_Profiles.View,Messenger.SignIn" onload="appLoaded"> </wl:app> <wl:signin signed-in-text="Sign Out" signed-out-text="Sign In" on-signin="{{signInCompleted}}" /> <wl:userinfo cid="$user"></wl:userinfo> <!-- ENDIF --> <!-- IF S_AL_FB_ENABLED --> <a onclick="window.location='{AL_PATH}'+ 'al_fb_connect.php';" href="#"> <img src="http://static.ak.fbcdn.net/images/fbconnect/login-buttons/connect_light_medium_long.gif" alt="Login with your Facebook account!" /> </a> <!-- ENDIF --> <!-- IF S_AL_OI_ENABLED --> <a onclick="window.location='{AL_PATH}'+ 'al_oi_connect.php';" href="#"> <img src="{AL_PATH}images/openid-icon-100x100.png" alt="Login with your OpenID account!" height="21px" align="middle" />OpenID </a> <!-- ENDIF --> </td> </tr> <!-- ENDIF --> <tr> <td class="row1"><b class="genmed">{L_PASSWORD}: </b><br /><span class="gensmall">{L_PASSWORD_EXPLAIN}</span></td> <!-- IF not S_AL_LOGIN --> <td class="row2"><input class="post" type="password" name="password_confirm" size="25" value="{PASSWORD_CONFIRM}" /></td> </tr> <!-- ENDIF --> alternatelogin_mod_install.php STEP 1: Set the admin and user control panel module. Log in at your forum, and go to your Administration Control Panel. Click the "System" tab and choose for "Administration Control Panel" under "Module Management". Click at "General". At the new page, click "Board Configuration". Now, select "Facebook Connect Settings" in the dropdown box at the bottom on the right, and click the "Add Module" button next to it. Confirm by clicking "yes". Click the continue link, and at the overview page available now, you should click the enable link next to the newly added module. Now click "User Control Panel" under "Module Management". Choose for "Profile". In the select box at the right bottom, choose "Edit Facebook settings" and click "Add Module". Confirm by clicking yes, and click continue. Now, enable the newly added module. Step 1 done! STEP 2: Configure Facebook Connect at Facebook Developers! Go to http://www.facebook.com/developers, log in with your Facebook account. Click "Set Up New Application" button. Choose a name (mostly this is your site's name!), make sure you don't choose one with "Facebook" or "FB" in it, and agree with the conditions. Submit the page. Now, you should note down the API key and the application secret. We will need them at a later time. You can, if you want, provide a short description, choose an icon etc. Once done, save and now click the Connect tab at your left. You must now enter the Connect URL. This is the URL to your forum (!), ending with a slash (/). So do not add index.php or something similar! You can, if wanted, also upload a Facebook Connect Logo. I also recommend setting the "Base domain" setting, which should make sure that Facebook Connect works at both www.yoursite.com and yoursite.com. Now save all this! STEP 3: Configure Facebook Connect at your site. It is best you now take a break for like 5 minutes. Let's give Facebook time to make the changes at all their servers! Once you think you're ready, let's log in to our Administration Control Panel (in the General tab). We now click "Facebook Connect Settings", which is positioned within the "Board Configuration" section. Now, we need to enter the API key and the application secret we written down earlier. Both are REQUIRED to have the MOD working. Enter those 2 values in their respective fields under "Basic Settings". You can also configure some extra things at this page. Save them, and you are ready to go!! 
Are you attempting to install this manually or through the AutoMOD system?
manual edit.
http://uabnet.com ==)) Turkish Board.

Peter77sx
Registered User
Posts: 3258
Joined: Wed Nov 09, 2005 2:51 pm

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

Post by Peter77sx »

_mayhem_ , that happens sometimes if you try viewing the install file directly from the zip file.
Have you uploaded the entire alternatelogin directory to your desktop, then try viewing the install file?

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

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

Post by mjimeyg »

Peter77sx wrote:Hello, the facebook registration/login process worked flawlessly on the demo site. very nice :)
Thanks for testing and letting me know, always good to know it doesn't just work for me! :D
Questions answered via forums only, no pms or emails. Thank you.

ConSof Alternate Login for phpBB

Image Image

_mayhem_
Registered User
Posts: 53
Joined: Fri Apr 18, 2008 9:17 pm
Location: Turkey - istanbul
Name: Unsal ASLANBAS
Contact:

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

Post by _mayhem_ »

Peter77sx wrote:_mayhem_ , that happens sometimes if you try viewing the install file directly from the zip file.
Have you uploaded the entire alternatelogin directory to your desktop, then try viewing the install file?

took to the desktop. not view.

Code: Select all

file:///C:/Users/SENLIK%20BUFE/Desktop/alternatelogin/install.xml
modx.prosilver.en xsl file incorrectly
Last edited by _mayhem_ on Wed May 11, 2011 6:02 pm, edited 1 time in total.
http://uabnet.com ==)) Turkish Board.

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

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

Post by mjimeyg »

Peter77sx wrote:_mayhem_ , that happens sometimes if you try viewing the install file directly from the zip file.
Have you uploaded the entire alternatelogin directory to your desktop, then try viewing the install file?
Agreed, at the very least you will need the xsl file (modx.prosilver.en.xsl) in the same directory or use something like Google Chrome to view the source code of the xml file, otherwise it will appear in the browser as a wall of text.

What are you using to view the file?
Questions answered via forums only, no pms or emails. Thank you.

ConSof Alternate Login for phpBB

Image Image

_mayhem_
Registered User
Posts: 53
Joined: Fri Apr 18, 2008 9:17 pm
Location: Turkey - istanbul
Name: Unsal ASLANBAS
Contact:

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

Post by _mayhem_ »

mjimeyg wrote:
Peter77sx wrote:_mayhem_ , that happens sometimes if you try viewing the install file directly from the zip file.
Have you uploaded the entire alternatelogin directory to your desktop, then try viewing the install file?
Agreed, at the very least you will need the xsl file (modx.prosilver.en.xsl) in the same directory or use something like Google Chrome to view the source code of the xml file, otherwise it will appear in the browser as a wall of text.

What are you using to view the file?
modx.prosilver.en.xls tried to replace this file to another file.

board3_portal_1_0_6 modx.prosilver.en.xls ok.... worked...
http://uabnet.com ==)) Turkish Board.

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

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

Post by mjimeyg »

_mayhem_ wrote:
modx.prosilver.en.xls tried to replace this file to another file.

board3_portal_1_0_6 modx.prosilver.en.xls ok.... worked...
I'm not sure I understood that.

Can you confirm that:

a) You have the xsl file in the same directory as the xml file?
b) What you are using to view the file
c) Whether or not you have succeeded in installing the mod.

Language barriers suck! We should all learn to speak binary... 1 or 0? :D
Questions answered via forums only, no pms or emails. Thank you.

ConSof Alternate Login for phpBB

Image Image

_mayhem_
Registered User
Posts: 53
Joined: Fri Apr 18, 2008 9:17 pm
Location: Turkey - istanbul
Name: Unsal ASLANBAS
Contact:

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

Post by _mayhem_ »

mjimeyg wrote:
_mayhem_ wrote:
modx.prosilver.en.xls tried to replace this file to another file.

board3_portal_1_0_6 modx.prosilver.en.xls ok.... worked...
I'm not sure I understood that.

Can you confirm that:

a) You have the xsl file in the same directory as the xml file?
b) What you are using to view the file
c) Whether or not you have succeeded in installing the mod.

Language barriers suck! We should all learn to speak binary... 1 or 0? :D
1 - have -- ok.
2 - mozilla firefox4 , ie9, opera11,
3 - xsl you wrong. I used another xsl displayed.
http://uabnet.com ==)) Turkish Board.

_mayhem_
Registered User
Posts: 53
Joined: Fri Apr 18, 2008 9:17 pm
Location: Turkey - istanbul
Name: Unsal ASLANBAS
Contact:

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

Post by _mayhem_ »

user control panel facebook login add

Code: Select all

SQL ERROR [ mysqli ]

Column 'al_wl_id' cannot be null [1048]

SQL

UPDATE phpbb_users SET al_fb_id = 'xxxxxxx', al_wl_id = NULL, al_oi_id = NULL WHERE user_id='2'

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: alternatelogin/al_fb_connect.php
LINE: 264
CALL: dbal_mysqli->sql_query()
http://uabnet.com ==)) Turkish Board.

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

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

Post by mjimeyg »

_mayhem_ wrote:user control panel facebook login add

Code: Select all

SQL ERROR [ mysqli ]

Column 'al_wl_id' cannot be null [1048]

SQL

UPDATE phpbb_users SET al_fb_id = 'xxxxxxx', al_wl_id = NULL, al_oi_id = NULL WHERE user_id='2'

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: alternatelogin/al_fb_connect.php
LINE: 264
CALL: dbal_mysqli->sql_query()

I have posted a zip file with the changes, the current changes for your immediate error are:

Find the code at around line 251:

Code: Select all

$sql_array = array(
                    'al_fb_id'      => $fb_user->id,
                    'al_wl_id'      => NULL,
                    'al_oi_id'      => NULL,
                );
and replace it with:

Code: Select all

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

I recommend downloading the latest addition and replacing the old version of root/includes/ucp/ucp_alternatelogin.php with the latest one as there were similar overlooked errors that I have corrected.
Questions answered via forums only, no pms or emails. Thank you.

ConSof Alternate Login for phpBB

Image Image

Artistix
Registered User
Posts: 36
Joined: Sat Apr 17, 2010 1:36 pm

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

Post by Artistix »

Hello.

First of all I'd like to thank you for spending time developing this MOD. 2 thumbs up!!


My installation went smooth, and I dint have any problems installing it 8-) . I hope you dont mind that I have some minor feedback, and questions for future dev.... :

Scenario 1 - A user is NOT registrered in the forum:

Is it possible to make a checkbox in the FB registering-box, that is ALREADY ticked, with :
"Use my Facebook Name as username". - Then, if the user for some reason do NOT want to use their FB real name, they can uncheck, and write an alias in the box below? I think that this will be a bit smoother/userfriendly (from a users point of view)... The concept of FB connect is to make the registration process as easy as possible ;p isnt it?

Scenario 2 - After registration completed - Force user to login again?:
Is it possible to not having to click login yet anoter time after the first time you link up your FB accont to the forum..?

-If not, are you able to put a "Login with facebook" button on the login page that you end up with after registration-process is complete? I had to go back to the main page, then hit the login with FB.

It would be sweet to be able to import facebook profile picture, as phpBB avatar as default.

Minor bug...:
In ACP>> Manage Login Types>> When you want to enable FB and/or Windows LIVE, they display "no" after hitting submint. Just a bit confusing. Maybe change to "enabled" or disabled" radiobuttons :p

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

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

Post by mjimeyg »

Artistix wrote:Hello.

First of all I'd like to thank you for spending time developing this MOD. 2 thumbs up!!
Thanks for trying this out and letting me know how it went. Always appreciated.
Artistix wrote: My installation went smooth, and I dint have any problems installing it 8-) . I hope you dont mind that I have some minor feedback, and questions for future dev.... :

Scenario 1 - A user is NOT registrered in the forum:

Is it possible to make a checkbox in the FB registering-box, that is ALREADY ticked, with :
"Use my Facebook Name as username". - Then, if the user for some reason do NOT want to use their FB real name, they can uncheck, and write an alias in the box below? I think that this will be a bit smoother/userfriendly (from a users point of view)... The concept of FB connect is to make the registration process as easy as possible ;p isnt it?
I hadn't thought of that so I did look into it. Unfortunately, a combination of there being no default value for text fields in the fb-registration control, it's not possible to make that happen without adding additional complexities for the users. I will keep an eye out for changes to the API in case it becomes possible.
Artistix wrote:
Scenario 2 - After registration completed - Force user to login again?:
Is it possible to not having to click login yet anoter time after the first time you link up your FB accont to the forum..?

-If not, are you able to put a "Login with facebook" button on the login page that you end up with after registration-process is complete? I had to go back to the main page, then hit the login with FB.
I think the reason you aren't automatically logged in is in case the board uses COPPA or requires account activation. I don't want to mess around with a that particular code in case it screws something else up.

But your other suggestion was already there, but I screwed up by not removing a certain variable from a now deprecated value and it wasn't showing up.

I have updated the mod package, but it you open styles/prosilver/template/login_body.html and find the the code around line 47 which says:

Code: Select all

<!-- IF S_AL_LOGIN_ENABLED and not S_ADMIN_AUTH -->
and change it to:

Code: Select all

<!-- IF not S_ADMIN_AUTH -->
It should show up.
Artistix wrote:
It would be sweet to be able to import facebook profile picture, as phpBB avatar as default.
How do you mean? If you have avatars enabled for remote linking then there is a check box in the ucp->profile->avatar that lets you sync with your FB Profile Picture. The only problem so far is that it doesn't change when the FB Profile pic changes. I can't figure out why though as the url is dynamic.
Artistix wrote:
Minor bug...:
In ACP>> Manage Login Types>> When you want to enable FB and/or Windows LIVE, they display "no" after hitting submint. Just a bit confusing. Maybe change to "enabled" or disabled" radiobuttons :p
Yeah, I know about that one. I was having trouble finding the error in the code so I left it and subsequently forgot about it. I'll try and fix that one next.

Thanks for the input and feedback!
Questions answered via forums only, no pms or emails. Thank you.

ConSof Alternate Login for phpBB

Image Image

Artistix
Registered User
Posts: 36
Joined: Sat Apr 17, 2010 1:36 pm

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

Post by Artistix »

Oh my god, I'm blind :lol: I didnt see that tickbox at first, but tested it out now. Its actually visible in "Edit profile", and the "Edit Avatar" sub-pages :?

Btw: There is a text that is missing som translation/text in the "Edit Avatar" sub-page:

Code: Select all

{ FB_AVATAR_EXPLAIN }

FB profile picture is now showing. It also changed when my FB-profil picture was changed! so it works :D
There is some aspect issues though....

elecflip
Registered User
Posts: 6
Joined: Sat May 14, 2011 2:56 pm

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

Post by elecflip »

hello, my English is not good, I have a problem installing this
I get this error when trying to install it with AutoMod
Consultas SQL
Error:Duplicate entry 'alternatelogin_settings' for key 1
INSERT INTO `phpbb_config` ( `config_name` , `config_value` , `is_dynamic` ) VALUES ( 'alternatelogin_settings', '0', '0' )
Error:Duplicate entry 'al_path' for key 1
INSERT INTO `phpbb_config` ( `config_name` , `config_value` , `is_dynamic` ) VALUES ( 'al_path', 'alternatelogin/', '0' )
I'm using a city-style soul, this is about? can only be used with silver pro? please help

Locked

Return to “[3.0.x] Abandoned MODs”