BuddyDev

Search

Replies

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

    Hello Gisela,

    Thank you for the acknowledgement.

    Regards
    Ravi

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

    Hello Lesbos,

    Happy to hear it was helpful. You can use the code inside the ‘bp-custom.php’ file or the active theme ‘functions.php’ file.

    You can refer to the following resource in case you do not know what is ‘bp-custom.php’ file:

    https://buddydev.com/docs/buddypress-guides/what-is-bp-custom-php/

    Please let me know if you need any further assistance.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] Group Members Temporary Friendships #51361
    This reply has been marked as private.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Member Gallery Names #51347

    Hello,

    Sorry for the delayed reply. The gallery page is not created automatically by MediaPress. If not created create one and set a gallery page. You can set directory pages under Settings > BuddyPress > Pages > Directories look for ‘Gallery’ and select the created page as a directory page.

    Look at the following screenshot:

    http://tinyurl.com/ysz86nm8

    Please give it a try and let me know.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Buddyblog limit submissions addon suggestion #51346

    Hello,

    Please try the following code:

    
    add_filter( 'bblpro_user_can_create_post', function ( $can, $user_id, $post_type ) {
    
    	// Not his profile return.
    	if ( ! bp_is_my_profile() ) {
    		return $can;
    	}
    
    	if ( 'post' === $post_type ) {
    		$posts_limit = 5;
    
    		$args = array(
    			'numberposts' => - 1,
    			'post_type'   => $post_type,
    			'fields'      => 'ids',
    			'author'      => $user_id,
    		);
    
    		$posts_count = get_posts( $args );
    
    		if ( ! empty( $posts_count ) && count( $posts_count ) >= $posts_limit ) {
    			$can = false;
    		}
    	}
    
    	return $can;
    }, 15, 3 );
    
    

    It will limit the user based on post type. Please give it a try

    Regards
    Ravi

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

    Hello Tosin,

    Please try the following code:

    
    add_filter( 'bp_core_default_avatar_user', function ( $avatar_url, $params ) {
    
    	if ( function_exists( 'bpmtp_get_option' ) && bpmtp_get_option( 'override_member_avatar', 0 ) ) {
    		$avatar_url = bp_core_avatar_default( 'local', $params );
    	}
    
    	return $avatar_url;
    }, 105, 2 );
    
    

    Regards
    Ravi

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

    Hello Lesbos,

    Thank you for the clarification. Please note that the Profile completion plugin only redirects the user if he/she has not completed the required fields or photo as per settings. Once the user has completed all the required things it will not redirect. But in case you want to redirect the user to a specific page I have shared the code above for that. Please check.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] Lost members #51339

    Hello Gisela,

    Thank you for the acknowledgement. I am glad that you have got the solution.

    Regards
    Ravi

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

    Hello Lesbos,

    It will redirect the user to the change profile photo page. If marked, under settings. Please let me know if it is not what you are asking for. Please tell me more about your requirements so that I can help.

    Regards
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: [Resolved] Remove public message #51331

    Hello Gisela,

    Thank you for the acknowledgement.

    Regards
    Ravi