gravatar Add Gravatar avatars support to your applications.

  1. Documentation
  2. Installation Instructions:
  3. Requirements:
  4. Usage:
  5. Change Log

This extension allows you to display a Gravatar in your view files. Full documented and customizable.

Resources

Documentation

Installation Instructions:

  1. Download the extension
  2. Unzip the file contents
  3. Upload the VGGravatarWidget.php file to the extensions folder located under WebRoot/protected/extensions
  4. Read Usage Instructions.

Requirements:

This should work on all Yii versions (That has widgets working in them), But was tested on version 1.0.9 & 1.1.x .

Usage:

Inside your view file just paste the following code:

<?php
$this->widget('application.extensions.VGGravatarWidget', 
			    											array(
																  'email' => 'myemail@mydomain.com', // email to display the gravatar belonging to it
																  'hashed' => false, // if the email provided above is already md5 hashed then set this property to true, defaults to false
																  'default' => 'http://www.mysite.com/default_gravatar_image.jpg', // if an email is not associated with a gravatar this image will be displayed,
																																   // by default this is omitted so the Blue Gravatar icon will be displayed you can also set this to
																																   // "identicon" "monsterid" and "wavatar" which are default gravatar icons
																  'size' => 50, // the gravatar icon size in px defaults to 40
																  'rating' => 'PG', // the Gravatar ratings, Can be G, PG, R, X, Defaults to G
																  'htmlOptions' => array( 'alt' => 'Gravatar Icon' ), // Html options that will be appended to the image tag
															));
?>

Change Log

March 31, 2010
  • Initial release.
11 0
10 followers
2 511 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: User Interface
Tags:
Developed by: Vince.
Created on: Mar 31, 2010
Last updated: 13 years ago

Downloads

show all