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.
- 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
</p> <p>//display suggestions in unorderd list</p> <p>$max=5;//how many suggestions at a time</p> <p>bp_show_friend_suggestions_list($max);</p> <p>
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.
- BuddyPress Group Suggest Widget: Help your members to find new groups
- Exclude Users from Members directory on a BuddyPress based social network
- Allow Users to select a blog theme while signing up/creating a blog on your buddypress powered social network
- BuddyPress User Notifications Widget plugin
- Buddypress Profile Widget For Blogs