Skip to:
Content
Pages
Categories
Search
Top
Bottom

BuddyPress Group Blogs breaks avatar uploads


  • Scott
    Participant

    @scottwermter

    I have the GroupBlogs plugin installed and have edited bp-core-avatars.php per the notes in order to get the avatar to display across blogs.
    http://wordpress.org/extend/plugins/bp-groupblog/other_notes/

    With the edit the avatars do show across blogs but also makes to so I cannot upload avatars anymore. I get to the change avatar screen, click browse, click upload image and it gives a document expired, no longer exists error.

    With the original code I am able to upload avatars but then they are broke across blogs. Anyone have any ideas? Thanks in advance.

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

  • Scott
    Participant

    @scottwermter

    Has anyone been able to get avatars to show across blogs with buddypress 1.7?


    Scott
    Participant

    @scottwermter

    Finally found the fix for this so in case anyone else needs it. Add the below to bp-custom.php

    
    /* 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' );
    		$path = ABSPATH . 'wp-content/uploads/';
        }
        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 2 replies - 1 through 2 (of 2 total)
  • The topic ‘BuddyPress Group Blogs breaks avatar uploads’ is closed to new replies.
Skip to toolbar