|
Rych_Gravatar
Description of the Rych_Gravatar component
Rych_GravatarGravatar provides a simple service for cross-site avatars. The gravatar component is simply an interface for generating the proper URI for a gravatar image based on a user's email address. <?php
$gravatar = new Rych_Gravatar;
$gravatar
->setDefault(Rych_Gravatar::DEFAULT_WAVATAR)
->setRating(Rych_Gravatar::RATING_G)
->setSize(80);
// Build a quick list of user avatars
echo '<ul>';
foreach ($users as $user) {
echo '<li><img src="';
echo $gravatar->getUri($user->emailAddress);
echo '" width="80" height="80" alt="Profile pic"></li>';
}
echo '</ul>';
|
► Sign in to add a comment