I have a peer to peer marketplace where the users are private until the admin connects them.
How do I make it so the friends do not have the ability to make connections and only the admin has the ability to do that?
Furthermore if you all could help me to understand how to change the label from “friends” to “connections”
If you have any questions please let me know. I need to make these changes
Hi Alex,
Welcome to BuddyDev.1. To change “friends” to connections please use a translation tool(like poedit) and you can translate the text.
For your other question, I will need a few details first:-
1. How does the admin connects two user? I mean how are you adding two users as friend?
2. DO you want to remove the add friend/remove friend completely or just add friend?Thank you
BrajeshThanks for the response. I have seen some of the guys excited to get your helping them out 🙂
The peer to peer marketplace is going to have two different types of members..
A Coach
and
A member ( user | Customer)I want to have all the members private and connect the users via the admin’s discretion on the panel.
I don’t want a member ( customer ) to be able to connect with a coach themselves and I don’t want the coach to be able to connect with a user by themselves
if that makes sense
Thanks for your help
Hi Alex,
Thank you.
Here is an example filter implementation to show you show to remove the buttonfunction buddydev_custom_disable_friends_button( $btn ) { //$btn is an associative array //two keys are of our interest //'id' => 'not_friends'/ 'is_friend' / 'awaiting_response' / 'pending', //Other important field is 'link_id'=> 'friendship-button-' . $potential_friend_id //you can get the other user id from the link_id and current user id using get_current_user_id() //and decide to change the args as needed //if you return empty array or unset the 'id' key from the array, It will not generate any button return array(); } add_filter( 'bp_get_add_friend_button', 'buddydev_custom_disable_friends_button' );
Please try going through it and see if it helps or not?
Thank you
BrajeshThat will need a custom implementation as far as I can think the UI.
I thought you had a solution for that. It can be a good candidate for a custom plugin itself.
It is a little complex as it will need to handle:-
1. Providing UI to select 2 users or Another when doing from some user’s profile
2. Automatic adding as friends(easy)
3. having UI to delete the connections.If you have some type of implementation and need any assistance with a particular thing, please do let me know.
what is this all about? https://buddypress.org/support/topic/add-friend-through-admin-panel/
https://github.com/buddypress/BuddyPress/blob/master/src/bp-friends/bp-friends-functions.php#L31
thanks. total newb at all of this. I appreciate it
Hi Alex,
Thank you for the details.
1. It seems he did it in the admin and was facing issue with a BuddyPress function(he was looking for ways to stop notification) but he did not share the original code. So, unless the code is available, It will be a complete new plugin.If you are not familiar with code, you will need someone to implement it. It will need a couple of hours for anyone to implement.
Hi Alex,
The code he linked on github is part of BuddyPress Core.
I will talk to one of my colleagues and see if he is available, then we can do it, otherwise you may want to post it on BuddyPress.org forums and hope that someone might pick the idea.Thank you
Brajesh
You must be logged in to reply to this topic.