UEH

Addthis

Addthis.com provides widgets that make sharing, bookmarking and emailing pages, and subscribing to feeds easy for your visitors. It supports a broad range of social network sites and web applications.

The Addthis helper plugin makes it easy to add plain or customized Addthis.com widgets to your Ruby (on Rails) application.

Installation

If you want to use the Rails 2.1 dependency manager add this to your environment.rb:

  config.gem 'jaap3-addthis', :lib => 'addthis',
		:source => 'http://gems.github.com'
	

Then run the following command in your Rails application root:

  rake gems:install
	

Or you could install it as any other rails plugin plugin:

  script/plugin install git://github.com/jaap3/addthis.git
	

After installing and restarting your Rails application you can use these 4 new methods in your html views:

  addthis_bookmark_button
  addthis_share_button
  addthis_email_button
  addthis_feed_button(url)
	

The names are fairly self explanitory.

Customization

The plugin supports all the customization mentioned on AddThis.com. To apply a customisation you can either pass a hash on each method call, or change the plugin defaults in a Rails initializer.

For the full details about how to customize the Addthis button I can only tell you to go to github to see the full documentation and source code.

Search