I am using the Sky Theme and I would like to have the ShareThis icon look the same as my other Add New omment and Read More icons. So basically it will look like it does on your screenshot verses the standard ShareThis Icon. Your help is well appreciated.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | sharethis_firebug.png | 177.56 KB | crosshairs |
| #15 | sharethis-custom-icons-251893-15.patch | 594 bytes | jhedstrom |
| #14 | sharethis-custom-icons-251893-14.patch | 996 bytes | jhedstrom |
| #12 | sharethis_251893-12-custom-button-images.patch | 1.51 KB | adamdicarlo |
Comments
Comment #1
himerus commentedThis can be accomplished using CSS. The ShareThis icon is sent by the STAPI code. You can investigate the CSS being presented by the API, and adjust it accordingly to match your theme.
Comment #2
leanazulyoro commentedThis should not be managed with css, you CAN through the STAPI change the look of the sharethis icon, I've done it myself when using STAPI alone, not through this module. I used the code given by Sharethis in the head and this code where I want my custom icon:
But this code does not work if I use it in the "Share This Code" textfield that the module provides in its configuration options. It SHOULD but it doesn't. no matter if I use the "button: false" statement, it always displays the default icon.
So unless there is a way to do this that you'd like to share, I'm making this a feature request.
Comment #3
leanazulyoro commentedComment #4
leanazulyoro commentedComment #5
BigEd commentedHas anyone worked a solution for this yet?
If so could you post in here as I have tried several things from adding the script into the page.tpl file and tried to remove it using css and have got pretty close. But I still have been unable to remove just the icon and leave the link text.
Any pointers would be greatly appreciative.
Thx
Comment #6
robloachComment #7
robloachYou can change it with CSS:
Comment #8
robloachComment #9
alexkb commentedRob, The css that you set in your theme to override the css that's included by the sharethis service is also set to !important, so that has no effect.
It's a real shame that this module can't do what the module screenshot demonstrates (with no sharethis icon).
Comment #10
alexkb commentedOk, I seem to have been able to accomplish the effect demonstrated in the screenshot, by using the Node->Sharethis link field in views. Thanks!My mistake, I had the style class set wrong, that's why it showed correctly (without the image) but then the sharethis popup didn't work.
Looking at the dev version of sharethis, and service_links, it looks like it provides options not to show the icon, but the downside is, service_links is currently under heavy development, and it doesn't appear to have views integration.
Comment #11
adamdicarlo commentedMaking a CSS background image go *over* an image tag is a really dirty hack. Especially considering that the ShareThis API supports using
<span class="st_sharethis_custom"></span>in order to allow CSS to set the button icons via a background image. See http://help.sharethis.com/customization/custom-buttons.But the module doesn't allow setting that class, and it doesn't have any decent drupal_alter() openings or theme functions to allow custom code to tweak the span tag attributes.
Couldn't "Custom buttons via CSS" be an option under "Choose button style" on the admin page?
Comment #12
adamdicarlo commentedHere's a patch for 7.x-2.x to allow this.
Comment #13
adamdicarlo commentedSigh. No, that patch doesn't work right. ShareThis expects you to insert an image tag within the span when using that class. Sigh. This is a major pain....
Comment #14
jhedstromI was able to get custom icons working using a simpler patch, and custom CSS.
Comment #15
jhedstromOops, that last one had .info file information in it.
Comment #16
Jason Dean commented#15 gave me a span with class 'st_sharethis_custom', but the span is empty.
If I change the config back to horizontal counters, I get a span with class 'st_sharethis_hcount' with further markup and code inside (and the default button displays fine).
I wonder what I'm missing here?
Comment #17
crosshairs commentedThanks for the patch from #15, worked great for me!
@pushka, once you have the custom class, you need to include all the css from the 'missing' nested span tags that were there before, in order to get the new images to display correctly.
eg adding the the following css didn't work:
Adding this css does work:
Here's a screenshot (sharethis_firebug.png) of my page in Firebug showing the css from the nested span tags before applying the patch. This is what you need to add in the custom class css.
Hope this helps!
ps For some reason it's fussy and doesn't like spaces between the css properties and values. eg use
display:[NO-SPACE-HERE]inline-block;
Comment #18
crosshairs commentedI'm guessing it's not possible to customise the Facebook 'Like' button image?
Inspecting the code I see the whole thing's not actually an image, it's all done in css.
Comment #19
Jason Dean commentedhey this is really helpful. Thanks so much! :)
Comment #20
robloachThanks! Well done, everyone. http://drupalcode.org/project/sharethis.git/commit/191dac7
Comment #22
ruthverena75 commenteddoes anybody have an idea how i can get a sharethis button with a custom icon AND a horizontal counter?
Comment #23
sillo commentedHi. i tried your module patch, i got an option named "Custom buttons with CSS" , when i use your patch setting , it does not show how many shared , the counter disappears when i use your patch.
Could you please make a patch where you dont remove the counter? i like the horizontal layout with counter.
Thank you very much.
Comment #24
darktek commented@RobLoach Man you just saved my life thx so much !