WordPress.org

Ready to get started?Download WordPress

Forums

Author Avatars List
Ignoring users with no gravatar (7 posts)

  1. keithdevon
    Member
    Posted 2 years ago #

    I'm really stuck.

    Lots of my users don't have gravatars. I would like to display only a list of users that do so that there are no default images shown.

    Is there a way to do this? Thanks in advance for any help!

    http://wordpress.org/extend/plugins/author-avatars/

  2. Paul Bearne
    Member
    Plugin Author

    Posted 2 years ago #

    we don't fetch the gravatars we just let wordpress fetch them. I can't think how to work if the gravatar is the default.

    Sorry

  3. Paul Bearne
    Member
    Plugin Author

    Posted 2 years ago #

    Let me look at this

    We currently just call get_avatar( $id_or_email, $size = '96', $default = '<path_to_url>' );

    But I don't think we are using a default URL so I ready this right we can replace the gravtar default with one of our choice

    if so I am thing that I should add an option to select between gravtar default - transpairent - URL

    Does that sound what you need?

    Paul

  4. keithdevon
    Member
    Posted 2 years ago #

    Thanks for the replies. Paul, I'm not exactly sure what you mean. I basically need users that don't have gravatars to be added to the $hiddenusers array.

    Using the code that Ipstenu linked to, I have a way of doing this, but it has to ping the gravatar site for every user, which takes ages!

    If I figure something out, I'll let you know.

  5. Paul Bearne
    Member
    Plugin Author

    Posted 2 years ago #

    yes pinging for each user will take a longtime

    What I am looking at is providing an opion to override the default image from gravatar with a local image.

    I was planing to provide a tranperent 1x1 as an option and a custom URL for the other.

    so when in the avatar list there would be an hole if no gravatar rather than the grey/white man

    To remove users without Gravatar from the list is harder as it is costly in time to ping for the 404's two throughts

    we don't do it every time and cache the results witch is a pile of server code

    we do it client side in JS by walking the list and do an ajax call for each image and remove the images that return 404's

    Throughts

    Paul

  6. Rob
    Member
    Posted 2 years ago #

    ^^Sounds good to me.

    Need a simple way to ignore users without a Gravatar - I just had to go through an exclude usernames and it took a while.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic