How do we force Buddypress profiles to use multisite avatars?

Hi,
Do you know of a good plugin or method to force Buddypress and the user's local multisite avatar to be one in the same? We do not use gravatars either. I've tried a few things people have posted and so far have limited success and various conflicts. I am trying to either force Buddypress profiles to use the multisite avatar, or for the rest of the site and multisite to use the one people upload under their Buddypress profile. It doesn't matter where they manage it but hopefully I want people to be able to just go to one place to change their profile avatar, and have that avatar show up in the user profile sections as well as buddypress profiles and areas that display their buddypress avatars.
I had it set where the Buddypress avatar was showing up as the main blog avatar for every site but the main site BuddyPress is on, ironically, but I seem to be getting further away from a solution rather than closer at this point. I'll keep hammering but if you have a good preferred plugin or method to try I'll be happy to switch tracks as I've been on this a while and come back to square trying different things so far.

  • Aurelio

    He Predrag,
    Thank you for your response! Doing well and hope you are too.
    I finally got to a point of disabling gravatar but the buddypress profile avatar and one people uploaded was not the same one as the one that shows up for the wordpress profile (the one that shows up on your upper right site admin bar menu).
    This is what I used to disable gravatar, don't remember where I pulled it from:

    /**
     * Disable Gravatar throughout BP
     */
    add_filter( 'bp_core_fetch_avatar_no_grav', '__return_true' );
    add_filter('bp_core_fetch_avatar', 'bp_remove_gravatar', 1, 9 );
    
    /*** Make initial avatar uploads a more reasonable resolution */
    define ( 'BP_AVATAR_THUMB_WIDTH', 75 );
    define ( 'BP_AVATAR_THUMB_HEIGHT', 75 );
    define ( 'BP_AVATAR_FULL_WIDTH', 195 );
    define ( 'BP_AVATAR_FULL_HEIGHT', 195);
    
    define('BP_AVATAR_ORIGINAL_MAX_FILESIZE', 4194304);
    remove_filter( 'get_avatar', 'bp_core_fetch_avatar_filter', 10, 5 );

    For plugins I've tried WPMU's own multisite avatar plugin, but it was disjointed from Buddypress and support on other tickets showed that it's not designed to work with Buddypress, as Buddypress has it's own avatar system but that's the problem. I want the multisite and buddypress avatars to be one in the same. The user has no idea the buddypress section is programmed to be "it's own" site with it's own avatar, as this notion does not tie very well into the multisite design as a whole. It just appears like some sections use a completely different avatar and rather than explain it and add that layer of friction I'm hoping to just have one section for avatar management that applies to the whole site that buddypress is on at least, buddypress and wordpress profile sections. If it could apply to the multisite or just pull the multisite avatar that would be gravy.

    I've kind of lost track of the plugins and code snippets I've tried, trying to make one single local avatar apply to the multisite as well as buddypress sections. Getting rid of gravatar is the easy part finally :slight_smile:

    I'm getting stuck at trying to make the multisite and buddypress avatars one in the same, managed in one spot for the user.
    At this point I'm a blank slate, and will try anything you suggest, even if I've tried it before in case I missed something. If I know what's supposed to work for making buddypress and multisite avatars use the same avatar and management section, I can focus there, but many methods have ended with the resolution of buddypress supposing to be it's own avatar system and the plugins aren't designed for the buddypress and multisite avatar to be on in the same, managed in the same section, for some reason. I opened up access to the bitpath site I am working on in case you wanted to take a look at the strangeness I've come up with so far... I'll be able to work on it more tonight.
    Thank you!

  • Aurelio

    Ha! Thank you so much!!! This worked perfect.
    I had so many different things going on I had to take out some other gunk I had built up trying, which were conflicting with some of the new code on the link you referenced, and now it all works in synch. When I upload a new buddypress profile avatar it shows through the whole site and multi-site now.
    Thank you thank you. This was my final code that worked I think.

    /**
     * Disable Gravatar throughout BP
     */
    add_filter( 'bp_core_fetch_avatar_no_grav', '__return_true' );
    add_filter(‘bp_core_fetch_avatar’, ‘bp_remove_gravatar’, 1, 9 );
    
    /*** Make initial avatar uploads a more reasonable resolution */
    define ( 'BP_AVATAR_THUMB_WIDTH', 75 );
    define ( 'BP_AVATAR_THUMB_HEIGHT', 75 );
    define ( 'BP_AVATAR_FULL_WIDTH', 195 );
    define ( 'BP_AVATAR_FULL_HEIGHT', 195);
    define('BP_AVATAR_ORIGINAL_MAX_FILESIZE', 4194304);
    
    /* Set default image for BP users without avatar: */
    define ( 'BP_AVATAR_DEFAULT', get_bloginfo('template_url') . '/_inc/images/default-full.png' );
    define ( 'BP_AVATAR_DEAFULT_THUMB', get_bloginfo('template_url') . '/_inc/images/default-thumb.png' );

    I have a bunch of other stuff in a custom plugin I clunked together but I think this is the only relevant code. I also have the WPMU Dev multisite avatar plugin active. Don't know if it's necessary but it's all working beautifully so I'm moving on. I'll test that gravitar's still disabled for privacy, carefully, but right now I'm just happy it's functional now :slight_smile: !!!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.