• I am using “User Avatar” plugin to allow members to upload their own avatar. For those who use their own avatar, at the members list window, it’s showing the correct avatar. But at the chat window, it’s just show a generic avatar. Please help.

    I am using the theme “Lacking faces 2009 (with a bar at bottom) “.

    https://www.ads-software.com/extend/plugins/simple-chat/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter wcten

    (@wcten)

    Thanks for the update, but still not working.

    I am not good at coding, but here’s what I found, hope it helps.

    At ajax.php, you are using get_avatar( $u->user_email, 24), which is good. I can see my uploaded avatar at the users window.

    But at functions.php, you are using get_gravatar_url( $email, $size=42 ). This will only capture my avatar from gravatar. If I uploaded my own avatar at my wordpress site, it will not show properly. As a result, the chat window does not show the same avatar as the users window.

    Thread Starter wcten

    (@wcten)

    if it possible to check avatar first, if doesn’t exist, then get gravatar…

    global $authordata, $curauth;
    $authordata=get_userdata(get_query_var( 'author' ));
    if(function_exists('get_avatar')) {.....
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show wrong avatar at chat window’ is closed to new replies.