Pavatar in Depth
What is Pavatar?
Pavatar (Personal Avatar) is a specification for a decentralized way to include avatars in web applications. It uses URLs (WWW addresses) to identify the Pavatars.
What is PHP-Pavatar?
PHP-Pavatar is a PHP library and plugins that use it to enable the use of Pavatar in web applications.
Installing the b2evolution plugin
Simply upload the pavatar_plugin folder into your plugins folder, go into the Admin panel (Global Settings > Plugins) to install and enable it, and you'll be using it. A preferences page is available. Pavatars will automatically get inserted into posts and comments.
Installing the WordPress plugin
Simply upload the pavatar_plugin folder to your wp-content/plugins folder, go into the Admin panel and enable it. You will have to edit the pavatar-wordpress.php file to customize it (though the defaults should be fine). Pavatars will get displayed wherever the
get_avatar() function is used. If your theme doesn't support avatars, look for an update.
Developing your own plugin
It's not difficult. Just include the _pavatar.inc.php file in your application and you should be able to build it easily. The following functions and variables might be useful:
$_pavatar_base_offset: The base of your installation (relative to the plugin), where the cache is located. $_pavatar_ui_name: The name of the application (blogging system, forum, etc.) that is being used. $_pavatar_ui_version: The version of that application. $_pavatar_use_gravatar: Whether to use the centralized (and historically unreliable) Gravatar system when no Pavatar is found. $_pavatar_version: The version of PHP-Pavatar being used. _pavatar_cleanFiles(): Remove the outdated cached Pavatars. _pavatar_getPavatarCode($url): Get the HTML code for embedding the Pavatar for $url. _pavatar_init(): Initialize the Pavatar parser (required before calls to any other function).
After ensuring that the bug exists in the latest SVN code, please report the bug via my Mantis tracker.