From 89bced737a58b8839fc7bc273d6f08ab3c263783 Mon Sep 17 00:00:00 2001 From: Benjamin Johnson Date: Wed, 27 May 2009 22:37:36 +0100 Subject: [PATCH] fix addthis to only insert one script tag --- httpdocs/sites/all/modules/addthis/addthis.module | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/httpdocs/sites/all/modules/addthis/addthis.module b/httpdocs/sites/all/modules/addthis/addthis.module index 1237a6e..6b5a019 100644 --- a/httpdocs/sites/all/modules/addthis/addthis.module +++ b/httpdocs/sites/all/modules/addthis/addthis.module @@ -132,6 +132,7 @@ function _addthis_create_button($node=NULL, $teaser = FALSE) { * Theme the AddThis button. */ function theme_addthis_button($node, $teaser) { + static $has_script = FALSE; if (variable_get('addthis_dropdown_disabled', '0')) { return ( sprintf(' - - ', + onclick="return addthis_sendto()">', $teaser ? url('node/'. $node->nid, array('absolute' => 1) ) : '[URL]', $teaser ? addslashes($node->title) : '[TITLE]', $_SERVER['HTTPS'] == 'on' ? addslashes(variable_get('addthis_image_secure', 'https://secure.addthis.com/button1-share.gif')) : addslashes(variable_get('addthis_image', 'http://s9.addthis.com/button1-share.gif')), addslashes(variable_get('addthis_image_width', '125')), addslashes(variable_get('addthis_image_height', '16')), - variable_get('addthis_image_attributes', 'alt=""'), - $_SERVER['HTTPS'] == 'on' ? 'https://secure.addthis.com' : 'http://s7.addthis.com' - )); + variable_get('addthis_image_attributes', 'alt=""') + ); } } -- 1.6.0.4