BuddyPress Extended Friendship Request plugin allows users to send a personalized message with the BuddyPress friendship request.
How it works:-
- When a users clicks on Add friend, It shows him/her a small popup to enter some personalized message
- The user can enter a personalized message and click on the Send request to send the request.
Please see the screenshots for more details.
Screenshots:-
Clicking on Add Friend:-
Request sent successfully:-
Friendship Request on Members Directory:-
Request sent Successfully:-
Here is how it looks on User's friendship Request page
The popover is based on the popover plugin from Twitter's bootstrap. We have extracted and modified the code to avoid binding with the specific elements.
Set a default message in the popup form
With version 1.0.9 and above, you can use the following code to add a custom default message.
function buddydev_default_extended_friendship_message( $message ) { $message ='Let us get connected!'; return $message; } add_filter( 'bp_ext_friendship_default_message', 'buddydev_default_extended_friendship_message' );
Closing any/all active popover using javascript event:-
If you trigger the even "bp-ext-friendship-popover:close" on document or any element, all open popover will be closed.
Example:-
jQuery(document).trigger("bp-ext-friendship-popover:close" );
It will close all active popups.
Note:-
This plugin changes the class of Friendship button from friendship-button to friendship-button-ext
Blog Post Link: https://buddydev.com/buddypress/introducing-buddypress-extended-friendship-request-plugin/