BuddyDev

Search

BuddyPress Friends suggestions Widget:- Help your Users to Build Their Network faster

friend-suggest-icon

Thanks to Gwu for the basic idea and the code of this widget. Here I am putting it with some enhancements.

Now we have the basic friend suggestions widget for BuddyPress based social network. It will display a friend suggestion list like facebook friend suggestion to the logged in user and the user can add new friend or hide the suggestions.

In the current version(I am calling it basic version), The possible friend list is built by looking for friends of friends and then providing the suggestion to the user.

Features:-

  • Show suggestions based on the friends of friends connections
  • Allow user to hide a suggestion from showing in future
  • Allow site admin to limit the number of suggestion is shown at a time

For Future versions, I am considering the following possibility:-

  • Allow friend suggestion based on the xprofile fields

Obviously the suggestions are randomized to avoid looking boring :)

How about some screenshots:-

Friends Suggestion widget in available Widgets list:-

Friend Suggestion Widget Options

Friend Suggestion Widget Display:-

The widget does not supplies any css, so you will need to update the css according to your theme. The above look is from bp-default theme when we do not apply any css.

In case you want to call the widget via php, you can do the following

//display suggestions in unorderd list
$max=5;//how many suggestions at a time
bp_show_friend_suggestions_list($max);

Download & Installation:-

http://buddydev.com/plugins/buddypress-friends-suggest/

Localization:-

put the translated mo file as your_local(eg. en_US).mo in the bp-friends-suggestions/languages directory and It will show the localized strings.

I am sure some of you will find it helpful and when the next version comes out it will be much more helpful.

Let us say thanks to @Gwu again.

Have some ideas for further improvement, any feedback, please let us know in comments. Looking forward to your feedback.

Get latest WordPress & BuddyPress tutorials, news and tricks in your inbox.

We send out a lovely email newsletter with the most popular stories. Be a part of it.

66 Responses to BuddyPress Friends suggestions Widget:- Help your Users to Build Their Network faster

  • Nice, but on what factors does it work, how does it look for people that might be friend-material?
    Only trough friends of friends or is there more to it already? ^^

    • Hi Xevo,
      Thanks for the comment.
      Currently it uses only the friends of friends logic but in next version, I am sure it will allow on the basis of xprofile fields(say similar interests or location etc).
      If you think any other better option, please do let me know for building suggestions list.

  • Nice Plugin, i use it now, since 5 minutes – looks what user´s say…

  • Pingback: Daily Tip: Build Your BuddyPress Community With the Friend Suggestions Widget | WordPress, Multisite and BuddyPress plugins, themes, news and help – WPMU.org

  • I like this plugin and will implement it soon. I was just wondering if a similar plugin could be developed that suggests groups for a user to join, based off what groups they have already joined, or the groups that other members belonging to a common group (to the user) belong to. Again great work on this plugin.

    • Hi Guy,
      That’s already on the plate. GWU had sent me the basic code for that too, but I have not posted as It will need some editing to make more efficient. Will come anytime soon.

  • What happens if you are a brand new user and have no connections yet?

  • OK – Would suggest then that the next version could randomy display some people, just to get the proverbial ball rolling

    • Also another question (or suggestion if it doesn’t do it already). It would be very beneficial if this plugin were able to monitor who you are already connected to so that it doesn’t suggest those people.

      Cheers!

    • Sure, that’s a good feature and I will certainly put it in the upcoming version :)

  • Hi Brajesh, Can this plugin work with BP followers instead of friends?

    • Hi,
      Thanks for the comment. Haven’t checked with Followers, but will test and make some changes in next version to allow with that plugin too.

      • Hi Brajesh,

        Any idea as to when you might have an update on this plugin? We’re excited to be able to use this once you have released your next version.

        Thanks!

        Philippe

  • Hi @Brajesh,

    any updates on group suggestion plugin?

    Thanks.

  • this plugin is absolutely great, but it will be nice if the ADD Friend button can just be a small icon with the word add friend in front and align under the Suggested name instead of this current position.that will be so cool and neat

  • Like it does on facebook , which makes it very neat the icon can just be + sign.

    • Thanks for the suggestions Abbey.
      Will add something similar in future. For now, you may want to do the same with css.

  • thanks for your reply, do i need to create a new css file for it because there is no css file there that i can edit, only php and js.

    regards

  • Hi I was just wondering if there was any update on the group suggestion add on / version of this plugin – thanks, Guy

    • Hi Guy,
      I am sorry for that. I am not sure about the criteria we will use to suggest groups. Can you please suggest some way which will be helpful ?

  • Hi @Brajesh,

    any updates on group suggestion plugin?

    Thanks.

    • Hi GWU,
      I am sorry for not publishing that. I need some help regarding what criteria we should use for suggesting groups ? Can you please help.

  • @sbrajesh nice widget … but strangely i didnt find it on your site in the list of plugins… found it because WPMU had mentioned it in one of their articles.. but wonderful! was reading all your notes… and looks like you know where to take this one with the next release… nice!

    • Hi Siddhart,
      yes I missed to include it in plugins section. Will have it this weekend. Also, the suggestions based on profile fields will come with the bp 1.3

  • Hi!!!
    brajesh i got a website, its an social networking site, on buddypress some of ur plugins are really good(premium) so, i need them but wanna ask that i am installing ur cosmic theme but it is showing some error in ajax.php same with some plugins so, need help with theme and what if i go with ur permium plugins and it show same error.

    mayur

    • HI Mayur,
      sorry I could not see your message earlier.
      We support all the plugins in the forum and in normal circumstances they will work out of the box. Yer could be some of the cases where they may not and That is why I am always there in the forum.

      Sorry for my delayed reply. If you need any help regarding anything, please PM me.

  • Hi, nice plugin thanks. Do you know when the version that uses profile fields will be available? and the groups one? For the groups even something that just suggest groups your friends have joined would be great

    thanks again

    Rachael

    • Hi Rachel,
      Thanks for the comment. I will put a plugin for group suggest this weekend.
      For profile fields, we may have to wait till bp 1.3 comes out.

  • For group suggestions, I think the only meaningful way is to get unique groups of your friends which you are not already a member of.

    • Agreed. I was just not sure in the past about it’s usefulness. Now, looking at your comments and a few others, this seems the best way to go for now :)

      • Suggesting any members from the groups the current user belongs to – that would be incredibly helpful to us. Looking forward to this feature.

  • @all,
    Please check back tomorrow for group suggest plugin :)

  • Good to see the Group suggestion plugin Brajesh. Any idea when you will update the Friend suggestion plugin with the ideas discussed in this thread?

    Thanks!

  • Hi,

    This is a nice plugin and I have installed the plugin on my site but it is now showing the widget. Is there anyone who can help me.

    Thanks

  • Will your plugins work in a communitypress based site??
    Anyway,all your plugins look gr8…

    • Hi Deepak,
      Thank you for the comment.
      Ideally It should work with CommunityPress but CommunityPress is based on BP 1.2 branch(I am not sure If it was updated for Bp 1.5 branch), so you may need older version of this plugin(Please check the bottom page of this plugin for the version history).

      Hope that helps.

  • Hi Brajesh. Do you have any plans to expand this a bit and make an option for the suggestion to be based on common friends? If I didn’t explain well, I mean something similar to Facebook, where if you and another user have similar friends it will list those friends and suggest that you 2 also become friends. I feel that would be a welcome addition to this plugin. There’s nothing really like this that I’ve searched around for. Thanks, Roger.

  • Thanks for the widget!! I really like it. One small thing that I did not like about it is that if there were no friends to suggest, I would prefer if it not display the widget at all rather than displaying a message saying that there is not enough information. I have made the following changes to accomplish this, and I’d be happy to submit a patch if you wanted.

    The changes are all in bp-friend-suggest.php
    In bp_show_friend_suggestions_list I removed lines 87-113 and added them to a new function called find_possible_friends() which returns the array of possible friends. Then I added on line 87:
    $possible_friends = find_possible_friends();

    Then in function widget() and function bp_friend_suggest_add_js(), I replaced
    if(!is_user_logged_in())

    with:
    $possible_friends = find_possible_friends();
    if(!is_user_logged_in()|| empty($possible_friends))

    Pretty straightforward if anyone else is interested.

  • Hi Brajesh, congrats for your work developing this plugin! I wonder when you gonna launch the new version, the one which takes in consideration profile fields to make more accurate friend suggestions.

  • Hello. I have installed the plug-in, and it breaks, anything below in my sidebar section is disappears. I’ve tried using both the Twenty-eleven, and Buddypress default themes to test. I see the title of the widget, however, everything else below it disappears.

    • Hi Dave,
      which version you are using ?
      I just tested version 1.0.1 with BuddyPress 1.5.5 and bp-default theme and It is working fine for me. Is there any chance that the friends component is disabled ?

  • @brajesh – how can we filter out users to whom a friendship is already requested

    thanks

  • Hi @brajesh,

    First of All, thanks for both , they are very useful.

    Does the new verson (that suggests friends based on profile and supports follow) have been released? Of. Not, how can we help tiú developing The update?

    Thanks and regards,

    Felipe

    • Hi Felipe,
      Thank you.
      It is not yet in the update. I plan to release something like that with BuddyPress 1.6.

      Regards
      Brajesh

  • Hey Brajesh… any update on when the next release will be out (mainly looking at suggestions based on profile fields)… really looking forward for this one… thanks for all the work you put in to make buddypress such a nice place…

  • Hi, the plugin is excellent instead suggest options disappear from loading new friends as you do facebook, that would be amazing, right now I’m trying to do but if you do please update :)

    • Hi Joao,
      sorry I missed your comment.
      I am unable to understand what you want. Can you please explain a little more ?

      If you have already done or need any help in doing that, please do let me know, will be glad to assist if I can :)

  • Hi Brajesh.

    Nice plugin. I am using this on my site. But I found that, for a new user, once he is fresh registered, having no friends, is not showing any friends suggestion. Can we have any such feature instead of showing the message ” We don’t have enough details to suggest a friend yet”.

    I want that, instead showing this message, the plugin will show some random friend suggestions like facebok do.

    Anyways thanks for such a great plugin.

    • Hi Brajesh

      My point is, I am using this plugin. But the time, when there is no friends to suggest (For example in the case of a newly registered user), its showing the message “We don’t have enough details to suggest a friend yet”.

      In this case i want to suggest some random friends for the users.

      Here I am sending you the test user’s credentials for my site. Kindly check the rightside block, where its showing teh message just above the Adsense ad.

      Site url – http://myneedz.com
      user – webmaster
      password – p@ssw0rd

      Waiting for a reply

      Thanks
      Tusar

    • Hi Tusar,
      That sounds like some good Idea :) Implementing right now :)

  • Any chance of BP 1.7 update?

Leave a Reply

Are you looking for support?

Please join BuddyDev Premium Club to get timely support. At the moment, We are unable to provide much support in comments. By Joining BuddyDev Premium Club, you will get guaranteed support(and we have 30 days money back guarantee too).

Your email address will not be published. All the fields marked as * are required.


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>