Register   Login
     
  Categories  
  Archives  
  Authors  
  Blog  
03

In the most recent release of news articles, support for gravatars was enabled.

Gravatars allow a picture representation of the comment author to appear next to each comment (see live example). These pictures are centrally stored at www.gravatar.com and News Articles will access each image through the email address of the person posting the comment.

If you have a gravatar associated with your email address (e.g. you have signed up at www.gravatar.com and uploaded a picture), your unique picture will appear (see my batman avatar that appears below); otherwise there are options to automatically generate one (notice the monsters that appear on this link?).

To use a gravatar within your comment template (Comment.Item.Html), use something like:-

The [GRAVATARURL] token is the unique url that will generate the encrypted picture link based on the email address.

If you want to automatically generate pictures for people without a gravatar, you can append the following:-

If you want to restrict the size, you can use:-

In fact, there are many additional parameters that you can put in the url to further customize the gravatar (further documentation here).

I’ve also deliberately steered away from making too many admin options for this item and instead allowed the template author to control what is used.

I hope you find it useful!

Comments

host
# host
Wednesday, September 03, 2008 9:01 AM
This is a sample comment to show my gravatar!
ivtch
# ivtch
Wednesday, September 03, 2008 10:06 AM
lets see what it shows since I don't have one

btw scott, what is the purpose of the # link? what token do you use for that?
rwgraeber
# rwgraeber
Tuesday, September 09, 2008 2:29 PM
Is there a way to disable support for gravatars?
smcculloch
# smcculloch
Tuesday, September 09, 2008 3:12 PM
Yep, just remove the html from your comment template.
Dan
# Dan
Saturday, September 13, 2008 8:06 AM
Nice work Scott- you continue to do the finest work in all the DNN land.
anthonyar
# anthonyar
Saturday, September 13, 2008 9:36 AM
test
cosimo
# cosimo
Monday, September 15, 2008 1:07 PM
test
Mikee
Tuesday, September 16, 2008 7:52 PM
This is cool. Testing
David Snow
Friday, September 19, 2008 9:00 AM
I have signed up, uploaded a photo and associated with my two email addresses. I commented on one of yopur posted while being logged in (where you don't as for email address) and I didn't get my gravatar, only a default one. I am now trying this anonymously.

/DaveS
smcculloch
# smcculloch
Saturday, September 20, 2008 8:04 AM
Did you set it as your default photo and is it the same email address as the email in your profile here?
bennyj
# bennyj
Tuesday, September 23, 2008 7:23 PM
testing! I like this...Nice work Scott!
helmsb
# helmsb
Friday, October 03, 2008 2:10 PM
This is a test
Blake Helms
Friday, October 03, 2008 2:11 PM
Lets try this without being logged in now
Blake Helms
Friday, October 03, 2008 2:14 PM
Lets try with another email
GHunter
# GHunter
Tuesday, November 11, 2008 8:05 PM
Cool
Declic Video
# Declic Video
Wednesday, December 31, 2008 7:58 AM
Hello,

Do you know if it works with anonymousemail and anonymous author ???
I mean with people who are not registered on our website ??

I tried, but it does not work on my side, maybe I am doing something wrong ??

Thanks,
DV FX
Declic Video FX
Wednesday, December 31, 2008 8:01 AM
Oups... Sorry, it works !!!! I did not wait long enough (or cache problem !!)

VERY WELL DONE Scott, very nice, I appreciate.
DV FX
cat
# cat
Thursday, March 26, 2009 2:05 PM
be entertained
TheDad
# TheDad
Thursday, July 09, 2009 9:48 AM
This is a test to see if my gravatar shows up.
woodn
# woodn
Friday, January 29, 2010 9:29 AM
Gravatar test
IntelligentNetware
# IntelligentNetware
Monday, February 01, 2010 11:48 PM
This was really helpful, thank you. I've added:
[AUTHOR] to each of the news articles on our site.

And since we've added our pics to www.gravatar.com, the monster pic for us (as registered) is our personal pic.

Very nice.

Thanks
mao
# mao
Sunday, February 28, 2010 2:31 PM
testing

Post Comment

Name (required)

Email (required)

Website

Enter the code shown above: