Sabtu, 19 April 2014
Breaking News
Home » Articles » News » Show Gravatar HoverCard on Your Site

Show Gravatar HoverCard on Your Site

Gravatar Hovercard is a “virtual page or virtual card” (<– my opinion) that can display information about a person: name, image, and their contact info on other services like Twitter, Facebook, Blogger, Yahoo, Foursquare, WordPress or LinkedIn.

This feature has been used by all the existing blogs on wordpress.com and partially self-hosting wordpress blog, including BuddyPress.

How to use and show Hovercard, you must move your mouse in over each gravatar image on each WordPress.com blog, then Hovercard will appear. The information shown is taken directly from Gravatar site or WordPress.com .

I carried out experiments on “Olimpiade Matematika ITS“, It’s not wordpress.com Blog, and the results beyond expectations, works well.

To show gravatar image:

echo "<img class=\"avatar\" src=\"http://www.gravatar.com/avatar/";
echo md5(strtolower( trim($data[3])));
echo "?size=40\" alt=\"\">";

Then I insert this code before </body>:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://s.gravatar.com/js/gprofiles.js?ver=e"></script>

Now you can see the results in the guest book of Olimpiade Matematika ITS.

Gravatar hoverCard

About Anas

Hanya seorang blogger saja!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>