Replies
Hi @Calu
I am facing issues with litespeed cache and buddypress as well and wanted to check if you were able to get this resolved?
Thank you.
With the friendship restriction plugin is it also possible to:
1. ask the user sending the friend request to confirm by clicking a button that they are currently working with this institute or
2. show the user sending the friend request a message prior to sending the request that “Only send friendship request to institutes you are working with this”I have got this to work. Here is the code for anyone else who may come looking for it:
add_filter('frm_setup_new_fields_vars', 'show_user_dropdown', 15, 2);
add_filter('frm_setup_edit_fields_vars', 'show_user_dropdown', 15, 3);
function show_user_dropdown($values, $field, $entry_id=false){if( $field->id == 173 ){ // replace 173 with the field id for the user id field in the form
$values['type'] = 'select';
$values['use_key'] = true;
$values['custom_html'] = FrmFieldsHelper::get_default_html('select');
$user_id = get_current_user_id();
$friend_ids = friends_get_friend_user_ids( $user_id );
$values['options'] = array();
foreach ($friend_ids as $friend_id) {
$friend = get_user_by('id', $friend_id);
$values['options'][$friend->ID] = $friend->user_login; } }
return $values; }Thank you for confirming that the function I am using is correct. I have requested help on the formidable support as well and am waiting for a response from them. Meanwhile just to know my understanding of how the functions and array work, does this much part of the code look right to you?
$friend_ids = friends_get_friend_user_ids( bp_loggedin_user_id() );
$values['options'] = array();
foreach ($friend_ids as $a) {
$values['options'][$a->ID] = $a->ID; } }
return $values;I notice that there is a friendship restriction plugin. I was wondering if it would be possible to use the same for my requirement. Where I can allow friendship requests only between Institutes and practitioners.
If I understand correctly, this is the purpose of the plugin?
I am not able to edit the above post, so posting a slight correction here, the $field->id == 173 for both the codes. That represents the field id of the user field in formidable.
Wanted to check if the follow plugin that was mentioned in this thread was released?
Thank you, that makes sense. I am also planning to purchase the BuddyPress profile tab creator pro, will this also be possible via the same?
I noticed you have a plugin called “BuddyPress User Profile Tabs Creator Pro”. I see that I can add a tab to the main nav and the subnav. Can it also add subtab to the profile edit screen?
I have a shortcode to display the form so if the plugin can add the subtab to profile edit screen, based on the documentation, I can just use the form shortcode in content field of the newly created tab.