{"id":783,"date":"2008-08-16T10:46:26","date_gmt":"2008-08-16T10:46:26","guid":{"rendered":"http:\/\/wiki.davelevy.info\/?p=783"},"modified":"2024-11-10T20:55:24","modified_gmt":"2024-11-10T20:55:24","slug":"add-this","status":"publish","type":"post","link":"https:\/\/davelevy.info\/wiki\/add-this\/","title":{"rendered":"Add This"},"content":{"rendered":"\n<p>I created this page to test scripts published by http:\/\/addthis.com. It was originally created on the Qube. See below for early experiments for what I wrote at the time, all probably useless now. I have installed their wordpress widget and so even lower down on this page, after the article , are add this&#8217;s sharing buttons. I suppressed the plugin on my blogs some time ago, but Addthis exposed itself again when I implemented the Cronus theme in 2021.&nbsp; &#8230;.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h3 class=\"wp-block-heading\">WordPress Integration<\/h3>\n\n\n\n<p>Here are some notes in my early implementation, it&#8217;s not much use today as the plugin seems to handle it.<\/p>\n\n\n\n<p>In March 2014, I installed <a title=\"at wordpress.org\" href=\"http:\/\/wordpress.org\/plugins\/addthis\/\">the wordpress addthis plugin<\/a>. Addthis&#8217; wordpress plugin has several automatic display widgets, I have turned these off and use custom settings implemented as php in my child theme directory.&nbsp;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;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;&nbsp;\n&lt;a style=\"text-align: right; float: right; margin-right: 4px;\" title=\"Share with add this\"&gt;&lt;\/a&gt;<\/pre>\n\n\n\n<p>The code on single.php comes from the addthis site.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">     &lt;!-- AddThis Button BEGIN --&gt;\n&lt;div class=\"addthis_toolbox addthis_default_style addthis_32x32_style\"&gt;\n     &lt;a class=\"addthis_button_facebook\"&gt;&lt;\/a&gt;\n     &lt;a class=\"addthis_button_twitter\"&gt;&lt;\/a&gt;\n     &lt;a class=\"addthis_button_google_plusone_share\"&gt;&lt;\/a&gt;\n     &lt;a class=\"addthis_button_delicious\"&gt;&lt;\/a&gt;\n     &lt;a class=\"addthis_button_email\"&gt;&lt;\/a&gt;\n     &lt;a class=\"addthis_button_print\"&gt;&lt;\/a&gt;\n     &lt;a class=\"addthis_button_compact\"&gt;&lt;\/a&gt;\n&lt;\/div&gt;<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Early Experiments<\/h3>\n\n\n\n<p>The add this code, used to look like this, where the target was an owned HTML site&#8230;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;!-- AddThis Button BEGIN --&gt;\n&lt;SCRIPT TYPE=\"text\/javascript\"&gt;\n&nbsp;&nbsp;&nbsp; addthis_pub&nbsp; = 'davelevy';\n&nbsp;&nbsp;&nbsp; addthis_options&nbsp; =&nbsp; 'favorites, email, delicious, twitter, google, technorati, more';\n&lt;\/SCRIPT&gt;\n\n&lt;A HREF=\"http:\/\/www.addthis.com\/bookmark.php\"\n&nbsp;ONMOUSEOVER=\"return addthis_open(this, '', '[URL]', '[TITLE]')\"\n&nbsp;ONMOUSEOUT=\"addthis_close()\" ONCLICK=\"return addthis_sendto()\"&gt;&lt;IMG\nSRC=\"http:\/\/s9.addthis.com\/button1-share.gif\" WIDTH=\"125\" HEIGHT=\"16\"\nBORDER=\"0\" ALT=\"\" TITLE=\"share this\"&gt;&lt;\/A&gt; \n\n&lt;SCRIPT TYPE=\"text\/javascript\" SRC=\"http:\/\/s7.addthis.com\/js\/152\/addthis_widget.js\" TITLE=\"share this\"&gt;&lt;\/SCRIPT&gt;\n\n&lt;!-- ADDTHIS BUTTON END --&gt;<\/pre>\n\n\n\n<p>The URL &amp; 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 <a href=\"https:\/\/web.archive.org\/web\/20130210101410\/http:\/\/support.addthis.com\/customer\/portal\/articles\/381242-url-title\">this support page<\/a>.<\/p>\n\n\n\n<p>I looked into comparing this with sharethis, but can&#8217;t find my notes.<\/p>\n\n\n\n<p>The code above implements as this,<\/p>\n\n\n\n<p><!-- AddThis Button BEGIN -->\r\n<script type=\"text\/javascript\">\/\/ <![CDATA[\r\n    addthis_pub  = 'davelevy';\r\n    addthis_options  =  'favorites, email, delicious, twitter, google, technorati, more';\r\n\/\/ ]]><\/script>\r\n\r\n<a onclick=\"return addthis_sendto()\" onmouseover=\"return addthis_open(this, '', '[URL]', '[TITLE]')\" onmouseout=\"addthis_close()\" href=\"http:\/\/www.addthis.com\/bookmark.php\">\r\n<img loading=\"lazy\" decoding=\"async\" title=\"share this\" alt=\"\" src=\"http:\/\/s9.addthis.com\/button1-share.gif\" width=\"125\" height=\"16\" border=\"0\" \/><\/a> \r\n<!-- ADDTHIS BUTTON END --><\/p>\n\n\n\n<p>Well, maybe not, something isn&#8217;t working right. <i>24 Jul 2013<\/i><\/p>\n\n\n\n<p>This was originally published on my snipsnap bliki, it was renamed as <strong>Add This<\/strong> 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.<\/p>\n\n\n\n<p>I found the following comments on the Bliki&#8217;s test page 3.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>To get this to work, I removed the comments which didn&#8217;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 &#8211;&gt; and gets it wrong. even inside the {html} macro. <em>27 July 2013<\/em><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>I created this page to test scripts published by http:\/\/addthis.com. It was originally created on the Qube. See below for early experiments for what I wrote at the time, all probably useless now. I have installed their wordpress widget and so even lower down on this page, after the article , are add this&#8217;s sharing&#8230;<\/p>\n","protected":false},"author":1,"featured_media":2493,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_share_on_mastodon":"0"},"categories":[27,3,584],"tags":[70,1184,54,113,14,29,920,911,219,28,218],"class_list":["post-783","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","category-technology","category-wordpress-technology","tag-addthis","tag-deprecated","tag-howto","tag-internet","tag-share","tag-snipsnap","tag-software","tag-technology","tag-widget","tag-wordpress","tag-www"],"share_on_mastodon":{"url":"","error":""},"jetpack_featured_media_url":"https:\/\/davelevy.info\/wiki\/wp-content\/uploads\/2008\/08\/addthis-w650.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/783","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/comments?post=783"}],"version-history":[{"count":20,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/783\/revisions"}],"predecessor-version":[{"id":11753,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/783\/revisions\/11753"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media\/2493"}],"wp:attachment":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media?parent=783"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/categories?post=783"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/tags?post=783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}