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: BuddyPress Moderation – Report Users/Groups #14526

    Thank you for the suggestions Julia. Please allow me to present it this week.

    Thank you Laurent, It’s coming this week.

    Best Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472

    You are right, that code was for older version of BuddyPress.

    Please remove that and use the following

    
    
    /**
     * Filter and remove admin and logged in users from all BuddyPress auto complete box.
     *
     * @param array $args BP_User_Query args.
     *
     * @return array
     */
    function buddydev_filter_buddypress_auto_complete_ids( $args ) {
    	$user_ids = isset( $args['exclude'] ) ? $args['exclude'] : array();
    
    	if ( $user_ids && ! is_array( $user_ids ) ) {
    		$user_ids = wp_parse_id_list( $user_ids );
    	}
    
    	$excluded = get_users( array( 'role' => 'administrator', 'fields' => 'ID' ) );
    
    	if ( is_user_logged_in() ) {
    		array_push( $excluded, get_current_user_id() );
    	}
    
    	$args['exclude'] = array_merge( $excluded, $user_ids );
    	return $args;
    }
    add_filter( 'bp_members_suggestions_query_args', 'buddydev_filter_buddypress_auto_complete_ids' );
    
    

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472

    Also, Please do not post in MediaPress premium forum for non MediaPress related topics. If you are looking for premium support, It is available under “Premium Support” forum category.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472

    Yes, It will.

  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: How to make someone become featured members? #14500
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25472

    You can already customize the message for user from the Settings->BuddyPress page(where you specify the limit).

    When we move the settings to BuddyDev dashboard, we will add the option for admin to be notified. It will be most probably anytime after BuddyPress 3.0.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: [Resolved] "Links xprofile" & NEW PLUGIN #14498

    Here is the code for that

    
    
    /**
     * Limit the allowed no. of characters for xprofile field.
     *
     * @param bool                   $validated is validated?
     * @param string|array           $values value(s).
     * @param BP_XProfile_Field_Type $field field object.
     *
     * @return bool
     */
    function buddydev_limit_xpfield_length( $validated, $values, $field ) {
    	$allowed_len = 0;
    
    	if ( $field instanceof BP_XProfile_Field_Type_Textarea ) {
    		$allowed_len = 500; // how many chars.
    	} elseif ( $field instanceof BP_XProfile_Field_Type_Textbox ) {
    		$allowed_len = 100; 
    	}
    
    	if ( $allowed_len ) {
    		$validated = strlen( $values ) < $allowed_len;
    	}
    
    	return $validated;
    }
    
    add_filter( 'bp_xprofile_field_type_is_valid', 'buddydev_limit_xpfield_length', 10, 3 );
    
    

    It will not show any specific error, just a generic error. Please make sure to specify the length in description.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: [Resolved] Roles tied to storage limit #14497

    You are welcome. Marking it as resolved.

  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: [Resolved] Activity Updates #14496

    Hi Keith,
    The activity item privacy depends on gallery privacy.

    If you create a public gallery, the activity for it should be visible to everyone otherwise only the owner of the gallery can see it.

    If it is happening for public gallery, is there a chance that you are using any code/plugin to filter sitewide activity?

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25472
    Brajesh Singh on in reply to: [Resolved] Activity Updates #14491

    Hi Keith,
    which version of MediaPress are you using?