Avatar Url retrieval problem

Hi!I’m having a problem with newly installed buddypress avatars the “crop” images are adding in “/home/pdks/public_html/” and I have no idea where it’s getting that from.

example http://www.pandragon.com/home/pdks/public_html/avatars/2/avatar14885_1.jpg should be http://www.pandragon.com/avatars/2/avatar14885_1.jpg without the “/home/pdks/public_html/”.

Does anyone know where I fix this? I’ve looked everywhere

  • pandragon
    • WPMU DEV Initiate

    So it’s making folders called “avatars” and “group-avatars” in my root directory adn I read on bpress it should be saving to the “wp-content/blogs.dir” I am no webtech at all so i have hardly touched much of the core of buddypress so it’s pretty much out of the box integration with my theme. :disappointed: I wanna open up registrations and move onto finishing the other areas on my site but this avatar issue is keeping me up day and night trying to find a solution to the problem.

  • pandragon
    • WPMU DEV Initiate

    I think the worst part is buddypress “patch” notes make NO sense at all to me I don’t even know how to install them they just look like edit logs to me! I’m hoping in a few months they’ll make a friendlier documentation haha :slight_smile:

  • pandragon
    • WPMU DEV Initiate

    Hey Andrew I found a guy on Odesk who charged me $40 and was able to fix it :slight_smile:

    I posted on buddyforums but I think they are too swamped with problems to look.

    Anyway this is what Sergey did for me to get it to work!

    “1. I update “wp-contentpluginsbuddypressbp-corebp-core-cssjs.php”, lines araound #93. Mainly I add “jQuery.noConflict();” to fix crop.

    2. I update “wp-contentpluginsbuddypressbp-corebp-core-avatars.php” to fix paths. Two functions at the bottom updated:

    “bp_core_avatar_upload_path” and “bp_core_avatar_url”.

    3. “wp-contentthemespanmemberssingleprofilechange-avatar.php” updated. Lines #34 and #37. I remove URL before “bp_avatar_to_crop()” function. Because “bp_avatar_to_crop()” return full avatar’s URL.”

    Now it all works!!!!! :smiley:

    His Odesk is http://www.odesk.com/users/Experienced-Dev-MCDBA-MCAD-NET-1st-the-SQL-Server-2005-test_~~a7b1d1b35d836bae?sid=28001 if anyone else needs a buddypress handyman lol

  • pandragon
    • WPMU DEV Initiate

    Hey andrew!

    This is the edit in bp-core-avatar.php that fixed my problem :3

    function bp_core_avatar_upload_path() {

    if ( bp_core_is_multisite() ) {

    if (strlen(get_blog_option( BP_ROOT_BLOG, ‘upload_path’ )) < 3) {

    update_blog_option( BP_ROOT_BLOG, ‘upload_path’, ‘wp-content/uploads’ );

    }

    $path = ABSPATH . get_blog_option( BP_ROOT_BLOG, ‘upload_path’ );

    }

    else {

    if ( !$path = get_option( ‘upload_path’ ) )

    $path = WP_CONTENT_DIR . ‘/uploads’;

    else

    $path = ABSPATH . $path;

    }

    return apply_filters( ‘bp_core_avatar_upload_path’, $path );

    }

    function bp_core_avatar_url() {

    if ( !bp_core_is_multisite() )

    return WP_CONTENT_URL;

    return apply_filters( ‘bp_core_avatar_url’, get_blog_option( BP_ROOT_BLOG, ‘siteurl’ ) . ‘/wp-content’ );

    //print get_blog_option( BP_ROOT_BLOG, ‘siteurl’ ); exit;

    }