Mar 01

WordPress (from version 2.5) includes native support for global avatars. Great! :-) But, what about adding local (private) avatars for your users? Maybe your users don’t want a global avatar, aren’t IT savvy enough to set a gravatar up, simply want a private avatar for your blog, or any other reason too…

This plugin does exactly that. Adds the ability to have local avatars in WordPress. I’m quite pleased with it. :oops:
So, I think it is worth shouting about, and possibly sharing…

The plug-in is available as a download here.

All I ask is that you credit the widget (i.e. include a link to this page or maybe add a link to your WordPress Blogroll).

Because of some demand, please feel free to make a donation here if you find the code valuable!

Thanks!

Instructions:

  • Just put the plug-in into your plug-in directory (if this doesn’t make sense it probably isn’t something you should be trying :-) ) and activate it.
  • Use the form, Users » Avatars, to define any local avatars for your users. Specify the URI for an avatar image, something like http://your.domain/avatars/image.jpg, where avatars is a directory containing your local images.
  • Also you may set a default size (in pixels) for avatars and define a default image (e.g. http://your.domain/avatars/default.jpg) to use when no local or global avatar is available.
  • The code to include in your template files is documented on the Users » Avatars page too. To start with try:
    • Put get_avatars($comment); inside the comments loop of your comments.php template file to show the comment author’s avatar.
    • Put get_avatar($post->post_author); in your single.php template file to show the post author’s avatar. You’ll need to declare global $post; in the file too.
  • A feature that I have discovered is to have the default generate a unqiue Wavatar (other options exist, check the link)! Nice, and no extra coding.
With great regret I have closed comments on this post as I’m being deluged with queries that often boil down to “how to” requests and not issues with the plug-in, which works perfectly! :-) So, if you want support, even advice, use the Feedback link and ask away…

But please note I will have to ask for a donation before I’ll look at “how to” questions…

Version History:

  • 5.2 - Cope with WP 2.6 avatar default.
  • 5.1 - Minor fix to repetition of show avatars WordPress setting.
  • 5.0 - Avatar options should only be managed by Administrators.
  • 4.2 - Fix for credit option un-setting.
  • 4.1 - Author credit.
  • 4.0 - Wavatar, Monster ID and Identicon can be used.
  • 3.3 - Spelling fixes!
  • 3.2 - Added check for administration pages to stop user URL wrapping breaking comment editing.
  • 3.1 - Minor tweaks to usage text and options.
  • 3.0 - Added ability to place avatars in written post content (plus other tweaks).
  • 2.1 - Added example formatting information.
  • 2.0 - Added pagination of the commenters list too.
  • 1.0 - Added pagination of users list.
  • 0.1 - Initial version.
(Interesting)(Good)(Great)(Fantastic)(Awesome)
Loading ... Loading ...

22 Responses to “Avatars Plugin”