drupal_add_css((drupal_get_path('module', 'addthis') .'/addthis.css'));
drupal_add_js(sprintf('
addthis_pub = \'%s\';
addthis_logo = \'%s\';
addthis_logo_background = \'%s\';
addthis_logo_color = \'%s\';
addthis_brand = \'%s\';
addthis_options = \'%s\';
addthis_disable_flash = \'%s\';
',
addslashes(variable_get('addthis_username', 'my-username')),
addslashes(variable_get('addthis_logo', 'http://www.addthis.com/images/yourlogo.png')),
addslashes(variable_get('addthis_logo_background', 'EFEFFF')),
addslashes(variable_get('addthis_logo_color', '666699')),
addslashes($brand),
addslashes(variable_get('addthis_options', 'favorites, email, digg, delicious, myspace, facebook, google, live, more')),
variable_get('addthis_options', FALSE) ? 'true' : 'false'
), 'inline');
On the code above (around line 122 of addthis.module), the last variable_get() call should be using 'addthis_disable_flash', shouldn't it?
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | addthis-6.x-2.9-B.patch | 676 bytes | jm.federico |
| #1 | addthis-js-static.patch | 931 bytes | flaviovs |
Comments
Comment #1
flaviovs commentedHere's the patch.
This patch also change the $_addthis_counter to be a static variable. There's no need for it to be global and, as everybody know, global is evil.
Also, issue priority changed to normal (was set to critical by accident).
Comment #2
dddave commentedCorrecting status.
Comment #3
jm.federico commentedI'm attaching patch against 2.9.
I removed the static variable change because I use that counter outside the module. Need it as a global.
Federico
Comment #4
vesapalmu commentedThank you. It's now part of latest 2.x dev and part of next release.