Support » Fixing WordPress » [Plugin: Add Local Avatar] Avatar upload and Customize Your Community plugin

  • tawnicoakley

    (@tawnicoakley)


    I have the Customize Your Community plugin installed and when a user uploads an avatar is shows up in the /avatars directory and next to comments and such, but it won’t show up next to the upload form. Can someone help me?

Viewing 4 replies - 1 through 4 (of 4 total)
  • peterwsterling

    (@peterwsterling)

    Have you posted to the wrong area? This is about the Add Local Avatar plugin, not Customize Your Community…

    tawnicoakley

    (@tawnicoakley)

    Nope. I put it here, because I am using the Add Local Avatar upload. But I switched things around, so this is not needed anymore.

    I have added the code

    if ( IS_PROFILE_PAGE ) {
    		$current_user = wp_get_current_user();
    		$uid = $current_user->ID;
    	}

    somewhere near the top of the page, and around line 177 I changed the code to

    // Try to use local avatar.
    	if($uid) {
    		$local = get_usermeta($uid, 'avatar');
    		if(!empty($local)) $src = $local;
    	}

    and now everything is fine. For some reason the code for the current user_id was not working right.

    The above solution is wrong. It causes other troubles. I think this is correct. Around line 630…

    // Display the profile’s avatar.
    if ( !$user_id ) {
    $current_user = wp_get_current_user();
    $user_id = $current_user->ID;
    }
    echo get_avatar( $user_id, 30 );

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Add Local Avatar] Avatar upload and Customize Your Community plugin’ is closed to new replies.