Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/divangrastogi/bp-mutual-friends-finder/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
A BuddyPress plugin that adds mutual friends tooltips to member directory pages, allowing users to see their mutual friends with other members on hover.
Features
- Mutual Friends Tooltips: Hover over member names in the directory to see mutual friends
- AJAX-Powered: Fast, responsive tooltips loaded via AJAX
- Caching System: Built-in caching for improved performance
- Customizable Display: Configure tooltip position, animation, and display count
- Admin Settings: Easy-to-use settings panel for configuration
- Rate Limiting: Built-in protection against excessive AJAX requests
Requirements
- WordPress 5.0 or higher
- BuddyPress 10.0 or higher
- PHP 7.4 or higher
Installation
- Download the plugin zip file
- Go to WordPress Admin > Plugins > Add New > Upload Plugin
- Upload the zip file and activate the plugin
- Configure settings in BuddyPress > Mutual Friends
Configuration
Basic Settings
- Display Count: Number of mutual friends to show in tooltip (default: 3)
- Tooltip Position: Auto, top, bottom, left, or right positioning
- Animation Effect: Choose between fade or slide animations
Advanced Settings
- Cache Timeout: How long to cache mutual friends data (default: 5 minutes)
- Rate Limiting: Enable/disable AJAX request rate limiting
- Debug Mode: Enable debug logging for troubleshooting
Usage
- Navigate to the BuddyPress Members Directory
- Hover over any member name for 500ms
- A tooltip will appear showing mutual friends
- Click "View All" to see all mutual friends in a modal
Screenshots
Coming soon - screenshots of the tooltip in action
Frequently Asked Questions
Why don't I see the tooltips?
Make sure:
- You're logged in as a user
- The plugin is activated
- You're on a BuddyPress members directory page
- JavaScript is enabled in your browser
Can I customize the tooltip appearance?
Yes! The plugin includes CSS classes you can override:
.bpmff-tooltip- Main tooltip container.bpmff-tooltip-visible- Visible tooltip state.bpmff-tooltip-top/bottom/left/right- Position classes
Performance Considerations
The plugin includes several performance optimizations:
- AJAX caching (5-minute default)
- Rate limiting to prevent abuse
- Efficient database queries
- Minimal JavaScript footprint
Developer Documentation
Hooks and Filters
Actions
bpmff_before_tooltip_display- Fires before tooltip HTML is renderedbpmff_after_tooltip_display- Fires after tooltip is displayedbpmff_cache_cleared- Fires when cache is manually cleared
Filters
bpmff_tooltip_html- Modify tooltip HTML outputbpmff_mutual_friends_query- Modify the mutual friends database querybpmff_display_count- Filter the number of friends displayed
AJAX Endpoints
bpmff_get_mutual_friends- Get mutual friends for tooltipbpmff_get_all_mutual_friends- Get all mutual friends for modalbpmff_clear_cache- Clear plugin cache
Template Files
The plugin uses template files located in /templates/:
tooltip.php- Tooltip HTML templatemodal.php- Modal HTML templatefriend-item.php- Individual friend item template
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Changelog
Version 1.0.0
- Initial release
- Mutual friends tooltips
- AJAX loading
- Caching system
- Admin settings panel
Support
For support, please:
- Check the FAQ section above
- Review the troubleshooting guide
- Create an issue on GitHub
- Contact the plugin author
License
This plugin is licensed under the GPL v2 or later.
Credits
Developed by [Your Name/Company] Built for the BuddyPress community