*** addthis.admin.inc Thu Jan 15 01:12:56 1970 --- addthis.admin.inc Thu Jan 15 01:12:56 1970 *************** *** 37,42 **** --- 37,48 ---- '#default_value' => variable_get('addthis_display_in_teasers', '0'), '#description' => t('Display an AddThis button in the node teasers.'), ); + $form['addthis_general_settings']['addthis_exclude_from_display'] = array( + '#type' => 'textarea', + '#title' => t('Exclude from displaying on these nodes'), + '#default_value' => variable_get('addthis_exclude_from_display', ''), + '#description' => t('Enter one page per line as Drupal paths'), + ); $form['addthis_button_settings'] = array( '#type' => 'fieldset', *** addthis.module Thu Jan 15 01:12:56 1970 --- addthis.module Thu Jan 15 01:12:56 1970 *************** *** 20,27 **** --- 20,34 ---- */ function addthis_link($type, $node=NULL, $teaser = FALSE) { $links = array(); + $exclude = explode("\n", variable_get('addthis_exclude_from_display')); if ($type === 'node' && user_access('view addthis')) { + foreach ($exclude as $path) { + $nid = trim(substr($path, 5)); + if ($node->nid == $nid) { + return $links; + } + } if (($node && variable_get('addthis_nodetype_' . $node->type, 1)) && (($teaser && variable_get('addthis_display_in_teasers', '0')) || (!$teaser && variable_get('addthis_display_in_links', '0')))) {