"The Get the Button code provided by ShareThis. If this is not given, the default one will be used."
I created a custom button at http://www.sharethis.com but am then given two pieces of code, one to go in and one to go in . What of this code do I enter at /admin/settings/sharethis in the single code entry area?
I tried the supplied code and bad things happened.
I tried the supplied code and bad things happened.
I will explain "bad things" further if necessary, but it shouldn't be.
Comments
Comment #1
hmmdinger commentedi have figured out that the admin area of this module is only set up for code for the more basic ShareThis button, for which there is only one chunk of code.
I had been trying to implement the "Multiple Icons" form of the button, which seems to generate two chunks, and would therefore involve directly modifying the module code.
The different button options can be seen at http://sharethis.com/publishers/getbutton
I am recategorizing this as a feature request to add support for the Multiple Icons version of the widget.
Comment #2
slicedsoup commentedI'd like to second that feature request. Also the documentation regarding the code that should be used from the STAPI should be updated to state which piece of code can and should be used and what limitations there are currently regarding the use of multiple icons. Adding the wrong piece of code gave me a white screen.
Comment #3
slicedsoup commentedIt seems that the current development version offers a solution to provide multiple buttons.
Comment #4
yrre7 commentedsubscribe
Comment #5
ycwjjjj commentedsubscribe
Comment #6
LPecunia commentedsubscribe
Comment #7
Macronomicus commentedYou could put the js code in the header of your page.tpl and the other code in your node.tpl with some properly limiting if statements and be done with it no modules needed, done in 5 min.
Comment #8
Matt Giacomazzo commentedsubscribe
Comment #9
makangus commentedI ended up following #7 @macrocosm
More specifically, I put the javascript in page.tpl.php and the following code in node_content-type.tpl.php
Comment #10
mareczko commentedHi I'm new, never have programmed in php, so sorry for stupid questions!
I followed #9 makangus, and it worked fine, although I would like icons not to appear in teasers, only in full view of the mode.
How to accomplish it?
I tried putting ($page) (found this node.tpl handbook): in
global $base_url;, so i ended with:but it didn't work out.
Could you give me any hint?
thanks in advance!
Comment #11
mareczko commentedI managed it myslef!.
In order to display share icons only in full view of a node you 've got to add
to your code. So the code of node.tpl.php finally looks like that in my case (notice, that I've changed few of the icons...):
print $base_url . $node_url; " st_title="
print $title;"> print $base_url . $node_url; " st_title="print $title;"> print $base_url . $node_url; " st_title="print $title;"> print $base_url . $node_url; " st_title="print $title;"> print $base_url . $node_url; " st_title="print $title;">endif;Comment #12
mareczko commentedI managed it myslef!.
In order to display share icons only in full view of a node you 've got to add
Comment #13
xeraseth commentedUsing the code from #12 (well edited since he kind of messed up the code tag I get this when I go to share a URL
http://www.facebook.com/sharer.php?u=http://shar.es/Xad5e&t=Wedding+Invi...
By looking at other share links the "http://shar.es/Xad5e&t=" should be the url of my site.
Here is the code in my node.tpl
and the code in the header of the page.tpl
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher:'feb099f8-36bd-4810-be4e-1b6c646b6bac'});</script>Comment #14
shaneonabike commented+1 I agree it's not that flexible and being able to add more buttons or having it more flexible seems to make sense. I ended up not using this module in the end.
Comment #15
jvalencia commentedI would recommend using the backport from Drupal 7:
http://drupal.org/node/1253794
Comment #16
avpadernoI am closing this issue, as Drupal 6 is no longer supported.