WordPress Gravatar Plugin

A plugin is available for WordPress 1.2 installations. The plugin makes available a tag called gravatar that, when used inside the Comment Loop, outputs the correct gravatar URL based on the commenters email address. It's important to note that this plugin does not actually put a gravatar image by your comments, but makes it easier for you to edit that into your themes php files yourself

Download wp_gravatar.zip

Installation: Download and extract the above file to your WordPress plugins directory, located at /wp-content/plugins. Once the file is placed in the plugins directory, login to your WordPress installation, and click the "Plugins" tab on the main administration panel. Look through the list of installed plugins to find the one called "Gravatar". Under the "Action" column for this plugin, click on "Activate". Installation is now complete.

Usage: gravatar has the following syntax:

<?php gravatar({rating{, size{, default{, border}}}}) ?>

All of the parameters are optional. For example, the following will create a gravatar URL that allows all rating levels, is 80×80 pixels, uses no default image, and has no border:

<?php gravatar(); ?>

If you wish to restrict your gravatars to R rated and below, you'd do this:

<?php gravatar("R"); ?>

If you want the size of the image changed as well, supply the pixel dimension as the second argument (defaults to 80):

<?php gravatar("R", 40); ?>

If you want to use your own "Heat Vision and Jack" image as a default graphic (shows up when either no gravatar exists for a given user, or the given user's gravatar exceeds the specified rating), you'd do this:

<?php gravatar("R", 40, "http://www.somewhere.com/heatvision.jpg"); ?>

You can also add a 1px border of any color you choose with the fourth parameter:

<?php gravatar("R", 40, "http://www.somewhere.com/heatvision.jpg", "FF0000"); ?>

If you wish to leave a parameter at its default while supplying other parameters, simply pass an empty string as the argument.

Remember that this only generates the URL, so you have to place the gravatar tag inside the src attribute of an img tag like so:

an joint