Closed (won't fix)
Project:
AddThis
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
15 Sep 2008 at 00:20 UTC
Updated:
1 Oct 2008 at 05:09 UTC
Currently the url of your site is grabbed internally from drupal and results in urls like:
http://example.com/node/1
instead of:
http://example.com/interesting-post
Find this code in addthis.module (line 29):
<script type="text/javascript">a2a_linkname="'.$node->title.'";a2a_linkurl="'.$link_url.'";</script>
and replace with:
<script type="text/javascript">a2a_linkname="'.$node->title.'";a2a_linkurl=location.href;</script>
You may optionally remove the if statement switching between clean urls.
Comments
Comment #1
tseven commentedMy above solution doesn't take into account if javascript is disabled.
The following works with or without javascript:
Find
and replace with:
Comment #2
vesapalmu commentedHmm.. what version of the module are you working with? Link url is currently created this way:
In normal cases Javascript takes care of creating the URL, but in teasers absolute URL is created using internal url function in Drupal.
1.x versions of addthis module are deprecated.
Comment #3
tseven commentedOops! My bad, this fix was meant for Add to Any,...
Please forgive this embarrassing oversight.