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. A pro version is available with profile profile field data based suggestions.
- 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
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:-
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.