Thanks for the great module.
I have one problem though. The AddThis button gets added to the comment links.
I'm not sure if this was intentional. I would assume not as it's awkard.
Is it possible to disable this function or perhaps making an option in the module preferences to allow or disallow it showing in comment links?

Cheers.

Comments

accessiveapps’s picture

Assigned: Unassigned » accessiveapps
Priority: Normal » Critical

hey,

nope should be only visible at full nodes :(

I ll take a look...

Thanks,

Patrick

gausarts’s picture

You should change line 26.
Just add !$type == 'comment' to that line.

Instead of:
if (!$teaser && user_access($string)) {

Use:
if (!$teaser && !$type == 'comment' && user_access($string)) {

This will stop the module from showing on comments links. Hope that helps. Thanks for the module.

MediaMunkey’s picture

Thanks for the code fix gausarts. It certainly does take it away from the comment links.
For some reason though it also takes it away from node links. In effect I don't get the addthis button at all anymore.
Not sure why that is.

gausarts’s picture

I didn't test it thoroughly. Ignore it. Sorry.

You should instead put this line:

if ($type == 'comment') return; 

right after the first line of the second function, so it goes:

function addthis_link($type,$node=NULL, $teaser = FALSE) {
if ($type == 'comment') return; 

That should do the trick. Good luck.

MediaMunkey’s picture

Great work gausarts. Worked like a charm.
Now, if we can just get this commited...

vesapalmu’s picture

This has been fixed in version 2.0 of this module. Version 2.0 is available for Drupal 6 as fully functional beta and is expected to be released soon.

vesapalmu’s picture

Assigned: accessiveapps » vesapalmu
Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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

john t. haller’s picture

Version: 5.x-1.0 » 6.x-2.2
Status: Closed (fixed) » Active

This issue has cropped up again in the 6.x-2.2 release. The code to exclude it from comments is missing. The above fix still works:
http://drupal.org/node/247813#comment-815722

vesapalmu’s picture

Status: Active » Fixed

It seems the bug made a comeback when handling of teasers was changed. It has now been fixed in 6.x development snapshot and the fix will be included in next release.

that0n3guy’s picture

Version: 6.x-2.2 » 5.x-2.0-beta3

It doesn't appear that this is fixed in the 5x - 2.0 - beta 3 also.

vesapalmu’s picture

This has now been fixed in 5.x development snapshot. Please test the snapshot and I will roll out new version for 5.x soon.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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