BuddyDev

Search

Sync mulsitsite Buddypress to show same content across network.

Tagged: 

  • Participant
    Level: Initiated
    Posts: 14
    Mayzfieldtv on #25761

    How can I make it so buddypress is synced across all active subsites in my multisite network as if it is one single buddypress profile? For example, the avatars and covers are only showing up on the subsite that the avatars and covers were uploaded on, but not throughout the network. I would like to make it so when someone uploads on one subsite, it affects all subsites in the network. Maybe a shared media folder?

    I tried to put “define ( ‘BP_ROOT_BLOG’, 1 );” into bp-custom.php and it is giving me a 404 error on the other subsites. Is there a way to do this?

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #25787

    Hi,
    you may want to take a look at BP_ENABLE_MULTIBLOG

    https://codex.buddypress.org/getting-started/customizing/bp_enable_multiblog/

    This should serve your purpose.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 14
    Mayzfieldtv on #41806

    That works thanks. And I also made the avatars sync across the network. But what about the covers?

    What are the equivalents of “bp_core_avatar_upload_path” and “bp_core_avatar_url”, for profile avatars?

    I’m using this:

    /***sync avatar across multisite network***/
    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 );
  • Participant
    Level: Initiated
    Posts: 14
    Mayzfieldtv on #41807

    * for profile covers?

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #41808

    Hi,
    I am sorry, I haven’t seen this issue with BuddyPress recently and I am unable to provide any code for cover due to this.

    It seems it does happen on some of the server configs but not on all sites.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved