Pressplus2011 (2011-07-05) wrote:Hallo!
Plse tell me, where ich hve to inset following code?
http://forums.damienkeitel.com/viewtopic.php?f=6&t=5Or did I anythig overseen?Code: Select all
define('YOUR_APP_ID', 'place_copied_app_id_here'); $my_uri = 'PATH/TO/YOUR/LOGIN/SCRIPT'; $fbcookie = 'fbs_' . YOUR_APP_ID; function fb_init($appid) { $fbinit = '<div id="fb-root"></div>' . "\n" . '<script type="text/javascript" language="JavaScript" src="http://connect.facebook.net/en_US/all.js#appId=' . $appid . '&xfbml=1"></script>' . "\n" . '<script type="text/javascript" language="JavaScript"> FB.init({' . "\n" . ' appId : ' . $appid . ',' . "\n" . ' status : true, // check login status' . "\n" . ' cookie : true, // enable cookies to allow the server to access the session' . "\n" . ' xfbml : true // parse XFBML' . "\n" . ' });' . "\n" . '</script>' . "\n"; return $fbinit; } if(isset($_COOKIE[$fbcookie])) { function fb_login($http_path) { $fblogin = '<fb:login-button size="medium" onlogin="top.location.href=\'' . $http_path . '\'">Login With Facebook</fb:login>' . "\n"; return $fblogin; } } else { function fb_login($http_path) { $fblogin = '<fb:login-button size="medium">Connect With Facebook</fb:login>' . "\n" . ' <script>FB.Event.subscribe(\'auth.login\', function(response) {' . "\n" . ' top.location.href(' . $http_path . '));}</script>'; return $fblogin; } } //in phpbb we have template variables. so in phpbb we assign $template->assign_vars(array( 'FBINIT' => fb_init(YOUR_APP_ID), 'FBLOGIN => fb_login($my_uri), ));
Thanks for hlp!
Pressplus
Thanks!xkfrat wrote:I'm sorry Pressplus2011 can't help you. I didn't use that code, I just followed .xml instructions.
*sad-faced* so much is running good. Think again about it!keitzy wrote:Well due to so many other commitments, like children, competitive gaming and part time work, I have to stop development on all of my phpbb projects. Mainly because its not providing an income so I actually will now have to start work in other fields that are providing an income. If any one would like to take over the development I am quite happy to hand it over.
Changed it manually in phpMyAdmin. It works now.xkfrat wrote:I can't deselect "Use Location In Registration" in Facebook2011 options.
Thank you for starting this project, I hope someone will pick this up.keitzy wrote:
I know now why it redirects onclick. The login/register box action is "top.location.href='/.../'. When going to your page from Facebook's iframe, the top location is changed.xkfrat wrote:Still can't stop the redirects when I press the Login/Register Facebook button.
Code: Select all
INSERT INTO `phpbb_config` (`config_name`, `config_value`, `is_dynamic`) VALUES
('allow_avatar_remote_fb', '1', 1),
('allow_fb_avatar_remote', '1', 1),
('fb2011_admins', '0', 1),
('fb2011_appid', '0', 1),
('fb2011_comment_enable', 'yes', 1),
('fb2011_comment_posts', '2', 1),
('fb2011_comment_width', '450', 1),
('fb2011_fb_show_bday', 'yes', 1),
('fb2011_fb_show_gender', 'yes', 1),
('fb2011_fb_show_location', 'yes', 1),
('fb2011_lang', 'en_US', 1),
('fb2011_like_action', 'like', 1),
('fb2011_like_color', 'light', 1),
('fb2011_like_enable', 'yes', 1),
('fb2011_like_faces', 'false', 1),
('fb2011_like_font', 'tahoma', 1),
('fb2011_like_layout', 'standard', 1),
('fb2011_like_width', '450', 1),
('fb2011_page', '0', 1),
('fb2011_path', 'fb2011/', 0),
('fb2011_secret', '0', 1),
('fb2011_settings', '3', 1);
CREATE TABLE IF NOT EXISTS `phpbb_fb2011_userdata` (
`user_id` int(11) NOT NULL,
`fb2011_user_settings` int(11) NOT NULL,
`fb2011_fb_id` varchar(255) default NULL,
PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
REPLACE INTO `phpbb_modules` (`module_id`, `module_enabled`, `module_display`, `module_basename`, `module_class`, `parent_id`, `left_id`, `right_id`, `module_langname`, `module_mode`, `module_auth`) VALUES
(195, 1, 1, 'profile', 'ucp', 173, 18, 19, 'UCP_PROFILE_AVATAR', 'avatar', 'cfg_allow_avatar && (cfg_allow_avatar_local || cfg_allow_avatar_remote || cfg_allow_avatar_remote_fb || cfg_allow_avatar_upload || cfg_allow_avatar_remote_upload)');