Forum Replies Created
-
In reply to: is Buddypress exactly what I need?
The P2 theme has some elements of what you mentioned. It’s not a BP theme though, so you’d have to develop a custom theme. P2 is also used in the new version of the BP group blog plugin.
OK, I’ve upgraded. Under Debug Options I see a selected checkbox with Disable BuddyPress filters. What are Buddypress filters? Should I enable them?
there should never be a need to manually edit the plugin, no matter what you want to change – there are filters and actions for that, and if you need another filter/action somewhere else, I can add it so there will never be a need to edit the plugin directly. I’m pretty sure the 2 actions & 1 filter I’ve included should be sufficient for most usual needs, though
What are these actions and filters? I see nothing about them in the settings area. Will they let me add queries, change how userdata is stored in the wp and other databases, like a mailing list? Does anyone have examples how to do that the official way? I’m not a programmer…
So there already is a new version with Andy’s code included? That was my question. That’s news to me. Is that the current one in the WP plugin depository? How is it different from the test version?
If the choice is between an official WP version that doesn’t work on BP or an unofficial test version that does, I’ll use the unofficial test version. What’d ya gonna do about it?
@justin_k, is there a definitive version? What are the advantages?
issue could only be the Email Domain setting on the Facebook application, as far as I know
That sounds like it to me. Have you checked that Greg? I don’t think it’s anything Buddypress-specific.
Andy’s version of the plugin works brilliantly for me, including custom queries – except a query for xprofile fields, haven’t figured that out yet.
@Greg, I get that message:
This application is not set up to request your email address
That is weird. But then the page forwards to a white page with just this text:
Error: Failed to get the Facebook session. Please verify your API Key and Secret.
That still looks like the most likely cause. Make sure you copied the right numbers and that they were saved in the plugin. The save buttons in the admin area are a bit tricky. I think they are separate forms, so you have to hit the right button.
@gregfielding, are you really sure you have entered the correct Facebook API keys? That they were actually saved in wp-admin as well?
@bobin1983, I added this below the login form in my theme. Wrong, but it works:
<? jfb_output_facebook_btn(); jfb_output_facebook_init(); jfb_output_facebook_callback(); ?>I’m trying to add the Facebook URL to a custom xprofile field. Adding this query to _process_login.php, like I did here with other queries, doesn’t work:
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->bp_xprofile_data} SET value = %s WHERE ID = %d AND field_id=3", $fbuser['profile_url'], $user_login_id ) );It does get stored in wp_users, but I need to figure out how to connect this plugin to xprofile anyway.
PS, most of what you’re doing will be irrelevant when I release a version that works with BP out-of-the-box
So you’re going to include ListMessenger integration?
What happens if the Facebook user does NOT allow to give his email address? Will it go through with email@unknown.com or will the login be aborted? I’d prefer no email = no access.
Or is that the difference between the ASK and REQUIRE settings…?
Having trouble testing it. It apparently recognizes my Facebook accounts from previous tests.
EDIT:
What does this error mean?
Error: Could not register hashes with Facebook (connect_registerUsers)
If you want to change or add to how user data is stored in the database, you can add some lines to this section of _process_login.php:
//Insert a new user to our database and notify the site admin
$user_login_id = wp_insert_user($user_data);
$user_login_name = $user_data['user_login'];
wp_new_user_notification($user_login_name);I added the following to get fullname as display name, instead of just the first name:
$fullname = $fbuser['first_name'].' '.$fbuser['last_name'];
$firstname = $fbuser['first_name'];
$lastname = $fbuser['last_name'];
update_usermeta( $user_login_id, 'nickname', $fullname );
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET display_name = %s WHERE ID = %d", $fullname, $user_login_id ) );I could probably shorten that, but it works…
Tried it with a new user:
– username is generated correctly
– display name is only the first name -> how can I have full name as default?
– email is email@unknown.com
The email problem probably has something to do with these settings in wp-admin:
E-Mail:
ASK the user for permission to get their email address
REQUIRE user for permission to get their email address
It’s not clear to me what these settings mean. The second sentence is really cryptic/nonsensical. Should I select the second if I want to require an email address from users to enter my site?
EDIT:
If you select ‘REQUIRE…’ a user trying to log in with Facebook sees this:
TheWebsite would like to email you.
Allow TheWebsite to contact me at:
my Facebook contact email (user@gmail.com)
OK, makes sense…
Login goes through nicely. Email address is now entered into the account. A number 2 is added to the generated username – my two Facebook accounts are in the same full name. Nice!
The lastnames are added to wp_usermeta, but the display_name field in wp_users only gets the firstname. There are no lastnames stored in xprofile. I also need to figure out how to add fullname + email to my mailing list.
Where can I edit that behavior? Where are the queries?
Installed the plugin (Andy’s version). I have a custom theme/login form that doesn’t use the widget system. How can I add the Facebook button to the login form in my theme?
Where is the “Include Buddypress filters” option? I can’t find it anywhere in wp-admin WP-FB AutoConnect Options. I see this line: “…select the option below to automatically add a Facebook button to your built-in login panel.” Is there supposed to be a select box below that? There’s nothing.
Adding this to the login form code in my theme works:
<?
jfb_output_facebook_btn();
jfb_output_facebook_init();
jfb_output_facebook_callback();
?>Logging in via a Facebook account works. It matches by email address? It logged in an existing test account with a BS name.
Nice!
I’ll clean the database and try again as a new user…
Excellent. Downloaded [snip]. Will test that one tonight.
@justin_k, I don’t really expect answers to anything. I often post to keep track of what I’m doing, hopefully in a way that will help others trying to do the same thing. I’ll try this tonight and post back.
Thanks justin_k. The discussion mentions this function from “Andy”:
<?php
function bp_fbconnect_modify_userdata( $userdata, $userinfo ) {
$userdata = array(
'user_pass' => wp_generate_password(),
'user_login' => $fbusername,
'display_name' => fbc_get_displayname($userinfo),
'user_url' => fbc_make_public_url($userinfo),
'user_email' => $userinfo['proxied_email']
);
$fb_bp_user_login = strtolower( str_replace( ' ', '', fbc_get_displayname($userinfo) ) );
$counter = 1;
if ( username_exists( $fb_bp_user_login ) ) {
do {
$username = $fb_bp_user_login;
$counter++;
$username = $username . $counter;
} while ( username_exists( $username ) );
$userdata['user_login'] = $username;
} else {
$userdata['user_login'] = $fb_bp_user_login;
}
return $userdata;
}
add_filter( 'fbc_insert_user_userdata', 'bp_fbconnect_modify_userdata', 10, 2 );
?>Where should I add this? Does this use ‘firstnamelastname’ as username and check for doubles? Does it synchronize and update all the fields in wp_users, wp_usermeta and xprofile?
Usernames like this, ‘community.net/members/fb_100000441950350’, are really not acceptable imho.
Where is the query that actually stores the new user data in the database? Is it in the plugin or does the plugin send data back to WP/BP files? I also need to that data stored in mailinglist tables.
Users are created fine but the member links to their name not their username, so clicking on the member name redirects to the home page, not the user profile.
That sounds like it has to do with how the real name/display name and username are stored in xprofile, wp_users and wp_usermeta, which is a mess in default BP. My custom synchronization code would probably fix that, if I can figure out where to add it in the plugin.
Do the Facebook logins even have a username – lowercase, one word? Would you have to generate one, from the full name? Doesn’t the plugin do that?
Apologies if I’m off base. Haven’t even tested myself yet.
Yes Greg, lets do that. My testing site is here. The plugin will probably be added tonight. Anybody who wants to test logging in with their Facebook account is very welcome to until April 1st. The users database will eventually be deleted.
I have custom code that adds new members to a mailing list and synchronizes the real name to wp_usermeta etc. I’d probably have to add that code to the plugin somewhere, right? Or does the plugin feed the registration data back through the regular BP process as if it came from the signup form?
This looks really slick!
How does this work? Will users logging in with their Facebook login be added to the members database? Will Facebook logins be “mapped on” existing users or will it create double member registrations?
I’ll try on a test installation, but not sure how to test everything without creating test Facebook accounts etc…
EDIT:
Oops, should have read the plugin page:
# No user interaction is required – the login process is transparent to new and returning users alike.
# Existing WP users who connect with FB retain the same local user accounts as before.
# New visitors will be given new WP user accounts, which can be retained even if you remove the plugin.
This sounds too good to be true!
In reply to: A small feature for 1.3Yes, please as little widgetizing as possible. Keep code out of themes. Keep BP aimed at content producers and web designers (html/css), don’t turn it into Squarespace.
In reply to: bp-events updateTotally agree Erwin Gerrits.
This is why I get annoyed with plugin/feature wishlist posts, when there are still so many core BP issues that need to be fixed or cleaned up. Plugin development takes time. Time is money. If you need a feature these are the options:
– get a paid commercial plugin, so you can hold the company responsible for bugs and updates
– get a proven, best-of-breed WP plugin that has a broad users/developers base of its own and that you can perhaps adapt a bit to take advantage of BP
– get a BP plugin that someone developed for his own project, with little guarantees that it will be updated or work within your theme or do everything you need
– write your own
In reply to: Blog name twice in next_posts_linkThanks for the suggestion iamzippy. That backslash was originally in there, just got stripped. So that’s not the problem. The P2 theme is for a single blog, not for a WPMU blog. That has to be taken into account somehow.
In reply to: bunch of ideas….2. there’s already integration with BBpress
Why does everybody want to use Buddypress as a forum? What’s the point of having a blogs and groups-based social network if you’re still going to put an old-fashioned forum at the center?
Can someone (Auttommatttic?) please write a basic social networking plugin for BBpress, expanding the user account pages in BBpress a bit, so people don’t have to come over here asking to turn Buddypress into something lame?
In reply to: Conflict with wp-o-maticI think FeedWordpress had a solution for duplicate posts. Not sure where I’d seen that. I know, not very helpful… But I wouldn’t give up on FeedWordpress too soon. It continues to surprise me.