Help
What is a Openvatar?
Openvatar is your Openid avatar image (80x80). Your avatar appear beside your name when you participate (comments or other contents) on Openvatar enabled sites.
How do I get a Openid account?
There are a lot of services to get an Openid Account. Visit public Openid servers.
The first time you log in Openvatar, it will take your email and nickname from the Openid service. That data is necessary for your Openvatar account.
How do I get a Openvatar?
Login with your Openid account, edit your account and upload your avatar picture, it`s all.
How do I get Openvatar on my site?
If you want to enable Openvatar on your site, you don't need any Openvatar account. You only need to have your site Openid enabled, then install a plugin or setup your site yourself. To request the Openvatar images, add an image (<img>) in comments area with an "src" attribute that points to our Openvatar image generator and MD5 hash of the commenter's Openid URL.
How the URL is constructed
The URL of the Openvatar generator is:
http://www.openvatar.com/avatar.php?
a mandatory parameter named "openvatar_id" follows this. It's value is the hexadecimal MD5 hash of the requested user's openid url.
openvatar_id=9b2894b2fa12ea24c455f4be9331d3fe
An optional "size" parameter may follow that specifies the desired width and height of the avatar. Valid values are from 1 to 80 inclusive. Any size other than 80 will cause the original image to be downsampled before output.
&size=50
If the generator don't found any avatar for the openvatar_id you can set the default image to show.
&default="http://www.mysite.com/avatar.jpg"
The complete URL shows like this:
http://www.openvatar.com/avatar.php?openvatar_id=9b2894b2fa12ea24c455f4be9331d3fe&size=50 &default="http://www.mysite.com/avatar.jpg"
WordPress Openvatar Plugins
Two plugins are available for WordPress. Openvatar plugin and WP-Gravatars plugin (Read the installation page)
Installation for Openvatar plugin: Download and extract the above file to your WordPress plugins directory, located at <WordPress Install Dir>/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 "Openvatar". Under the "Action" column for this plugin, click on "Activate". Installation is now complete.
Usage: Openvatar has the following syntax:
<?php openvatar(); ?>
If you want the size of the image changed as well, supply the pixel dimension as the argument (defaults to 80):
<?php openvatar(40); ?>
If you want to use your own image as a default graphic you'd do this:
<?php openvatar(40, "http://www.mysite.com/avatar.jpg"); ?>
PHP implementation
For implementing openvatar with PHP you must use md5() and urlencode () functions. To create the Openvatar url follow these steps:
$openid = "http://myopenid.openid.net";
$default = "http://www.mysite.com/avatar.jpg";
$size = 50;Then you can create the openvatar url...
$openvatar_url = "http://www.openvatar.com/avatar.php?
openvatar_id=".md5($openid).
"&default=".urlencode($default).
"&size=".$size; Once the openvatar URL is created, you can output it with the <img> tag:
<img src="<?php echo $openvatar_url; ?>" alt="" />
