Is there a way you can make an option to select what nodes this is visible on instead of all nodes?

Comments

vesapalmu’s picture

Status: Active » Closed (fixed)

You can do this by using AddThis block instead of showing it in node links. Disable "Display on node pages" from admin/settings/addthis and use AddThis button block at admin/build/block

armanschwarz’s picture

Version: 6.x-2.0-beta3 » 6.x-2.3

I recently installed the addthis module, and also wanted to disable it on the main page. Initially it was set up to run on each node, without the addthis block. I wanted to disable this setting so that I could add it as a block (and not display it on the main page), but when I disabled the "Display on node pages" setting, the button still appeared on the main page. I had both the "Display on node pages" disabled, as well as the block being disabled and the button still appeared. I have Drupal 6.4

I should also add that I tried clearing my browser cache as well as the drupal cache, and the button was still there.

Gerben Zaagsma’s picture

And what about making it visible only for certain node types? Is that somehow possible?

Best,
Gerben

Gerben Zaagsma’s picture

Title: Only visible on certain nodes » Only visible on certain nodes (or node types)

Got it,

On line 24 in the addthis.module file the type can be specified by changing

if ($type === 'node' && user_access('view addthis'))

to

if ($type === 'node' && ($node->type == "name-of-node-type") && user_access('view addthis'))

Gerben

vesapalmu’s picture

Please see my comment about this issue: http://drupal.org/node/309156#comment-1014399

Executive summary: I have no plans on implementing custom visibility rules to this module, but there are other ways to do this.