Replies
- Nitin Shah on June 13, 2022 at 8:57 am in reply to: [Resolved] Possible conflict with LiteSpeed Cache plugin and Xprofile Custom Field Types. #45344
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”- Nitin Shah on February 18, 2022 at 10:38 am in reply to: [Resolved] List of user friends as options in dropdown box #43338
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; } - Nitin Shah on February 18, 2022 at 9:01 am in reply to: [Resolved] List of user friends as options in dropdown box #43337
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?
- Nitin Shah on February 18, 2022 at 5:08 am in reply to: [Resolved] List of user friends as options in dropdown box #43326
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.
- Nitin Shah on February 15, 2022 at 12:02 pm in reply to: [Resolved] Link in Incomplete Message field on Buddypress Profile Completion Plugin #43214
Thank you for confirming this
Wanted to check if the follow plugin that was mentioned in this thread was released?
- Nitin Shah on January 28, 2022 at 7:07 pm in reply to: Allow users to hide some tabs from profile #42860
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?
- Nitin Shah on June 3, 2021 at 7:18 am in reply to: [Resolved] Add new subtab on edit profile screen after all field groups #38927
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.