gravatar()
The gravatar ViewHelper returns the URL to a Gravatar.
If you want to know more about Gravatars, please visit the official Gravatar website.
-> Since BIGACE 3.0
Further infos at the ViewHelper gravatar() PHPDoc.
Attributes
-
$email - (required, string) The Email to get the Gravatar for.
-
$default - (required, string) The fallback image, if no Gravatar exists.
-
$rating - (optional, string) The maximum rated image that might be displayed (see Gravatar website for more infos)
-
$size - (optional, integer) The size of the image.
Example
This example shows to ...
:::php
<?php
$email = "test@example.com";
$size = 48;
$url = $this->gravatar($email, "http://www.example.com/fallback.jpg", "G", $size);
echo `<img src="'.$url.'" alt="Gravatar for '.$email.'" border="0" width="'.$size.'" />`;
?>