Xindi CMS

Xindi CMS is a small, lightweight and flexible content management system. It's great for web developers looking for a simple way to make site content editable by their clients.

Open source, free and flexible, Xindi is available in CFML and PHP versions.

Find out more »

About Me

I am a web developer living and working in Exeter, Devon (United Kingdom). I use my blog to document and share the things I learn and I hope fellow developers will find it to be a useful resource.

Read more »

Today I integrated Gravatar with my blog so, for commenters who have a Gravatar account, you'll now see an avatar next to their blog post comments.

As long as you have a commenter's email address it's very easy to display their avatar.

In Coldfusion simply convert the commenter's email address to lower case, hash it, convert it to lower case again and add it to an IMG tag as follows.

When uploading an avatar to the Gravatar web site you are required to apply a rating to it.

Gravatar Ratings

  • G rated: suitable for display on all websites with any audience type.
  • PG rated: may contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence.
  • R rated: may contain such things as harsh profanity, intense violence, nudity, or hard drug use.
  • X rated: may contain hardcore sexual imagery or extremely disturbing violence.

To ensure X rated avatars do not appear on your site simple append ?r=R to the URL like so:

Now only avatars that are R rated and below will be displayed.

Finally, if the commenter does not have a Gravatar account a placeholder image is displayed. You can override the default image and display one of your own by appending an image URL like so:


Tags


Share


Comments

Monday, December 5, 2011 Raymond Camden

Raymond Camden I've often wondered - are there actually X rated Gravatar images?


Monday, December 5, 2011 Simon Bingham

Simon Bingham The mind boggles! :)


Monday, December 12, 2011 Lola J. Lee Beno

Lola J. Lee Beno Yeah . . . what Ray asked.


Add Comment

Your email address will not be displayed on this blog.

The URL of your blog or web site.

5 + 1 =
Host Media ColdFusion Hosting
"First, solve the problem. Then, write the code."

John Johnson