When multiple addthis buttons are on a single page they each come with their own script tag. This patch only includes the tag once in the head.

Not sure you want this one as the code isn't the cleanest, I took the google analytics module approach to workaround the lack of support for external js in drupal_add_js(). Works a treat on my site though as I have an addthis button next to each content item.

Comments

benpjohnson’s picture

Version: 6.x-2.x-dev » 6.x-2.8
StatusFileSize
new2.23 KB

I've updated this patch for 6.28 after finally getting my patch management system in order.

vesapalmu’s picture

Status: Patch (to be ported) » Fixed

Thank you for the patch. However we already have a counter variable $_addthis_counter for keeping track on how many buttons we have on a single page. I reimplemented your patch for latest dev version on slightly different way. Some changes are still not quite ready, but I will commit a new version soon.

benpjohnson’s picture

Great thanks!

One more patch I don't need to worry about :)

vesapalmu’s picture

Next version with this issue fixed in it will be out on next week. Sorry about the delay.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.