Chat avatars broken

Hi there

Im using the chat on a regular wordpress installation, with "User Photo" plugin (http://wordpress.org/extend/plugins/user-photo/)
While the plugin does have an option when making calls to get_avatar() for the user's photo to be used instead if it is available, it doesnt show in chat. It does, however, replace the calls made on the theme (using P2 if it makes any difference).

Ive tried editing the chat (around line 2879) on: get_avatar($row->avatar, 50, null, $row->name);
But i cant seem to make it work, anyone got an idea how to change the get_avatar request from $row->avatar? making a call to the users email might help (thats how p2 calls the avatar anyway)?

thank you for your patience in advance :slight_smile:

ps: ive checked the avatar plugin from wpmudev but its only for multisite and bbpress, and unfortunately doesnt have a front end uploading solution

  • PC
    • WPMU DEV Initiate

    Hello Bronze,

    Greetings and thanks for posting on the forums.

    Chat does not have its own avatar system but uses avatars from the users profiles if there is one.

    With the plugin you are using, are you successfully able to set avatars on user profiles and checked if they show up fine on other areas like comments etc ?

    Please advise.

    Cheers, PC

  • bronze
    • WPMU DEV Initiate

    Hi PC
    the users can set their own avatars through the front-end, and the plugin's hook does in fact replace the call of avatars on others parts of the site (for example, the comment sections).
    Only on chat it doesnt appear.

    I started believing it might be because of get_avatar($row->avatar
    Changed to get_avatar($row->name to no success, although it did still show the "default" avatar.
    WP's function reference says get_avatar( $id_or_email so im trying to pass the id or email through now.
    If anyone figures this out, id very much appreciate it.

  • PC
    • WPMU DEV Initiate

    Hello @bronze

    Thanks for sharing the solution you used. I will keep it bookmarked for my reference so that we can take it into consideration for the future improvements.

    Sending a few points your way !

    Cheers
    PC
    Sales &Support

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.