BuddyDev

Search

Replies

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Show xProfile Location field (ID 186) in members directory #44658

    Hello Paulien,

    Thank you for posting. Please try the following code:

    
    add_action( 'bp_member_members_list_item', function () {
    
    	if ( bp_is_members_directory() && bp_is_active( 'xprofile' ) ) {
    		echo xprofile_get_field_data( 186, bp_get_member_user_id(), 'comma' );
    	}
    } );
    
    

    Please let me know if it works or not.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hello Fabien,

    Thank you for using the plugin. Please try the following code in your bp-custom.php file

    
    
    add_filter( 'bpdev_autoactivate_redirect_url', function ( $redirect_url, $user_id ) {
    
    	if ( bp_is_active( 'xprofile' ) ) {
    		$redirect_url = trailingslashit( bp_core_get_user_domain( $user_id ) . bp_get_profile_slug() . '/edit' );
    	}
    
    	return $redirect_url;
    }, 10, 2 );
    
    

    Please check and let me know if it helps or not.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Thank you for marking this topic as resolved.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hello Yuriix,

    Thank you for sharing the details. It seems your theme hiding that setting. Please try the following code it will work with legacy template pack.

    
    /**
     * Filter ajax post request
     */
    function buddydev_restrict_post_update() {
    
    	// Always allow site admin.
    	if ( is_super_admin() || function_exists( 'bp_nouveau' ) ) {
    		return;
    	}
    
    	$object = empty( $_POST['object'] ) ? '' : sanitize_key( $_POST['object'] );
    
    	if ( ! $object || 'user' == $object || bp_is_user_activity() ) {
    		// Allowed user ids.
    		$allowed_user_ids = array( 10 );
    
    		if ( ! in_array( get_current_user_id(), $allowed_user_ids ) ) {
    			exit( '-1<div id="message" class="error bp-ajax-message"><p>' . __( 'You are not allowed to post activity.' ) . '</p></div>' );
    		}
    	}
    }
    
    add_action( 'wp_ajax_post_update', 'buddydev_restrict_post_update', 9 );
    
    

    You can assign comma(,) separated user_ids for allowed users.

    Please give it a try and let me know if it helps or not.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hello Christian,

    Thank you for the acknowledgement. The other way is to remove the tab and re-register these tabs with the label changed i.e. quite a rework to achieve what we can do with the translate plugin easily. For notifications you may need to filter the friend’s notifications using the filter available here:

    https://github.com/buddypress/buddypress/blob/master/src/bp-friends/bp-friends-notifications.php#L92

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] Cannot ACCEPT friendship requests #44641

    Hello Anna,

    Thank you for the acknowledgement. I am glad that I could help you.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] xprofle on header #44640

    Hello Giuseppe,

    Thank you for posting. Please contact your theme author as they are in a better position to assist you with this requirement.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hello Yuiix,

    Are you using BuddyPress or BuddyBoss Platform for your community?. Also, please post me the code you are using.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] Cannot ACCEPT friendship requests #44634

    Hello Anna,

    Please use the Loco Translate plugin to rename the Friendship subnav item. Please have a look here:

    https://www.awesomescreenshot.com/image/26259520?key=36c304001ff12f1cf2642a79145963e7

    And to modify the slug use the following code in the ‘bp-custom.php’ file

    
    define( 'BP_FRIENDS_SLUG', 'matches' );
    
    

    Please give it a try and let me know if it helps or not.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hello Christian,

    Thank you for posting. You can modify strings using any translator plugin e.q. Loco Translate install and activate it. Go to the plugin page in the Loco translate menu locate BuddyPress and modify the strings you want to modify.

    Please give it a try.

    Regards
    Ravi