Plugin Information
EE Gravatar 1.3
- Author:
- Les Jenkins
- Published:
- Jul 28, 2004
- Last Updated:
- Mar 04, 2007
- License:
- Freeware
The EE Gravatar Plugin allows you to easily insert a "globally recognized avatar" image from Gravatar.
Example Usage
{exp:weblog:entries limit="20"}
<img src="{exp:gravatar rating="R" size="40" border="FF0000"}{email}{/exp:gravatar}" />
{/exp:weblog:entries}
Notes
The EE Gravatar Plugin allows you to easily insert a "globally recognized avatar" image from Gravatar (http://www.gravatar.com/).The plugin is designed to be used within either the {exp:weblog:entries} or the {exp:comment:entries} loop and has one required parameter: {email}. It returns a properly formatted URL for use in an IMG tag as follows:
<img src="{exp:gravatar email="{email}"}" />
== OPTIONAL PARAMETERS ==
default="http://www.somesite.com/someimage.jpg"
Defines a default avatar if there isn't one associated with the email address or if it exceeds the rating.
rating="[G | PG | R | X]"
Allows you to limit gravatars to the appropriate rating. Anything exceeding the rating will use the default (if supplied) or not display.
size="[1..80]"
Allows you to define how big the gravatar will be in pixels. Any size other than 80 will cause the original gravatar image to be downsampled using bicubic resampling before output
border="[hex color]"
Puts a border of the specified color around the gravatar.
== POSSIBLE EXAMPLES ==
Here's a few examples that you might use:
<img src="{exp:gravatar rating="PG"}{email}{/exp:gravatar}" />
Only displays gravatars of PG rating or lower.
<img src="{exp:gravatar rating="R" size="40" border="FF0000"}{email}{/exp:gravatar}" />
Displays 40x40 pixel gravatars of R rating or lower with a red border around them.
<img src="{exp:gravatar size="70" default="http://www.somesite.com/someimage.jpg"}{email}{/exp:gravatar}" alt="Picture of {name}" title="{name}" class="avatar" />
Displays gravatars of 70x70 pixels or a default graphic for users without a gravatar. Put's the user's name in the alt and title tags and styles the image using a class called "avatar."
== Change Log ==
V1.3 - Changed & to & for XHTML validation compliance.
v1.2 - Made {email} into a parameter along for single tag usage for EE 1.1 release.
v1.1 - Minor bug fix.
v1.0 - Initial Release

