Tag Archives: Cynthia Armistead

Gravatars

WordPressOne of the things I like about WordPress 2.5 is the native support for Gravatars, globally recognized avatars. The idea is pretty simple: register with your e-mail address at the Gravatar site, upload a picture (I used a photo of myself, but that’s not a requirement). Once your account is set up, anytime you leave a comment on a Gravatar-enabled blog, your e-mail address is sent (using the magic of cryptographic hashing) to the Gravatar server. The server then does what servers do best: it serves; specifically, it serves your globally recognized avatar to the requesting blog, which then (typically) displays said avatar next to your comment.

Here’s a sample comment from my WordPress 2.5 upgrade post:

Blog comment with Gravatar.

That [handsome] fellow in the corner of the comment should look familiar, and if P.G. Holyfield had a Gravatar account his comment wouldn’t display the generic “Oh, no, I don’t have a Gravatar!” image ((Or perhaps the “Oh, no, I provided a fake e-mail address in the blog comment form!” image.)) in the upper left:

A comment from a user who does not have a Gravatar account.

Each Gravatar has a content rating—G, PG, R or X—and WordPress has a “Maximum Rating” option that determines whether Gravatars of a given rating will be displayed. I try to maintain a family-friendly blog for the most part, so I’ve set the Maximum Rating to PG, which won’t prevent people with photos of “Lando and the Ugnauts” as their Gravatar from commenting, but will prevent said photo from displaying next to their comment. Seriously, put that thing away before you get us all killed.

Originally, I was going to use a WordPress plugin to handle Gravatar-wrangling, but when I discovered that one of the features of WP-Gravatars made my blog spew green pea soup (or lose its database connection; I forget which), I started poking around for alternative solutions. As it turns out, I didn’t have far to poke: Sandbox, the WordPress theme that serves as the underlying framework for my custom blog theme, had recently released a new version with Gravatar support. Once I had the latest version of Sandbox installed, it was just a matter of tweaking the CSS to style the new Gravatar-enabled comments the way I liked and voila, one Gravatar-enabled blog.

If you start browsing through old comments on the blog, you’re going to notice something: most of the people who comment here don’t have Gravatars. ((Or perhaps they have naughty Gravatars and I won’t display them.)) That’s fine; I’m okay with adding a feature just for folks like Jason Penney, Sam Chupp and Cynthia Armistead, especially if knowing that their smiling (or illustrated) faces will show up on my site encourages them to comment more.

Should you use a Gravatar? It’s up to you. If you’re worried about your e-mail address being used for nefarious purposes (like flooding your inbox with ads for Lando-enhancement products), consider this: Gravatar is owned by Automattic, the same folks who make the spam-comment-killing Akismet plugin (the very plugin that has backhanded nearly 110,000 spam comments on this blog and kept it from becoming a nightmare to maintain). You think they’re gonna sell your e-mail address to spammers?