AddThis Button
Add This module provides Drupal integration to addthis.com link sharing service.
Description from addthis.com:
The AddThis button spreads your content across the Web by making it easier for your visitors to bookmark and share it with other people, again... and again... and again. This simple yet powerful button is very easy to install and provides valuable Analytics about the bookmarking and sharing activity of your users. AddThis helps your visitors create a buzz for your site and increase its popularity and ranking.
AddThis is already on hundreds of thousands of websites including SAP, TIME Magazine, Oracle, Freewebs, Entertainment Weekly, Topix, Lonely Planet, MapQuest, MySpace, PGA Tour, Tower Records, Squidoo, Zappos, Funny or Die, FOX, ABC, CBS, Glamour, PostSecret, WebMD, American Idol, and ReadWriteWeb, just to name a few. Each month our button is displayed 20 billion times.
REQUIREMENTS
None.
INSTALLATION
Normal Drupal module installation, see http://drupal.org/node/70151 for further information.
For link sharing statistics registration at http://addthis.com/ is required, but the module will work even without registration.
CONFIGURATION
There are two ways of using the module:
1) Display AddThis button in node links.
* Go to Administer / Site configuration / AddThis.
* Check Display on node pages.
* Optionally check Display in node teasers.
* If you want to limit AddThis visibility by content type go to Administer / Content management / Content types and choose a content type. Visibility can be set for each content type under Workflow settings.
2) Use AddThis as a block.
* Go to Site building / Blocks and make AddThis button block visible.
CUSTOMIZATION
You have a number of options available at Administer / Site configuration / Addthis under Button image settings
and Widget settings. Image settings control the button image and widget controls the drop down and window that is opened when user clicks on a link sharing service. More information on how to customize your AddThis button can be found at http://addthis.com/help/customize/custom-button/
If configuration options are not flexible enough for you it is also possible to override theme_addthis_button in your own theme.
ROADMAP
Future development of this module will include at least RSS support. CCK and Views integration may be included in future releases. Drupal 5.x version will no longer get any new features. Drupal 7.x version will be released soon after D7 code freeze.
CONTACT
Current maintainers:
* Vesa Palmu (wesku) - http://drupal.org/user/75070

Option to display as Link Decorations?
First - I love that you've got this into Drupal - such a central functionality. Our (my company's) thanks!
:)
Are there any plans to incorporate the option to display Addthis via Link Decoration as outlined at Addthis.com: http://www.addthis.com/help/api-spec (at the bottom)?
We like big juicy individual service buttons instead of the compact "share" catch-all button. Originally I coded them directly into the tpl files, but that prevents us from administering addthis from the drupal admin interface.
So today I managed to hook into theme_addthis_button() in template PHP to override the current pop-up setting so that it displays a collection of anchors decorated with class declarations (according to addthis_options in the variables table) instead of the generic "share" button. It should be live in a couple of weeks, but it looks exactly like the big button displays we currently have up (which I coded into the tpl. files) at http://www.opusframing.com/blog/artists-lets-change-world (near the bottom of the article). Kudos to jwloh, the source of our great social buttons! (http://jwloh.deviantart.com/art/Social-me-90694011)
So we can now control which big juicy buttons show up, which nodes the addthis buttons show up on, etc, via the admin interface, all thanks to your module and template.php. But I find I want to provide options for button size, custom image path overrides, etc (the big buttons dominate on teasers, for example), and the prospect of hijacking the current variables for size and height (again from template.php) feels a bit hacky. I realize this is all design-centric, but I thought I'd ask.
;)
Thanks again for making this functionality so easy for us to implement.
Chris
In case anyone is interested, what I put into my template.php is below (theme name is "opus"). I'm a fly-by-the-seat-of-my-pants coder (no training), so forgive me if it's clunky.
You have to have your drop-down enabled for the big buttons to come up (which is an arbitrary choice on my part).
<?phpfunction opus_addthis_button($node, $teaser) {
if (variable_get('addthis_dropdown_disabled', '0')) {
return ( sprintf('
<a href="http://www.addthis.com/bookmark.php"
onclick="addthis_url = location.href; addthis_title = document.title; return addthis_click(this);">
<img src="%s" width="%d" height="%d" %s /></a>
',
$_SERVER['HTTPS'] == 'on' ? addslashes(variable_get('addthis_image_secure', 'https://secure.addthis.com/button1-share.gif')) : addslashes(variable_get('addthis_image', 'http://s9.addthis.com/button1-share.gif')),
addslashes(variable_get('addthis_image_width', '125')),
addslashes(variable_get('addthis_image_height', '16')),
addslashes(variable_get('addthis_image_attributes', 'alt=""'))
));
}
else { //customized code to display big add this buttons via text decoration
$options=explode(',',variable_get('addthis_options','twitter,facebook,myspace,digg,linkedin,delicious,email,expanded'));
foreach($options as &$service){
$service = '<a class="addthis_button_' .$service . '"><img src="'.base_path().'sites/default/themes/opus/images/socialme/' . $service . '.png" width="60" height="60" alt="' . $serivice . '"/></a>';
}
return (sprintf('
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox">
<h3 class="title">Share this!</h3>
<div class="custom_images">
%s
</div>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=opusmarketing"></script>
<!-- AddThis Button END -->
',
implode("\n",$options)
));
} // end custom code
}
?>
On the future roadmap
Sorry, I missed your comment in here. Please use the issue queue for feature requests, they will get more attention that way.
We are currently working with D7 port of the module and next things on our roadmap are addthis API 2.0 conversion which will bring a lot of new feature to the module. Before we move to the new API we are stuck with current functionaltity. Any help is always welcome. :-)