Giter VIP home page Giter VIP logo

gravatar's Introduction

--markdown--

Gravatar

Gravatar is a Javascript script to retrieve email associated gravatar picture or profile. It requires MooTools >= 1.2.

Features

Gravatar features are:

  • Dead simple to use
  • Use user email MD5 for privacy
  • Can use plain clear email if you don't care about privacy
  • Creates multiple instances
  • Fully customizable
  • Works on Safari, Firefox, IE 6/7, Chrome and Opera
  • Documentation generated with PDoc
  • Open source, full code is available on BitBucket

Download

  • Full code is available from BitBucket. If you want to fix bugs or add features, it's the best way to start with
  • Full code is also available from a zip file

When the sources are retrieved you can build a compressed version of the lib using :

$ rake

It'll build a YUI compressed version of the lib in 'dist' directory. You'll also got HTML code documentation in 'doc' directory.

Usage Example

Drop mootools, md5 and gravatar.js in your javascripts directory and include it in your XHTML layout :

<script src="javascripts/mootools.js" type="text/javascript" charset="utf-8"></script>
<script src="javascripts/md5.js" type="text/javascript" charset="utf-8"></script>
<script src="javascripts/gravatar.js" type="text/javascript" charset="utf-8"></script>

then you can create new Gravatar instances :

new Bounga.Gravatar({md5: "855c677aca7319a44da19fb583b9f320", size: 200, extension: '.png'});

or new Bounga.Gravatar({email: "[email protected]", size: 200, extension: '.png'});

Take a look at 'example' directory to see examples.

Options

Available options to tune your Gravatar are:

size: 100           // Default size you want to use for the picture.
	extension: '.jpg'   // Extension you want to use for the picture.
	rating: 'g'         // Rating level.
	defaultImage: null  // Default image to use
	email: null         // plain text email to use
	md5: null           // already MD5 hashed email (so much better for your users)

Events

Available events fired by Gravatar are:

profileFetched        // Fired when profil JSON was successfully retrieved.
profileFetchingFailed // Fired when profil JSON fetching failed.

Other

For more information see Project homepage

Problems, comments, and suggestions are welcome on the ticket system

Copyright (c) 2011 Nicolas Cavigneaux, released under the MIT license

gravatar's People

Contributors

bounga avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.