okt 18 2007

Gravatars on WordPress

Tech news of the day is that Automattic (the company behind WordPress, the blogging platform used by all wildly popular bloggers such as yours truly) has acquired Gravatar (a webservice that make it possible for a person to have one avatar across the entire web).

A gravatar, or “globally recognized avatar”, is actually simply an 80×80 pixel image of your choice that follows you from weblog to weblog appearing beside your name when you comment on gravatar enabled sites. WordPress had it’s own competing avatar-system since August last year, but now will be able to compete better against rival systems such as MyBlogLog. They will now be integrating the two systems in a next release of WordPress.

Integrating gravatars on a wordpress-blog right now is not terribly difficult, as is clearly explained in the WordPress-codex. If you know your way around in the admin-area it’s just a matter of five minutes. Upload the plugin, activate it, and change one line in the comment-part of your WordPress-theme. The plugin takes care of “hashing” the email-adresses of your commenters, changing it into a link to an image on the gravatar.com website.

My php-code for a comment now became:
<li style="background: url(<?php gravatar("","","http://houbi.com/gravatar.gif") ?>) no-repeat;
padding : 0 0 0 100px; height: 100px;">
<?php comment_text() ?>

This sets up the gravatars as background images of a list and moves the comment text to the right. If the gravatar.com returns no image for a commenter a plain grey image is used.

Picking a gravatar for yourself is not very difficult either:
1. Go to http://site.gravatar.com/signup and put in your email address.
2. Go to your mail program, find the mail support@gravatar.com has just sent you, and click on the link inside the message.
3. Choose a password (you will need this if later you’d decide to select a different picture).
4. Create Your Default Gravatar. You do this by either uploading a file from your local computer or network, or by finding a nice image from the web. Don’t worry too much about the size of the image, you can “crop” (cut away superfluous parts) or scale the image in the next step.
5. Crop or Size Your Image. With the slider you can resize, with the square you can pick a different part of the image.
6. Select how “adult” your image is (a way for prudish webmasters to filter out knobheads from other kind of knobheads, wankers from other kind of wankers etc…).
7. Apply the image you’ve now created to your Email Address

Et voilą, you’ve now become the owner of one shiny gravatar.

All that’s left to do after that in order to see your gravatar in all it’s glory here on this blog, is making a comment here.

3 reacties tot nu toe. Reageer zelf...

This to test if my own gravatar would show up here…

Comment by Houbi — 18 oktober 2007 #

Yes, I already read about this gravatar-thingie. So I will look closely to the comments on your blog, to discover how many (?) people in Belgium already use a gravatar.
I was considering enabling gravatars on my blog, but I fear that only a very small minority of my audience has one, or would like to create one. And a comment section with nothing but gray faces is a bit boring, isn’t it?
But it is true, that setting up a gravatar is made very, very easy… ‘een kind kan de was doen’ (don’t know which expression to use in English ;-)!°

Comment by AnneTanne — 19 oktober 2007 #

I’ve read your instructions Houbi. Now I’m posting to see if my Gravatar works.

Comment by Phillip — 24 februari 2008 #

Jouw reactie

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

En nu?

En, voor u het vergeet, steek zeker mijn mijn RSS in uw favoriete feedreader. Je kan je ook abonneren op updates via e-mail, facebook, twitter...