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

    Please put the following code to your bp-custom.php

    
    
    /**
     * Disable recording posting from a specific category to BuddyPress activity 
     *
     * @param bool $enabled allow posting?
     * @param int  $blog_id blog id.
     * @param int  $post_id post id.
     * @param int  $user_id user id.
     *
     * @return bool
     */
    function buddydev_disable_category_post_from_activity_recording( $enabled, $blog_id, $post_id, $user_id ) {
    
    	$category_id = 165;
    	$taxonomy    = 'category';
    
    	if ( has_term( $category_id, $taxonomy, $post_id ) ) {  // I could use has_category() but has_terms can be a better example for future customization.
    		$enabled = false;
    	}
    
    	return $enabled;
    }
    
    add_filter( 'bp_activity_post_pre_publish', 'buddydev_disable_category_post_from_activity_recording', 10, 4 );
    
    

    It will disallow any future recording of posts from that category. It won’t change the activity for already recorded posts though.

    Please test and let me know if it works for you or not?

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25400
    Brajesh Singh on in reply to: Limit private messages for PaidMembership Users #16488

    Hi Velli,
    We don’t offer any solution for the above combination.

    We do have a message rate limiter(It will not work with Nouveau template).
    https://buddydev.com/plugins/bp-private-message-rate-limiter/

    You may want to customize it or hire someone to do it for you.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25400

    Hi Velli,
    Please share the post type(is it post or a custom post type?) and category(term) id.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25400
    Brajesh Singh on in reply to: Hidden Members and Directory Profiles #16486
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25400
    Brajesh Singh on in reply to: How to send a message to all users #16485

    You are welcome.

    Please be aware that using BP better Message will cause a lot of stress on database(too many queries per page in the current version).

  • Keymaster
    (BuddyDev Team)
    Posts: 25400

    Hi Herve,
    I will do a re-test today and will get back to you.

    PS:- In future, If you do not want to wait for the cron to test, you can use the cron control to manually trigger and call the hooked function.

  • Keymaster
    (BuddyDev Team)
    Posts: 25400

    Hi Theo,
    I am sorry I could not reply earlier.

    Please use this

    
     <?php  echo xprofile_get_field_data( "Age", bp_get_member_user_id() );?>
    
    

    For members loop. The problem with it does not seem to be applying the display filter.

    Using xprofile_get_field_data works.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25400

    Please upgrade to 1.0.2

    It was an old habit of me. PHP dropped support for static abstract a few years ago. The error is generated when php runs in strict mode. It does work in non strict mode.

    Have fixed it now.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25400

    Hi Ravi,
    Please do link to the original threads in future.

    Here is it for reference

    https://buddydev.com/support/forums/topic/creating-galleries-only-to-role-admin/

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25400
    Brajesh Singh on in reply to: BFM Issue with search #16475

    Hi Nabeel,
    I am sorry but I don’t see any proper way. Unless BuddyPress sorts out context issue, it will always be problematic to use multiple loops on the same page as one will affect other.

    Most probably adding &search_terms= may fix it but I am not 100%sure.