ShareThis Forums » ShareThis Wish List

Customizing the ShareThis icon for emailing

(6 posts)
  • Started 2 months ago by Mystalic
  • Latest reply from ShareThisSupport

  1. Hey,

    First of all, I'm sure these are simple questions, but I'm new to AddThis and I'm not a Javascript programmer (I understand the basics of programming though).

    I want to create a separate ShareThis just for emailing articles. So of course I created a new button that only has email options (thus it's designed just for people to email their friends and for us to track the stats). I'm having trouble putting that together with custom code that would have the text "Email This" and an email/envelope icon.

    I'm basing a lot of the customization off of the API: http://support.sharethis.com/developers/developers-faq/stapi/62

    And lastly, is there any way to default it to "email" instead of "view all"? I know they both work the same, but it may confuse people regardless.

    Thank you so much.
    - Ben

    Posted 2 months ago #
  2. Okay, I just realized its default is "email" when you're logged out of ShareThis.

    Posted 2 months ago #
  3. Code I'm working with, though I'm certain I'm missing something simple and obvious...

    <script language="javascript" type="text/javascript">
    var object = SHARETHIS.addEntry({
    title:'Email',
    summary: 'Email this article to your friends.'},
    {button:false});
    document.write('<span id="share"><img src="http://dev.spine-health.com/sites/all/themes/spinehealth/images/widgets/printemail/emailArticleImage.gif" /></span>');

    var element = document.getElementById("share");
    object.attachButton(element);
    </script>

    The pure src for doing email:
    src="http://w.sharethis.com/widget/?tabs=email&charset=utf-8&style=default&publisher=5642cb25-f833-4b67-b390-577b7b6de0ee&headerbg=%23e08010"

    Posted 2 months ago #
  4. Hi Mystalic,

    If you are trying to have two different ShareThis buttons on a page open up to different customized widgets, this is not possible with our current product.

    If you are just trying to have a ShareThis button open up to a widget with the email tab, then the src for your query string should work.

    The .addEntry function specifies the shared content. So when a user would share something from your .addEntry function to email it would arrive as:

    Email
    [url of the page the button is hosted on]
    Email this article to your friends.

    Posted 2 months ago #
  5. I only want one sharethis on a page, I just want to change the button to say "Email This Article" to reflect our inteniton with the button.

    Actually we have an image for it. So where do I place the src in context to the overall script?

    Posted 2 months ago #
  6. The script tag and the source should go in the <head> of the body of the document. The .addEntry call will create the ShareThis button.

    Posted 2 months ago #

RSS feed for this topic

Reply

You must log in to post.