Shape the future of Social networking with WordPress: Join Project Midnight Sun! The next generation platform for community building with WordPress!

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: Disable subnav friends #41159

    Hi John,

    Thank you for the question.

    Please use the following code.

    
    
    /**
     * Removes the 'friends' sub nav from activity.
     */
    add_action( 'bp_activity_setup_nav', function () {
    
    	if ( ! bp_is_active( 'friends' ) ) {
    		return;
    	}
    
    	bp_core_remove_subnav_item( bp_get_activity_slug(), bp_get_friends_slug() );
    } );
    
    /**
     * Removes 'friends' from account drop down menu in the admin bar.
     */
    add_action( 'bp_activity_setup_admin_bar', function () {
    
    	if ( ! bp_is_active( 'friends' ) ) {
    		return;
    	}
    
    	global $wp_admin_bar;
    	$wp_admin_bar->remove_node( 'my-account-activity-friends' );
    } );
    

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: Problem with the feed of the activity of member #41158

    Hi Alison,
    Thank you for the question.

    You are using Divi builder which is causing it. BuddyPress is trimming the content from non parsed post content.

    The simplest solution will be to apply ‘et_strip_shortcodes’ on the activity content but a better solution will be to filter on ‘bp_activity_create_summary’ and get some code suggestion from Elegant theme on what is the best way for generating excerpt.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472

    Thank you Charles.

    Have received your email. Please expect an update of BuddyBlog Pro by Day end Tuesday. I will be posting some solution for this topic by Monday.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472

    Hi Cromacio,
    Thank you.

    it’s good to know that you got it resolved.

    Thank you for letting me know.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472

    Hi John,
    Thank you for the question.

    Here is a sample code to do that.

    
    
    add_filter( 'bp_activity_can_comment', function ( $can, $activity_type ) {
    
    	// already protected, return.
    	if ( ! $can ) {
    		return $can;
    	}
    
    	$logged_user_id   = get_current_user_id();
    	$activity_user_id = bp_get_activity_user_id();
    
    	// if not user's own activity, or not super admin
    	// and the current user is not friends with the activity user, disable comment.
    	if ( $logged_user_id != $activity_user_id &&
    	     ! is_super_admin() && function_exists( 'friends_check_friendship' ) &&
    	     ! friends_check_friendship( $logged_user_id, $activity_user_id )
    	) {
    		$can = false;
    	}
    
    	return $can;
    }, 20, 2 );
    
    

    Please note that it will do it for all activities(including user’s activity on the group).
    Also, It will not hide the comment reply button.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: [Resolved] Users Choosing Member Types #41151

    Hi Lisa,
    Thank you.

    I will be pushing the update by day end tomorrow.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472

    Hi Fabricio,
    Thank you for using the plugin.

    I had a look in plugin’s code and I am not seeing any code preventing registration email.

    Is there any chance that you are using some other plugin that affects registration such as auto activation, moderation or something on that line?

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: [Resolved] Issues with BP Deactivate Account #41125

    Hi Khalid,
    I am sorry, I have tested it again on your site and I am not seeing any issue at all.

    How do you produce it? I tried with the test user account you had shared above.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472

    Hi Charles,
    Thank you for posting the question here.

    Can you please link me to 2 screenshots(1 showing the custom post type and one showing the standard) and point the differences that you need to be available.

    I am sorry, I had asked you this over mail but I am not able to recall it currently. so, please bear with me and provide the screenshot again.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472

    Hi Pablo,
    Thank you for the log.

    I am sorry, they don’t show any message related to our insertion. Please allow me to try this on a local setup this weekend and get back to you if I am able to reproduce it.

    Regards
    Brajesh