2008-10-30 05:58:04 +03:00
|
|
|
== Gravatar Plugin
|
|
|
|
|
|
|
|
This plugin provides a handful of view helpers for displaying gravatars
|
|
|
|
(globally-recognized avatars).
|
|
|
|
|
|
|
|
Gravatars allow users to configure an avatar to go with their email address at
|
|
|
|
a central location: http://gravatar.com. Gravatar-aware websites (such
|
|
|
|
as yours) can then look up and display each user's preferred avatar, without
|
|
|
|
having to handle avatar management. The user gets the benefit of not having to
|
|
|
|
set up an avatar for each site that they post on.
|
|
|
|
|
|
|
|
== Installation
|
|
|
|
|
|
|
|
cd ~/myapp
|
2009-08-02 08:19:44 +04:00
|
|
|
ruby script/plugin install git://github.com/woods/gravatar-plugin.git
|
2008-10-30 05:58:04 +03:00
|
|
|
|
|
|
|
or, if you're using piston[http://piston.rubyforge.org] (worth it!):
|
|
|
|
|
|
|
|
cd ~/myapp/vendor/plugins
|
2009-08-02 08:19:44 +04:00
|
|
|
piston import git://github.com/woods/gravatar-plugin.git
|
2008-10-30 05:58:04 +03:00
|
|
|
|
|
|
|
== Example
|
|
|
|
|
|
|
|
If you represent your users with a model that has an +email+ method (typical
|
|
|
|
for most rails authentication setups), then you can simply use this method
|
|
|
|
in your views:
|
|
|
|
|
|
|
|
<%= gravatar_for @user %>
|
|
|
|
|
|
|
|
This will be replaced with the full HTML +img+ tag necessary for displaying
|
|
|
|
that user's gravatar.
|
|
|
|
|
|
|
|
Other helpers are documented under GravatarHelper::PublicMethods.
|
|
|
|
|
|
|
|
== Acknowledgments
|
|
|
|
|
2009-08-02 08:19:44 +04:00
|
|
|
Thanks to Magnus Bergmark (http://github.com/Mange), who contributed the SSL
|
|
|
|
support in this plugin, as well as a few minor fixes.
|
|
|
|
|
2008-10-30 05:58:04 +03:00
|
|
|
The following people have also written gravatar-related Ruby libraries:
|
|
|
|
* Seth Rasmussen created the gravatar gem[http://gravatar.rubyforge.org]
|
|
|
|
* Matt McCray has also created a gravatar
|
|
|
|
plugin[http://mattmccray.com/svn/rails/plugins/gravatar_helper]
|
|
|
|
|
|
|
|
== Author
|
|
|
|
|
|
|
|
Scott A. Woods
|
|
|
|
West Arete Computing, Inc.
|
|
|
|
http://westarete.com
|
|
|
|
scott at westarete dot com
|
|
|
|
|
|
|
|
== TODO
|
|
|
|
|
2009-08-02 08:19:44 +04:00
|
|
|
* Add specs for ssl support
|
2008-10-30 05:58:04 +03:00
|
|
|
* Finish rdoc documentation
|