Ok, I did some coding mumbo jumbo, and got the gravatars to work even for people who didn’t use lowercase emails. If you want to geek out on it, this is how I got it to work.
The gravatar function creates an md5 hash of your email address, and tags it onto the end of the URL when it goes to get your icon from the gravatar server. That’s how it knows which icon to return. By using a hash encryption, your email address doesn’t show up in the html for the page. The reason the lowercase matters is because the hash is different based on the case of the letter. It’s all good and fine to tell everyone to only use lowercase email addresses for their comments, but we have several years worth of archives here, and I’m not about to go back and fix the letter case of every comment to make the gravatars work.
Fortunately, php allows us to alter a string return before we hash it. That way, regardless of how the email address was saved in the database, it always gets sent to the encryption process as lowercase. Locate the gravatars.php plugin in your WordPress install, in the plugins folder. On line 17, you will find the following code:
.md5($comment->comment_author_email);
You need to add an additional modifier ’strtolower’ to the function, so that it looks like this (remember the extra parenthesis!):
.md5(strtolower($comment->comment_author_email));
Save, reload your page, and check it out. It should return gravatars for people who left comments, even if they used capitalization in their email address.
Of course, this doesn’t explain why Chad is the only guy left who can’t get his to work … but that’s a whole ‘nother post.










How?… Wha?…
Thank goodness there are people that think like you in the world.
Especially the nice ones. (Not the Jimmy-Fallon-tech-support kind.)
(huff) Mooove.
Chad, you are SO high maintenance…
Hi folks.
Long time listener, first time caller.
…Just testing my face. :)
Something’s wrong with my picture of Mike.
;)
what, the tie? the glasses? the overwhelming sexiness? what is it?
Here, Sharolyn. I’ll switch to the Mountain Man version.
I love that I can just change my icon photos at will! We really do need to get Chad up and running on this.
me too.
just checking to see if mine works
Hey, lookie me!
I’m gravalicious!
well well well, lookie there!
Thanks for that hack. One of these days, I am going to have to install the plugin at theFutonPoncho.