Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A gravatar library for Kohana

branch: 3.2/master

This branch is 0 commits ahead and 0 commits behind 3.2/master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

Gravatar

The gravatar module allows you to easily interact with gravatar.com to display user icons.

Configuration

The default configuration file is located in MODPATH/gravatar/config/gravatar.php. You should copy this file to APPPATH/config/gravatar.php and make changes there, in keeping with the cascading filesystem.

Below is a list of the configuration options:

Name Type Default Description
default_image string false The default image, FALSE is the Gravatar G icon. Your can also use a url to your own image, 404, mm, identicon, monsterid, wavatar or retro.
size int 60 The size of the image in pixels. This number must be between 1 and 512.
rating string Gravatar::R The default maximum rating for the image.
attrs array array('class' => "gravatar", 'alt' => "user gravatar") Optional, additional key/value attributes to include in the tag.

Take a look at the documentation on the Gravatar site for more information.

Displaying Icons

// Display the icon for test@example.com
echo Gravatar::instance('test@example.com');

// You can also use render
Gravatar::instance('test@example.com')->render();

Using Gravatar::instance will keep the Gravatar objects around so you won't have duplicate objects for the same email.

Extending

If you see features that are missing or you want to help make this module better, the code is hosted on github. Fork and hack away!


Developed by Dave Widmer

Something went wrong with that request. Please try again.