|
|
GlxGravatar
Implementation of gravatar for Textpattern
glx_gravatar
Outputs a gravatar in comments. Developed by Johan Nilsson and maintained by grauHirn.org. More info about Gravatars at gravatar.com
Download
- current version
- development version (might not work as expected)
attributes
Note: If an attribute requires yes or no it means that yes can be the value yes, 1, enable and true and no can be the value no, 0, disable and false - however you want it.
- email - optional attribute that overwrites the current email of the form. If you want to use gravatars outside of the comment-form you can use this attribute to submit the email for the gravatar. This attribute is parsed so the use of gho_author_email is possible.
- default - If the user dont have a Gravatar you can specify an image that will be displayed instead. If not given no image will be returned, when there is no gravatar-account for the given emailadress. You have to specify the full path to the image, if it is saved under your current txp-installation.
- size - Size of the Gravatar. Possible values are 0 til 80 and 80 is default.
- rating - Can be G, PG, R or X. More info about the rating at Gravatar.com. If not given no rating will be applied.
- border - When this attribute is given, an border of 1px will be applied to the picture. This attribute can contain the hex-code of the color (three or six characters). Please note, that this border will be included in the actual image and will be substracted of the resulting size (??? how to explain this?). If you give size 40 your image will be 38pixel wide and the border around it will have 1pixel.
- class - Class to assign to the img tag. If not given no class will be applied.
- alt - The image alt text. Default is empty.
gho_author_email
Returns the author of the current article.
Example
<txp:glx_gravatar /> <txp:glx_gravatar size="60" default="http://www.example.com/images/gravatar.png" class="gravatar" />
used in the form comments it will show the gravatar of the current commentator
<txp:glx_gravatar email="address@example.com" />
shows the gravatar for address@example.com.
<txp:glx_gravatar><txp:gho_author_email/></txp:glx_gravatar>
Shows the gravatar for the author of the current article.
Changelog
2008-06-15 v.2008.1
- Attribut email for use outside of the comment-form
2007-06-22 v.2007.1
- new release for textpattern 4.0.4 (without cache)
