Replies
- Brajesh Singh on March 7, 2019 at 7:19 pm in reply to: [Resolved] BP Members With Uploaded Avatars Widget no longer showing members #21419
Thank you for the kind words and the appreciation Kuni.
It has always been a wonderful experience to work with it.Looking forward to assist you in future too.
Best regards
Brajesh - Brajesh Singh on March 7, 2019 at 7:17 pm in reply to: [Resolved] conditionsprofile field (if i am a women, i search man) #21418
Hi,
Please put this code in your bp-custom.php (or theme’s functions.php)
It will hide the I Research field on Registration/Edit profile and update its value from the “I am” field.I have used the field id from your site.
/** * Update value of the dest field when source is updated. * * @param BP_XProfile_ProfileData $object data object. */ function buddydev_sync_to_field_data_to_other_field_on_update( $object ) { // Field id, whose value we use to determine the calculated value for the synchronized field. $sync_source_field_id = 3; // field when change, triggers change to the sync field. // this is the field whose value will be updated based on the calculation. $sync_dest_field_id = 6;// field we will update. // If it is not the source field id, don't do anything. if ( $object->field_id != $sync_source_field_id ) { return; } $value = $object->value; $value = maybe_unserialize( $value ); $other_value = ''; if ( empty( $value ) ) { // delete. xprofile_delete_field_data( $sync_dest_field_id, $object->user_id ); return; } // Determine, what value we should set. // This is the block that we use to calculate // you will need to update for your use case. if ( 'Un Homme' == $value ) { $other_value = 'Une Femme'; } else { $other_value = 'Un Homme'; } // If the sync_destination field is select/radio, make sure the calculated value is what you have // added as option the the field add/edit screen. Should match exactly. // set teh value. xprofile_set_field_data( $sync_dest_field_id, $object->user_id, $other_value ); } // On update. add_action( 'xprofile_data_after_save', 'buddydev_sync_to_field_data_to_other_field_on_update' ); // On delete. function buddydev_sync_to_field_data_to_other_field_on_delete( $object ) { // Field id, whose value we use to determine the calculated value for the synchronized field. $sync_source_field_id = 3; // field when change, triggers change to the sync field. // this is the field whose value will be updated based on the calculation. $sync_dest_field_id = 6;// field we will update. // If it is not the source field id, don't do anything. if ( $object->field_id != $sync_source_field_id ) { return; } xprofile_delete_field_data( $sync_dest_field_id, $object->user_id ); } add_action( 'xprofile_data_after_delete', 'buddydev_sync_to_field_data_to_other_field_on_delete' ); /** * Hide the synchronized field from Registration/Edit profile fields. Its value is set programatically. * @param $args * * @return mixed */ function buddydev_exclude_sync_profile_field_in_edit_context( $args ) { if ( ! bp_is_user_profile_edit() && ! bp_is_register_page() ) { return $args; } $sync_to_field = 6; $exclude_fields = isset( $args['exclude_fields'] ) ? explode( ',', $args['exclude_fields'] ) : array(); $exclude_fields[] = $sync_to_field; $args['exclude_fields'] = join( ',', $exclude_fields ); return $args; } add_filter( 'bp_after_has_profile_parse_args', 'buddydev_exclude_sync_profile_field_in_edit_context' );Regards
Brajesh - Brajesh Singh on March 7, 2019 at 6:22 pm in reply to: New BuddyPress Blogs not generating slugs #21415
Hi Chris,
I just tested it. It is working for me on WordPress 5.1/BuddyPress 4.2/BuddyBlog 1.3.4 and BP Simple Front end post 1.3.6Are you allowing users to publish post(posts status set to publish or is it set to draft?). Also, can you please visit settings->permalink and make sure it is setup(I am assuming it is).
Thank you
Brajesh Hi Max,
Thank you for clarifying.
We haven’t tested it. We can certainly test and make compatible with our activity autoloader plugin in future.
Thank you
Brajesh- Brajesh Singh on March 7, 2019 at 5:47 pm in reply to: New BuddyPress Blogs not generating slugs #21413
Hi Chris,
Welcome to BuddyDev.I am sorry for the inconvenience. The slug should be generated automatically.
There was a change related to slug generation in WordPress 5.1, It might be the reason.
Please allow me to check it and get back to you in 30 minutes.
Thank you
Brajesh - Brajesh Singh on March 7, 2019 at 5:45 pm in reply to: [Resolved] BP Members With Uploaded Avatars Widget no longer showing members #21412This reply has been marked as private.
- Brajesh Singh on March 7, 2019 at 4:41 pm in reply to: [Resolved] conditionsprofile field (if i am a women, i search man) #21406
Hi,
I had a look at the registration page.1. Please disable the conditional field plugin. You do not need that for this case.
2. I will post some code(in couple of hours) to help you get it working.Regards
Brajesh - Brajesh Singh on March 7, 2019 at 4:40 pm in reply to: [Resolved] Primary menu items not appearing on any pages other than Buddypress pages #21405
Hi Sam,
Thank you.Please allow me to update the plugin. Will be releasing in next couple of hours and will be writing back.
PS:- About upgrading to our membership, I will be providing coupon to get the plugin price discounted from the membership cost.
Regards
Brajesh - Brajesh Singh on March 7, 2019 at 4:33 pm in reply to: [Resolved] Check if checkbox have data and print corresponding member name #21403
Hi Pause,
Thank you for the question.I am sorry but I still unsure of the question.
1. Do you want to list all users who have selected(checked) some of these option and then show them as well as their choices.
2. Or do you want to list all users who have checked a specific choice? This will be a bit difficult for large number of users(40 is fine).
PS:- Will you have a lot more users in future or is it going to be limited to few users? I am asking to help me provide you more efficient solution.
Thank you
Brajesh - Brajesh Singh on March 7, 2019 at 4:24 pm in reply to: [Resolved] conditionsprofile field (if i am a women, i search man) #21400
Hi,
I am sorry but the way you are looking for is not available in BuddyPress.What you are looking for a derived/caculated field from the values of another field.
The general strategy in this case is to use only one field and calculate the other value.
For example, If a person is Man, you can write code to derive the Research field value as woman.
There does not seem to be any existing solution for this kind of use case. I do see that you can write some code to sync value of another field based on a field.
If you can post me the field ids for both the field(and exact options), I will be able to provide you some code to resolve it.
Regards
Brajesh