Gravatar Hovercards : Spice Up your Comments
Gravatar, an Automattic company (the same company who owns and develops WordPress) introduced Gravatar Hovercard early this month. It’s same as old gravatar display, but with some added features.
What is Gravatar Hovercard?
It shows information about the commenter directly from his/her Gravatar account. Like, the person’s name, photos, about me bio, contact information, personal links and profile link to web services like Twitter, Facebook, Youtube, LinkedIn, Blogger etc. A lightbox popup comes up with the information on hovering the mouse over the commenter’s gravatar image.
Gravatar Hovercards
The feature is already implemented in wordpress.com blogs and they are working on an official plugin for self-hosted wordpress blog installations. Otto wrote a piece of code which immediately enables gravatar hovercards in your self-hosted wordpress blogs. The code goes right into theme’s function file (function.php). You can edit the file within your admin panel and add the code before the closing ?> tag. It uses jquery, so if you don’t have any existing jquery call in your theme, it won’t work.
/*
Plugin Name: Gravatar Hovercards
*/
function gravatar_hovercards() {
wp_enqueue_script( 'gprofiles', 'http://s.gravatar.com/js/gprofiles.js', array( 'jquery' ), 'e', true );
}
add_action('wp_enqueue_scripts','gravatar_hovercards');
The Plugin
For those who are not very familiar with wordpress coding and functions, I wrote a simple and small plugin for this with the help of the codes from Otto. You can download it right here or click on the download link below. It works only when jquery is loaded. Let me know if this plugin isn’t working for you and I’ll happily fix that for you.
This plugin don’t add any admin menu upon activation. To check if it’s working, just hover your mouse on any comment on your blog having a gravatar image.











Will be there a fix for this bug? I miss the hovercards.
With the plugin “Jetpack by WordPress.com” works well gravatar profiles ; )
Hovercards worked perfectly for a long time. And then they just didn’t. I only noticed yesterday, no idea why they stopped. Might it be because I upgraded wordpress to 3.1?
My header calls to jquery.js?ver=1.4.4
That’s probably why everybody experiencing problems with this plugin.
No, unfortunately is this not the solution. I already disabled all plugins except Gravatar Hovercards. Nothing happened, so I think it’s my theme. When I activate a standard WordPress theme it works perfectly. So I think the only solution is not to use the plugin until I’ll use another theme.
Thanks anyway!
I have the same problem as your. In my case with the theme (chocotheme).
I will be attentive to the comments to see if anyone knows a solution.
@Abhik thanks for your help.
@Charles and @Tammy
I guess the javascript of one of your other plugins is conflicting with this plugin.
In that case, I can do nothing other than recommending you to find and disable that plugin.
Same problem here, there’s a jquery call in header.php but the plugin is not working…
Try adding the code directly on your theme’s functions file.
I am working on it, I have tested this with 15 themes and it worked with all of them.
please help if you can. i installed the plugin per your instructions and am calling jquery-1.4.2.min.js in the head of my document and its not working. im pretty much a newbie with this. thanks for your help!
What’s your blog URL?
http://www.runrocks.com
http://www.runrocks.com/blog
Replied to your email..
With some themes work perfect. With other does nothing. : /
Your theme should have a call for jQuery anywhere in head or footer.
I installed the plugin from the directory, and it’s not working. I’m far from a computer genius so it’s possible A) it won’t work for my self-hosted blog, or B) I simply screwed it up.
Any help/suggestions you could offer would be great.
Thanks
Hi Otto,
I just installed your Gravatar Hovercards version 1.1 plugin and it’s working GREAT! Thank you so very much for making this cool WordPress.com feature so easy to implement on my WordPress.org powered site!!!
Sincerely,
Randy W. Sandberg
Actually, that code marks jquery as a dependency, so it will load it for you automatically when you use it.