Now addthis button respects admin display settings on both node pages and teasers 5.x-2.0-beta4
authorVesa Palmu
Wed, 24 Sep 2008 06:19:12 +0000 (06:19 +0000)
committerVesa Palmu
Wed, 24 Sep 2008 06:19:12 +0000 (06:19 +0000)
addthis.module

index 6e5075c..6d6645f 100644 (file)
@@ -22,7 +22,8 @@ function addthis_link($type, $node=NULL, $teaser = FALSE) {
   $links = array();
 
   if ($type === 'node' && user_access('view addthis')) {
-    if (! $teaser || variable_get('addthis_display_in_teasers', '0')) {
+    if (($teaser && variable_get('addthis_display_in_teasers', '0')) ||
+      (!$teaser && variable_get('addthis_display_in_links', '0'))) {
       $links['addthis'] = array(
           'title' => _addthis_create_button($node, $teaser),
           'html' => TRUE,