Index: addthis.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/addthis/addthis.admin.inc,v
retrieving revision 1.1.2.8
diff -u -p -r1.1.2.8 addthis.admin.inc
--- addthis.admin.inc 18 May 2009 16:21:36 -0000 1.1.2.8
+++ addthis.admin.inc 4 Feb 2010 02:02:22 -0000
@@ -19,6 +19,13 @@ function addthis_admin_settings() {
'#type' => 'fieldset',
'#title' => t('General settings'),
);
+ $form['addthis_general_settings']['addthis_type'] = array(
+ '#type' => 'select',
+ '#title' => t("Select what kind of button you want"),
+ '#default' => variable_get('addthis_type', ''),
+ '#options' => array(1 => t('Button'), 2 => t('Toolbox')),
+ '#description' => t('You can choose between using a button of a Toolbox, go to !addthisurl to see an example of the different options available', array('!addthisurl' => l(t('Addthis website'), 'http://addthis.com/web-button-select', $options = array('attributes' => array('target' => '_blank'))))),
+ );
$form['addthis_general_settings']['addthis_username'] = array(
'#type' => 'textfield',
'#title' => t('Username'),
Index: addthis.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/addthis/addthis.module,v
retrieving revision 1.13.2.20
diff -u -p -r1.13.2.20 addthis.module
--- addthis.module 22 Oct 2009 17:57:50 -0000 1.13.2.20
+++ addthis.module 4 Feb 2010 02:02:22 -0000
@@ -155,33 +155,50 @@ function theme_addthis_button($node, $te
));
}
- if (variable_get('addthis_dropdown_disabled', '0')) {
- return ( sprintf('
-
-
- ',
- $_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')),
- addslashes(variable_get('addthis_image_attributes', 'alt=""'))
- ));
+ if(variable_get('addthis_type', '') == 1) {
+ if (variable_get('addthis_dropdown_disabled', '0')) {
+ return ( sprintf('
+
+
+ ',
+ $_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')),
+ addslashes(variable_get('addthis_image_attributes', 'alt=""'))
+ ));
+ }
+ else {
+ return ( sprintf('
+
+
+ ',
+ $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'
+ ));
+ }
}
else {
return ( sprintf('
-
-
- ',
- $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'
+