Add This

I created this page to test scripts published by http://addthis.com. It was originally created on the Qube. See below, Early Experiments for what I wrote at the time, all probably useless now. I have installed their widget and so even lower down on this page, after the article , are add this’s sharing buttons. I returned to the issues they answer in Feb 2015. It should be noted that at that time on the blog I use custom code implemented in the child theme, since I moved to Nulis I am using a vanilla implementation of Add This, on the wiki.

add this logo

Addthis published some hints as to how to encourage sharing, with their widgets of course! One of the features they claim to offer is the personalisation of the sharing widgets, so that readers chose more easily which social networks they use. At the moment, the + buttons on the index are not offering what I want for casual visitors. If I login, I get offered the services I want. Still some work to do. 27 March 2014

WordPress Integration

I have added this to blog.davelevy.info.  You can add to the button list as preferred or explicit. I have the single pages as explicit and the index pages as preferred. I think the preferences are as the reader specifies which has its advantages. However this needs to be fixed. I’d also like to have the vote this up button on the same line as the buttons. 23 March 2014

In March 2014, I installed the wordpress addthis plugin. Addthis’ wordpress plugin has several automatic display widgets, I have turned these off and use custom settings implmented as php in my child theme directory. This has involved amending single.php and index.php. Single.php code comes from the addthis site, the code in index.php is custom. The index page has a single badge with the share sites behind it. The code is;

  
<a style="text-align: right; float: right; margin-right: 4px;" title="Share with add this"></a>

The code on single.php comes from the addthis site.

     <!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
     <a class="addthis_button_facebook"></a>
     <a class="addthis_button_twitter"></a>
     <a class="addthis_button_google_plusone_share"></a>
     <a class="addthis_button_delicious"></a>
     <a class="addthis_button_email"></a>
     <a class="addthis_button_print"></a>
     <a class="addthis_button_compact"></a>
</div>

Early Experiments

The add this code, used to look like this, where the target was an owned HTML site…

<!-- AddThis Button BEGIN -->
<SCRIPT TYPE="text/javascript">
    addthis_pub  = 'davelevy';
    addthis_options  =  'favorites, email, delicious, twitter, google, technorati, more';
</SCRIPT>

<A HREF="http://www.addthis.com/bookmark.php"
 ONMOUSEOVER="return addthis_open(this, '', '[URL]', '[TITLE]')"
 ONMOUSEOUT="addthis_close()" ONCLICK="return addthis_sendto()"><IMG
SRC="http://s9.addthis.com/button1-share.gif" WIDTH="125" HEIGHT="16"
BORDER="0" ALT="" TITLE="share this"></A> 

<SCRIPT TYPE="text/javascript" SRC="http://s7.addthis.com/js/152/addthis_widget.js" TITLE="share this"></SCRIPT>

<!-- ADDTHIS BUTTON END -->

The URL & TITLE are only required if not the values of the current page. I have example code working on my static pages, see http://davelevy.info. The addthis site docuents the script parameters at this support page.

I looked into comparing this with sharethis, but can’t find my notes.

The code above implements as this,

Well, maybe not, something isn’t working right. 24 Jul 2013

This was originally published on my snipsnap bliki, it was renamed as Add This when copied on 20th June 2013. There looks like some snipsnap specific implementation syntax has been copied. I know that the URL and TITLE need to be set.

I found the following comments on the Bliki’s test page 3. To get this to work, I removed the comments which didn’t seem to work and removed the two variable definitions by inserting text values. I am not sure if this is a mandatory feature of the script, or if snipsnap is barfing over the use of [. I have hard coded the URL into this html string, and the RSS feed which required me to remove the comments, it seems that snipsnap is not keen on the –> and gets it wrong. even inside the {html} macro. 27 July 2013

Related Posts

5 thoughts on “Add This

  1. I implemented add this on this wiki over the last couple of days. I changed the page to reflect the changes made in March 2014. The 2008 stuff I have left on the main page. Perhaps I’ll relegate it to a comment next time I visit the page.

  2. I have implemented this on the blog now, I need to work out how to control the options on the index page and need to add favourites to all options. I also need to get on top of the CSS.

Leave a Reply

Your email address will not be published. Required fields are marked *