Notice! We need people to test the dev version and provide valuable reports on what is not working or where to improve. This way we can prioritize where to focus. Please file your issues under the 7.x-4.x-dev release when your testing it. Look here for a tutorial how to setup this module.

Problem/Motivation

Here is a summary on what is happening with the 7.x-4.x version of the AddThis module.

On 9 sept 2011 the first release of the 7.x-4.x-dev was done. This version is a complete rewrite of the AddThis module and implements more of the great features that Drupal 7 has implemented.

Proposed resolution

The first major change is the use of fields as the basis for AddThis buttons to be added. Field provide format settings and display modes. By utilizing fields we can set our display style for the AddThis buttons per display mode.

Example: A content type has a AddThis field. On the full node display (Default display mode) we will be displaying a AddThis big toolbox with that contains several sharing options. On the teaser we don't want something too big so we set the format to display only a small Share button.

The example provided is something that is implemented already. Janip (working at Mearra) has done the rewrite for the most part. After DrupalCon London I (working at VDMi) started to work on it too.

Remaining tasks

The main focus now is to work towards a stable version that can be used on D7. Here is a list of tickets that block a beta/stable release

Some points that are on the list right now are in order of priority (can be discussed):

  1. Make configuration easy
    #1303598: Structure of the configuration pages
  2. Make display types configuration easy through formatter settings.
  3. Seperate display types from module and create basic types
  4. Provide a good example on implementing your own display
  5. Make Facebook Like working
    #1273202: Like button not registering clicks
  6. Make specific url liking and sharing possible
    #1335212: Specific url sharing
  7. Initialization through js Drupal behaviours (Done)
    #1324464: Toolbox doesn't show when set to asynchronous mode
  8. Provide good documentation on how to use and extend the module
    #1307084: Document > Uninstalling the module
    #1304094: How to just show the original buttons (Twitter, Facebook, +1) without the compact menu?
  9. Implement AddThis blocks
  10. Implement AddThis simple theme functions
  11. Provide Google Analytics Social tracking
    #1062132: Enable click tracking and Google Analytics support
  12. #1313732: Add Twitter via support to global configuration
  13. #1330284: Multi language support

If there are any questions or suggestions let me know.

Quick links:
Issue queue 7.x-4.x-dev

User interface changes

The UI for configuration needs work. Feedback is welcome.

API changes

The module now contains a totaly new API to extend Display types. Documentation should still be written.

Original report by janip

Janip did the first stab at patching a D7 version of the AddThis module.

Here is a first stab at a D7 upgrade. Everything is more or less the same - just using the new hooks, etc.

Note that I built this patch against HEAD, but it is really based on DRUPAL-6--2 because HEAD is quite old.

Comments

vesapalmu’s picture

Assigned: Unassigned » vesapalmu

You are right about that. The HEAD is now up to date with latest D6 release. However I wasn't really thinking straight with this merge, so could you please also post tar package of your D7 version? I can merge it manually to HEAD, it's easier to just merge it now manually than to use the batch.

vesapalmu’s picture

And I take that one back also. I first updated HEAD to latest 6.x and then applied your patch. The HEAD is now a working port for D7, but it still is missing some functionality and will likely require some cleaning up. However this is a very good starting point for full D7 release. Great work JacobSingh, thank you!

I will create an early alpha version of the module to make it easier for people to test it.

dave reid’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Status: Needs review » Needs work
StatusFileSize
new16.32 KB

Hrm it seems there was a functional change in that the addthis button is now injected into node content rather than the links area. Here's a 'polishing' D7 port patch. It was made against 7.x-2.1-alpha2 so I'll have to re-roll against dev and provide a summary of changes.

vesapalmu’s picture

This has already been changed in 3.x version which is actually a complete rewrite to fix the design issues we've had with 2.x. Unfortunately there is no stable version of 3.x yet and for this reason no D7 port either.

bmateus’s picture

Hi guys.

When can we expect 3.x?

vcardillo’s picture

Version: 7.x-2.x-dev » 7.x-2.1-beta1
Category: feature » bug

I installed this, and nothing is showing up? I also don't see any options to show counts.

thomaslucas’s picture

hmmm any hope for having the super cool twitter / facebook boxes with counters and like buttons and stuff like in the 6.3 dev? I used to have that and now in the Drupal 7 version the simple drop down looks tacky

Thanks!

tsvenson’s picture

Just noticed the AddThis integration on http://drupaldesigncamp.net (bottom) that looks brilliant. Then headed over here to see if there was a new D7 version, but it doesn't seem like it.

bmateus’s picture

I've actually managed to place a custom system in D7.

Check it here at www.conceptarquitectos.com. Doesn't work too well, though.

Here's what I've done:

  • Installed the dev version.
  • Configured the basic configuration
  • Wen to Addthis.com and generated my custom theme. Copied the code.
  • Then, in the actual addthis.module file, search for the comment that says "Theme the Addthis button".
  • I've replaced the content inside the sprintf('. Carefull: the first sprintf is for https links, and then you have an else statement with another sprintf. That's where you should code again the buttons, this time with only http links.
  • Also, look carefully, as not all the code needs to be changed. You can also customize with css classes, and add your own images.
  • Hope it helps.
    If required in one of my next projects, I'll make a video tutorial of this.

    In any case, shouldn't have been too hard for the module builders to add an area for customized themes... But I don't know how to build them, or I would try myself. Maybe one day.

les lim’s picture

I'll try to get a hold of wesku and see what the plans are for D7. I was made a co-maintainer with the explicit mandate to develop only the 6.x-3.x branch, and I know he had specific plans for how the Drupal 7 version would take shape, or else I would port the 6.x branch myself.

WilliamV’s picture

Will we be able to set toolboxes with counts? Grtz & thx!

pixelsweatshop’s picture

For those of you looking for this type of module right away, there is a stable D7 release of the sharethis button that is feature rich. http://drupal.org/project/sharethis

jamiecuthill’s picture

flightrisk’s picture

Assigned: vesapalmu » flightrisk
Category: bug » task

No updates to the D7 version in a year? What's the status on this, do we have any hope of upgrades? Thanks!

jamiecuthill’s picture

Development of 7.x-3.x is happening on the 'master' branch as far as I can tell.

lebobbi’s picture

Thks bmateus. Gonna try that.

Does the count label works?

les lim’s picture

Assigned: flightrisk » Unassigned

There will likely not be a 7.x-3.x version. I'll be maintaining the 3.x branch for Drupal 6 only; there is a planned 4.x branch for Drupal 7 that implements AddThis as a field.

bmateus’s picture

@lebobbi:

Yes, the count works. But be careful: if you show several posts on the same page with the widget on, they'll all link to the same (first) post...

lebobbi’s picture

I see, so it won't work on the main content page for the summaries listing =S

I'll try it anyway.

Thanks

bmateus’s picture

@lebobbi

Maybe if you try the patch in #3, it might work.
I'm no longer working on the previous project that included AddThis, so I can't try it.

If you use it, please post the results here for future notice.

matglas86’s picture

I recommend to look into the 'master' on git. There is some active work going on there. At this moment it is not at the stage of a stable release but the its good to test. With the command below you'll get the 'master'.

$: git clone http://git.drupal.org/project/addthis.git

bmateus’s picture

Thanks for the info.

janip’s picture

Version: 7.x-2.1-beta1 » 7.x-4.x-dev

The first development release for the 7.x-4.x branch is now available.

mathieuhelie’s picture

Tried the 7.x-4.x release, I think you might have a problem with class auto-loading. When I disabled the module I was no longer able to bootstrap Drupal (either from browser or Drush) because of a missing AddThis class in your addthis.install file. I had to erase all the references to "AddThis::" for Drupal to bootstrap again.

les lim’s picture

#24: Regarding autoloader issues, you might find this project helpful as a developer:

http://drupal.org/project/registry_rebuild

les lim’s picture

Issue summary: View changes

Updating issue description.

matglas86’s picture

Priority: Normal » Major

At the beginning of this issue you'll find a update on the D7 development. Please take a look at it and think about testing the dev version. Give feedback and help us out working toward a new release.

Thanks!

hyperglide’s picture

sub

matglas86’s picture

The problem with the AddThis class not loading is fixed now.

matglas86’s picture

For everybody that has used the AddThis module, can you specify what are the most important aspect to focus on while working towards a stable version.

This wash my first list but what is yours?

  • Make Facebook Like working
  • Make counters work
  • Make configuring your display style possible
  • Make specific url liking and sharing possible
  • Implement AddThis blocks (multiple times with different displays)
  • Implement AddThis simple theme functions
  • Provide a good example on implementing your own display
  • Provide good documentation on how to use and extend the module
bmateus’s picture

Thanks for this question, I think it's actually important.

For me, these are high-priorities, ordered by importance:

  1. Make configuring your display style possible (people want to adjust AddThis to their own website)
  2. Provide a good example on implementing your own display (helps the above)
  3. Make Facebook Like working (everyone else has it, FB is still up and rising...)
  4. Make counters work (I can live without it, but clients sometimes can't ;)
matglas86’s picture

bmateus, thanks for you input. Agree totally on you list. I'm doing some test to see how easy configuring can be made through the Display settings. It looks promising.

Is your list in order of priority btw? Ooh and how important do you think it is for people to be able to copy and past code from the AddThis website? I have seen this question going through the issue queue.

matglas86’s picture

Issue summary: View changes

Providing a summary and update on the 4.x development.

bmateus’s picture

matglas86, I've never got to thank you for picking up this project again! And THAT is the most important thing in this project right now :)

Regarding my list: yes, is ordered by priorities.

And I think it is extremely important for users to copy and paste the code generated in AddThis website. Actually, thinking deeper about this mater, there's no real usable dynamic code - the codes I seem to find are always static, with the exception of the main website code generator (located https://www.addthis.com/get/sharing?where=website&type=bm&clickbacks=1&f... ), although always simple and generic in use.

If a settings page can be built, it would be far better, I suppose.

And thanks again for picking this project. :)

matglas86’s picture

Hi bmateus, thanks you for the compliment. I really like doing it and I'm learning a lot from it. It also helps me to get involved in the community. And Drupal is running on the community. Great link it that this module supports community engagement. :)

So here is a rewrite of the priority list based on your feedback. The list at the top is not yet updated based on this. I'd like some feedback on it if possible. If someone has ideas on splitting this into several issues and link them back here it would be great.

Proposed priority list:

  1. Make display types configuration easy through formatter settings
  2. Seperate display types from module and create basic types
    1. Basic Button (inc. image upload)
    2. Basic Toolbox (w/ settings) #1300036: Define toolbox services
    3. Basic Counter (w/ settings)
  3. Provide a good example on implementing your own display
  4. Make Facebook Like working #1273202: Like button not registering clicks
  5. Make specific url liking and sharing possible
  6. Initialization through js Drupal behaviours
  7. Provide good documentation on how to use and extend the module
  8. Implement AddThis blocks
  9. Implement AddThis simple theme functions

With the settings I think we need to take in to account the UX aspect. Input is very welcome. I like this qoute from the d7ux.org.

Our UX Principles: 1. Make the most frequent tasks easy and less frequent tasks achievable. 2. Design for the 80% 3. Privilege the Content Creator 4. Make the default settings smart

When I see that more then 10.000 website use the 6.x module we have to keep it up for this version.

Suggestions on how to split and describe tasks are welcome.

matglas86’s picture

Issue summary: View changes

Rewrote the summary based on the summary template and updated the priority list.

flightrisk’s picture

Excellent list! Configuration and like buttons working is what I need. I need the bookmark and print buttons easily placed where I want them. Either as an interim step or as a permanent feature, it might be nice to have a text region where you can "override" a display. If you have it all working WYSIWYG with drag and drop or by configuring widgets like you can fields in views, then great, otherwise, I imagine a text block and a checkbox. "Override display with this code". Then we use the WEB generator to give us a code snippet and we stick it in the box.

flightrisk’s picture

Issue summary: View changes

Changed Priority list

matglas86’s picture

Title: Drupal 7 Version » [meta] Drupal 7 Version
Assigned: Unassigned » matglas86
Status: Needs work » Active

I added meta to the title as this is a meta collection item for the D7 development. Also I added a link to a short tutorial to the summery on how to setup this module. You can find that here: http://drupal.org/node/1309922. I hope that helps.

hyperglide’s picture

Great work on the module.

Please put me as a Plus1 on the Facebook Like!

Thanks!

bmateus’s picture

Hi matglas86.

Sorry, been offline for some days. Great work on the settings area of the module!

Just a couple of questions:

  • What should be the best way of duplicating the AddThis buttons on a node ?
    For instance, if you would want Addthis right after the title, and then on the bottom of the node? Should you just create a duplicate field on the Content Type editor, or edit the node template itself and change the code?
    (just asking because that's actually how many sites are using ShareThis and other systems...)
  • Regarding the UI, I think it's simple, clear and organized. Just maybe the Facebook, +1 and Twitter should fall under the same fieldset (but I actually wouldn't know what to call this category :)
  • Finally, seems like the icons on the Services tab are not correct.

But nevertheless, I'm impressed. It's actually very user friendly, and to-the-point.

Big thumbs up from me!

bmateus’s picture

Issue summary: View changes

Added link to configure tutorial.

matglas86’s picture

@bmateus,

Thanks for getting back again :) Your question is a good one. Here's my point of view on this.

I think that the easiest way is that you add two field. You would set them up both the same way. But what you could also do is use the theme function to add the buttons to the node.tpl.php. The basics for that are already available but will become even more powerful. I hope that sheds some light on how to do this.

About the configuration page, did you look here for my ideas about that: #1303598: Structure of the configuration pages. The current page still needs some change I think

What do you mean by the services tab? Did you maybe mean the fieldset and not the tab. Because I don't know anything about a services tab. :)

matglas86’s picture

Issue summary: View changes

Added link to issue that need documentation.

matglas86’s picture

Issue summary: View changes

Added link to issue because we need documentation on that.

bmateus’s picture

Regarding the AddThis placement, doubling up the fields might not be the best optimized procedure. Maybe in documentation there can be a section showing the code (simple, just for copy-paste) and clearly identify where to paste it in node.tpl.php.

About the configuration page, sorry, I didn't read it before. Now I did already, and I think there's some aggregation to be done.
But I also think to let it mature a bit, just to feel which seems more "out-of-place". Usually works for me.

Sorry about that Services tab thing, that's just bad translation (english is not my mother language, and sometimes is not that good.).
I was actually refering to the Enabled Services subtab (your words, this time :). The icons don't relate to the displayed service. For example, the Facebook icon is from eC, and Google has an icon of Facebook, etc.

Regarding these Enabled Services, you can check by my screenshot that this is a long, long page. Maybe displaying them in 3 columns might help?

Keep up the fantastic work.

matglas86’s picture

@bmateus, what do you mean by "there's some aggregation to be done". I seperated the the issue on configuration page on purpose to no make sure this issue will not start to clutter up.

PS. English is not my mother tong either so don't worry, I know what its like ;)

matglas86’s picture

Issue summary: View changes

Add new related issue feature request for twitter via support.

matglas86’s picture

Issue summary: View changes

Changed priority list.

matglas86’s picture

Google Analytics support and Google Analytics Social Tracking when into 7.x-4.x-dev yesterday.

matglas86’s picture

Title: [meta] Drupal 7 Version » [meta] AddThis 7.x-4.x

A major update to the 4.x-dev was done today. Here is a overview of what has changed.

  • Added Facebook Like support.
  • Added support for Google Analytics tracking.
  • Added support for Google Analytics Social tracking.
  • Added simple setting up of sharing on content types through Display Types.
  • Implemented Display Types as a submodule to slimdown the module for heavy users.
  • Dropped the early implemented display types in favor of the more flexible and configurable Basic Display Types.
  • Added block support for basic implementation of all Display Types in the AddThis block
  • Added alter hooks to increase DX experience.
  • Reorganized the configuration page to increase UX experience.

I really hope the usability experience with this module is even better now. If you have time leave a positive comment or report your issue so we can work towards a stable release.

matglas86’s picture

I am curious. For the people that follow this issue, did you test the new module? If yes, what was your experience? Do you think its stable enough? Do you have time to do a code review and give some feedback on that?

hyperglide’s picture

@ matglas86 -- I have not installed it since still on Beta -- I cant review the code. But perhaps can put on a dev site to have a look.

Thanks for all your efforts!

matglas86’s picture

Hi @HyperGlide. Would be great if you could indeed give feedback. Even if its feedback about how its used and if its clear enough how to use it and set it up.

andreas_jonsson’s picture

Installed the latest dev and the following has worked fine for me: installing, basic config, added field to different content types, added toolbox facebook_like button and tested sharing successfully.

Provided some feedback for the settings ui:
http://drupal.org/node/1303598#comment-5523200
http://drupal.org/node/1303598#comment-5523330

psihopatak’s picture

facebook buttons are working well, there is a little difference in hight between facebook send and like buttons (small icons), google +1 button is larger then it should be.
facebook send on click opens new tab instead of opening popup window

anyway, thanks for the modul

bensnyder’s picture

Just enabled this on a few of our pages at YesterTec.com.. We'll test it out and give feedback. Thanks!

CinemaSaville’s picture

matglas86’s picture

We release a alpha version. Check it out!

jay.lee.bio’s picture

StatusFileSize
new2.61 KB
new1.82 KB

Hi matglas86, I'm one of those that decided to use this module instead of AddToAny (I couldn't customize the display of buttons), ShareThis (I couldn't get rid of @sharethis in the Twitter button), etc. So far I am very impressed at the level of customization that is potentially possible and look forward to a stable release. In response to your question at #29:

Currently, I want AddThis to be something like the example attachments, but customized:

1) I can't get the orange + button to show up on my D7 site. Am I missing something?
2) The counter ("Counter orientation") needs to work.
3) Ideally, I want the counters to be used with each square button (not just one that I think shows the total number shown next to the orange + button), not the long ones (because I want as many buttons on one line as possible).

1) & 2) are critical, 3) is optional.

BioALIEN’s picture

Priority: Major » Critical

I have just hit the same stumbling block as the previous poster above. It seems there is no way of adding the addthis_counter (orange counter) or button. Furthermore, not all the counter bubbles for Facebook, Twitter, LinkedIn, and Google+1 seem to work. I get mixed results so I'm bumping this as critical.

I imagine many users of this module will want something similar to the example on the addthis.com site (the same one provided by Jay Lee). At present I have only tested 7.x-4.0alpha1. Happy to help debug and test this further. Suggestions?

davisben’s picture

I too needed orange counter button. I was able to add it by implementing hook_addthis_markup_alter in a custom module.

function MYMODULE_addthis_markup_alter(&$markup) {
  $markup['counter'] = array(
    '#theme' => 'addthis_element',
    '#tag' => 'a',
    '#value' => '',
    '#attributes' => array(
      'class' => array('addthis_counter', 'addthis_pill_style'),
    ),
  );
}

I'd be glad to work on a patch to add this, but I'm not sure the best place to put it.

agudivad’s picture

Title: [meta] AddThis 7.x-4.x » [] AddThis 7.x-4.x

Whenever using separate node template for node types, addthis is not coming in the $content variable.

Need a solution for this.

matglas86’s picture

Title: [] AddThis 7.x-4.x » [meta] AddThis 7.x-4.x
Priority: Critical » Normal

@agudivad please repost this as a seperate Issue. This issue is used for a different purpose.
Thanks.

matglas86’s picture

Issue summary: View changes

Added link for specific url sharing issue.