Gravatars for Anonymous Comments

With Community Server, when a registered user makes a blog comment it is very common to show their avatar next to their comment. If the person making the comment is not a registered user, then typically the "anonymous avatar" would be shown. I had gone and implemented an Identicon control for anonymous comments and now I am going another step and implementing a Gravatar.

The PostGravatar control (in the CarKnee Bundle) can be used within a WeblogFeedbackList to show the Gravatar of the person who commented.

The last three blogs posts I made have all the pieces of the puzzle, now lets put them together!

  1. We need to store the persons email address if they are an anonymos user.
    See here:
  2. We need to show different items based on some criteria
    See here:
    • If registered --> Show Avatar
    • If not registered and specified email address --> Use PostGravatar control
    • If not registered and didn't specify an email --> Use Identicon control

I attached the code for a /themes/blogs/default/post.aspx page. If you are using a different theme you will need to modify it as needed.
Attachment: post.aspx
Published Friday, May 11, 2007 4:10 PM

Comments

# Community Server Byte for May 15, 2007

Tuesday, May 15, 2007 10:21 AM by External Feeds

blog bits The CarKnee has been on a tear this week. He released three CS2007 controls, a control to add

# The CarKnee has been on a tear this week

Tuesday, May 15, 2007 10:49 AM by External Feeds

The CarKnee has been on a tear this week. He released three CS2007 controls, a control to add and save

# ExtendedAttribute Condition Control

Tuesday, May 15, 2007 7:51 PM by Sean Kearney's (CarKnee) Blog

I was working a new control for the CarKnee Bundle and was in need of a condition control within Community

# Identicons and Gravatars in Community Server thanks to CarKnee

Monday, June 18, 2007 8:40 PM by andrew @ grr, argh!

I've just gone through and added Identicons and Gravatars to my blog thanks to Sean Kearney's CarKnee

Powered by Community Server (Non-Commercial Edition), by Telligent Systems