Using Gravatars
Posted by admin - Feb 29, 2012 Site Design and Layout 0 0 Views : 189 Receive Updates For This Category
Article Tools
- Print this page
- Add Comment
- Send to Friend
- Last Updated on :
Feb 29, 2012
What is a Gravatar?
Gravatars are Globally Recognized Avatars. An avatar or gravatar is an icon, or representation, of a user in a shared virtual reality, such as a forum, chat, website, or any other form of online community in which the user(s) wish to have something to distinguish themselves from other users. Created by Tom Werner, gravatars make it possible for a person to have one avatar across the entire web. Avatars are usually an 80px by 80px image that the user will create themselves.
Gravatars in blog post comments
A Gravatar is essentially the same thing, but they are all hosted on a single server and are called up by encrypting the users email address via the MD5 algorithm. So instead of having one avatar on one forum you visit, and another at a blog you visit, you could have the same avatar at both.
Gravatars can easily be used within WordPress with the Gravatar WordPress Plugin or added manually in the index.php, comments.php and comments-popup.php template files.
How a Gravatar is Constructed
A Gravatar is a dynamic image resource that is requested from a server. The request URL is presented here, broken into its segments. The URL always begins with:
http://www.gravatar.com/avatar/
The next part is a hashed version of the users email address. The email address MUST be lower-cased first, then have all whitespace removed, before md5 hashing it.
279aa12c3326f87c460aa4f31d18a065
An optional rating (or r) parameter may follow with a value of [ G | PG | R | X ] which determines the highest rating (inclusive) that will be returned.
?r=R
An optional size (or s) parameter may follow that specifies the desired width and height of the Gravatar. Valid values are from 1 to 512 inclusive. Any size other than 80 will cause the original Gravatar image to be resampled using bicubic resampling before output.
&s=120
An optional default (or d) parameter may follow that specifies the full URL, encoded URL, protocol included, of a GIF, JPEG, or PNG image that should be returned if either the requested email address has no associated gravatar, or that Gravatar has a rating higher than is allowed by the rating parameter. It may also contain one of the following options:
Related Posts
-
Using Smilies
February, 29 2012 0
-
Adding Asides
February, 29 2012 0
-
Administration Menus
February, 29 2012 0
-
Creating Horizontal Menus
February, 29 2012 0
