Skip to:
Content
Pages
Categories
Search
Top
Bottom

Avatar across multisite


  • Coach Afrane
    Participant

    @coach-afrane

    I have been yearning for the feature where it is able to use one avatar for users across all sites in multisite.

    Hope that can be done.

    Please help.

    Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)

  • deadlinkd
    Participant

    @deadlinkd

    hi,

    Been trying to set this up for a few days now, but no success. I’ve setup a multi-site network with sub-directories and buddypress network activated.
    I’ve added define( ‘BP_ENABLE_MULTIBLOG’, true ); to config.php as recommanded for BP multisite install.

    Main site: mydomain.com
    subsite: mydomain.com/subsite

    When users upload their profile picture on main site, unfortunately it doesn’t sync with their profile when they go on the subsite.

    The following codes have worked for some people but not for me. Still trying to find a solution.

    function bpdev_fix_avatar_dir_path( $path ){
    if ( is_multisite() && BP_ENABLE_MULTIBLOG )
    $path = ABSPATH . ‘wp-content/uploads/’;
    return $path;
    }
    add_filter( ‘bp_core_avatar_upload_path’, ‘bpdev_fix_avatar_dir_path’, 1 );
    //fix the upload dir url
    function bpdev_fix_avatar_dir_url( $url ){
    if ( is_multisite() )
    $url = network_home_url(‘/wp-content/uploads’) ;
    return $url;
    }
    add_filter( ‘bp_core_avatar_url’, ‘bpdev_fix_avatar_dir_url’, 1 );


    Peter Hardy-vanDoorn
    Participant

    @petervandoorn

    I know it’s not quite what you’re looking for, but you could always just disable profile uploading in Buddypress’ settings and encourage your users to set up a Gravatar account.


    deadlinkd
    Participant

    @deadlinkd

    Thought about that solution too but i do not want my users to create 2 accounts just to sign up on my site.


    Sander
    Participant

    @eskamediawork

    I have the same issue and wishes. I tried the code you provided above but it did not work.


    deadlinkd
    Participant

    @deadlinkd

    Finally found a solution.
    1) add define( ‘BP_ENABLE_MULTIBLOG’, true ) in wp-content/config.php
    2) network activate buddypress
    3) install rmiweb-multisite-avatar. It is a custom plugin for rmi.one website not available on wordpress repository. Can’t remember from where i grabbed it but i’ve uploaded it on my uptobox account => http://uptobox.com/543ii9u4ozoh
    4) At first it wasn’t working for me on my subsite because the theme (skywarriorthemes.com/arcane/) had an issue with displaying avatar. But i’ve tried it with other 3rd party themes and wordpress default twenty seventeen and it works like a charm. So make sure that your theme is not creating some conflict too like mine did.
    5) If you want to completely disable gravatar: https://wordpress.org/plugins/disable-user-gravatar/
    6) Profit.

    Hope that helps.


    Sander
    Participant

    @eskamediawork

    that worked! Livesaver!


    deadlinkd
    Participant

    @deadlinkd

    Nice. Happy i could help!


    Coach Afrane
    Participant

    @coach-afrane

    Thanks for the responses.

    I have tried your steps @deadlinkd, but unfortunately it didn’t work for me.


    Coach Afrane
    Participant

    @coach-afrane

    I found a simple solution.

    After activating multisite I installed and network activated BuddyPress.
    I also added this line to wp-config.php: define ( ‘BP_ROOT_BLOG’, 2 )

    It works perfect, just the way i wanted it.

    Thanks, you all.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Skip to toolbar