New
PeoplePress is here. Community building for WordPress, reimagined. Fast, modern, and built for the communities you've always wanted to run.
See it live

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi David,
    Thank you for the details.

    In case of BuddyBoss, It is available from Dashboard->BuddyBoss->Profiles screen.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    No problem Vlad. I am glad it was resolved 🙂

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Cromacio,
    Thank you.
    I am sorry, we don’t have one for the free plugin.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509
    Brajesh Singh on in reply to: [Resolved] Update the user xprofile field #42237

    Hi Vlad,
    Thank you for the kind words.

    I am glad it worked 🙂

    PS:- You are using the Group slug as Profile field name. I assume you have create an xprofile field for each of group.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509
    Brajesh Singh on in reply to: User uploading on activity comments? #42236

    Thank you.
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Robert,
    Thank you.

    These 2 plugins are not complementary. You can only use either BuddyCommerce or WooBuddy.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509
    Brajesh Singh on in reply to: Custom page for user and group backgrounds. #42234
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25509
    Brajesh Singh on 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

  • Keymaster
    (BuddyDev Team)
    Posts: 25509
    Brajesh Singh on 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

  • Keymaster
    (BuddyDev Team)
    Posts: 25509
    Brajesh Singh on in reply to: 1 image per post #42219

    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