Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)

  • Michael Stein
    Participant

    @mstein340

    This works for me, althouh it took me a bit before I realized BP_ROOT_BLOG was not defined.
    In my case, when I checked, it was ID 1, so I defined it accordingly.

    ?>
    <?php
    //echo get_current_blog_id();

    //echo ABSPATH . “<BR>”;
    //echo get_site_url() . “<BR>”;
    if ( !defined( ‘BP_ROOT_BLOG’ ))
    define( ‘BP_ROOT_BLOG’, 1);

    // echo “There is no root blog defined “;
    // echo get_blog_option( 3, ‘siteurl’ ) . “wtf”;
    /* This fixes the Multisite avatar problem */
    function nfm_bp_avtar_upload_path_correct($path){
    if ( bp_core_is_multisite() ){
    $path = ABSPATH . get_blog_option( BP_ROOT_BLOG, ‘upload_path’ );
    }
    return $path;
    }
    add_filter(‘bp_core_avatar_upload_path’, ‘nfm_bp_avtar_upload_path_correct’, 1);
    function nfm_bp_avatar_upload_url_correct($url){
    if ( bp_core_is_multisite() ){
    $url = get_blog_option( BP_ROOT_BLOG, ‘siteurl’ ) . “/wp-content/uploads”;

    }

    return $url;
    }
    add_filter(‘bp_core_avatar_url’, ‘nfm_bp_avatar_upload_url_correct’, 1);
    ?>

Viewing 1 replies (of 1 total)
Skip to toolbar