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: 25332

    Hi Plamen,
    Thank you.

    Please use the code from my last reply. I am addin git below too

    
    
    function buddydev_disable_activity_blog_comment_recording_conditionally( $enabled, $blog_id, $post_id, $user_id, $comment_id ) {
    
    	// use $post_id to decide.
    	// set $enabled= false; to stop recording comment.
    	if ( ! in_category( 'community', $post_id ) ) {
    		$enabled = false;
    	}
    
    	return $enabled;
    }
    
    add_filter( 'bp_activity_post_pre_comment', 'buddydev_disable_activity_blog_comment_recording_conditionally', 20, 5 );
    
    

    It wills top recording activity for comments which are not on posts from ‘community’ category.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25332

    Hi Kristian,
    Please see
    https://buddydev.com/support/forums/topic/the-css-for-how-the-buddyblock-page-is-shown-on-buddypress/#post-22372

    This plugin does not come with any css. For normal theme it works as it inherits the standard styles. In case of youzer, they add very specific css.

    They can add the css for it too if they want. We are unable to provide any css for it.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25332

    Hi Kristian,
    This plugin does not contain any css. It inherits from your current theme.

    We are unable to assist you with Youzer as the issue lies with Youzer.

    Please see my reply here.

    https://buddydev.com/support/forums/topic/the-css-for-how-the-buddyblock-page-is-shown-on-buddypress/#post-22372

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25332

    Hi Kristian,
    I am sorry, we do not have any plan to support Youzer.

    Most of our plugins(except a few major ones), do not include css and they simply inherit from your current theme. Youzer does things in a non standard way making the compatibility an issue.

    You will need to get the support from youzer developers as they are the one who override with specific styles.

    The last time I checked it 3 weeks ago on a client’s site, their css was too much specific.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25332

    Hi Plamen,
    Thank you for the kind words.

    The above code is a sample and you can modify it. For example, I am making a change to allow recording comment from ‘community’ category.

    
    
    function buddydev_disable_activity_blog_comment_recording_conditionally( $enabled, $blog_id, $post_id, $user_id, $comment_id ) {
    
    	// use $post_id to decide.
    	// set $enabled= false; to stop recording comment.
    	if ( ! in_category( 'community', $post_id ) ) {
    		$enabled = false;
    	}
    
    	return $enabled;
    }
    
    add_filter( 'bp_activity_post_pre_comment', 'buddydev_disable_activity_blog_comment_recording_conditionally', 20, 5 );
    
    

    If you can tell me which categories to allow or disallow, I can post the updated code too.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25332
    Brajesh Singh on in reply to: [Resolved] Slow Queries #22365

    Thank you. Will update here.

  • Keymaster
    (BuddyDev Team)
    Posts: 25332

    Hi Daniel,
    Thank you for the update. I am glad you were able to get it work.

    Best regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25332

    Hi Pamen,
    I am sorry for the delayed reply.

    After reding through the codes, I am assuming our goal here to to stop recording comments in certain cases?
    If that is the case, BuddyPress provides us with another filter

    
    bp_activity_{$post_type}_pre_comment
    

    where for normal posts the $post_type is ‘post’.
    So we can attach to ‘bp_activity_post_pre_comment’.

    Here is an example code

    
    function buddydev_disable_activity_blog_comment_recording_conditionally( $enabled, $blog_id, $post_id, $user_id, $comment_id ) {
    
    	// use $post_id to decide.
    	// set $enabled= false; to stop recording comment.
    
    	return $enabled;
    }
    
    add_filter( 'bp_activity_post_pre_comment', 'buddydev_disable_activity_blog_comment_recording_conditionally', 20, 5 );
    

    You may adapt it from there.

    Hope it helps.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25332
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25332

    Hi,
    The answer to all the questions is “yes”.

    Since you already posted a relevant plugin for login sharing, I will suggest using it and see if that fits you need or not?

    The other way around is using a backup plugin and then keep syncing from 1 to another(db+files both) as you need it both way.

    Regards
    Brajesh