Replies
- Brajesh Singh on December 23, 2021 at 11:30 am in reply to: [Resolved] BuddyCommerce – edit addresses will give 404 page #42235
Hi Robert,
Thank you.These 2 plugins are not complementary. You can only use either BuddyCommerce or WooBuddy.
Regards
Brajesh - Brajesh Singh on December 23, 2021 at 11:29 am in reply to: Custom page for user and group backgrounds. #42234This reply has been marked as private.
- Brajesh Singh on December 23, 2021 at 12:38 am in reply to: [Resolved] Update the user xprofile field #42222
Hi Vlad,
The code to update will have 2 parts. A form and a handler. The form is placed somewhere in your group screen and the handler code should be in your theme’s functions.php.
Here is your form updated slightly.
<form id="myform" method='post' action=""> <select id="mylogins" name="mylogins" class='livesearch' required> <option value="">Please select login</option> <?php if ( bp_group_has_members( bp_ajax_querystring( 'group_members' ) ) ) : ?> <?php while ( bp_group_members() ) : bp_group_the_member(); ?> <option value='<?php echo bp_get_member_user_id(); ?>'><?php bp_member_user_nicename(); ?><?php bp_group_member_name(); ?></option> <?php endwhile; ?> <?php endif; ?> <?php $group_id = bp_get_group_id( groups_get_current_group() ); ?> </select> <input type="hidden" name="group-meta-form-group-id" value="<?php echo esc_attr( $group_id ); ?>"> <input type="text" placeholder="Enter value" name="my-field-name" required> <?php wp_nonce_field( '_group_meta_update_' . $group_id, '_group_meta_update_nonce' ); ?> <input type="submit" id="myform" value="Save"> </form>and here is the handler code
add_action( 'bp_actions', function () { // make sure it is our form submission. if ( ! isset( $_POST['group-meta-form-group-id'] ) ) { return; } $field = 'My Field Name'; // Please Update it with Your Xprofile field id or name. // Only logged users can access it. if ( ! is_user_logged_in() ) { return; } $grooup_id = absint( $_POST['group-meta-form-group-id'] ); if ( ! $grooup_id || ! wp_verify_nonce( $_POST['_group_meta_update_nonce'], '_group_meta_update_' . $grooup_id ) ) { return; } $selected_user_id = isset( $_POST['mylogins'] ) ? absint( wp_unslash( $_POST['mylogins'] ) ) : 0; if ( ! $selected_user_id || ! get_user_by( 'id', $selected_user_id ) ) { return; } $logged_user_id = get_current_user_id(); if ( is_super_admin( $logged_user_id ) || groups_is_user_admin( $logged_user_id, $grooup_id ) || groups_is_user_mod( $logged_user_id, $grooup_id ) ) { // update profile. $value = isset( $_POST['my-field-name'] ) ? sanitize_text_field( wp_unslash( $_POST['my-field-name'] ) ) : ''; if ( empty( $value ) ) { xprofile_delete_field_data( $field, $selected_user_id ); } else { xprofile_set_field_data( $field, $selected_user_id, $value ); } bp_core_add_message( __( 'Updated successfully.', 'some -text-domain' ), 'success' ); } } );I haven’t tested it but I hope they will work fine.
Please give it a try and adapt as you need it.
Regards
Brajesh - Brajesh Singh on December 23, 2021 at 12:03 am in reply to: User uploading on activity comments? #42220
Hi Akagi,
Thank you for the question.
I am sorry, it is not available currently. We do hope to ship it by the end of next year January.Regards
Brajesh Hi Drickle,
Welcome to BuddyDev.At the moment, there is not a simple way to achieve it. It can be achieved by overloading the client side js. If you want to still do it, you may want to overwrite the “isRestricted” callback over the uploader with a custom one.
We are simplifying MediaPress and it will be even doable using a php filter in our release around the end of January.
Also, infinity is not the possibility as with MediaPres, you have limits for the maximum storage allowed to a user.
Regards
Brajesh- Brajesh Singh on December 22, 2021 at 11:36 pm in reply to: Elementor Shortcode in Profile tab blows avatar layout #42218
Hi April,
It seems the profiles are protected for non logged users. I am seeing 404 when accessing the profile.Please enable it temporarily.
Regards
Brajesh - Brajesh Singh on December 22, 2021 at 11:34 pm in reply to: [Resolved] Shortcode for Buddypress Friends Suggestions [Free Version] ? #42217
Hi Cromacio,
Thank you for the question.If you are using our BuddyPress Friend Suggestions Pro, Please have a look at the shortcode option.
https://buddydev.com/plugins/buddypress-friends-suggestions-pro/#shortcode
Regards
Brajesh - Brajesh Singh on December 22, 2021 at 11:23 pm in reply to: BuddyPress Xprofile Custom Field Types – can’t edit profile fields #42216
Hi David,
The plugin works with BuddyPress and extend the fields of BuddyPress. Do you have BuddyPress installed and active?
Also, if yes, Please visit Dashboard->Settings->BuddyPress and make sure the “Extended Profile” is enabled.Please let me know if that is already enabled.
Regards
Brajesh - Brajesh Singh on December 22, 2021 at 11:16 pm in reply to: [Resolved] Buddyblog pro – users follow other users blogs #42215
Hi Daniel,
I was sort of expecting that. BuddyBoss makes the button ineffective outside the directory and profile. The best solution is to ask BuddyBoss either load their script for handling follow on all parts of the site to to avoid making the button no-op.Regards
Brajesh - Brajesh Singh on December 22, 2021 at 11:14 pm in reply to: [Resolved] BuddyPress group admin capabilities – for role, for member type #42214
Hi Vlad,
I am pretty sure the role has no effect in case of BuddyPress.Is there any chance that you are using BuddyBoss? They might have different way to handle it.
Regards
Brajesh