Having gone through various posts on this subject I came up with this, posted without warranty in case it is found to be useful.
Go to http://sharethis.com/publishers/get-sharing-tools and get the buttons, you will get code for the bottom of the page and code for where you want the buttons. You can sign in with your Google account.
Two ways to do it:
Number one.
Place the buttons in the product layout so people can like each product. Seems to work best with one product per section.
Put this at the bottom of the page before the analytics code:
Put this in the product layout:
Put this in the <head></head> area:
Number Two
The buttons go at the top of each website page, in which case the header tags need to be different for brochure, section and product pages.
Again, this goes at the bottom of the page before the analytics code:
This goes at the top of the page outer layout somewhere:
This goes in the <head></head> area:
It seems to work, no doubt people can correct, adapt and evolve it.
Thanks
Go to http://sharethis.com/publishers/get-sharing-tools and get the buttons, you will get code for the bottom of the page and code for where you want the buttons. You can sign in with your Google account.
Two ways to do it:
Number one.
Place the buttons in the product layout so people can like each product. Seems to work best with one product per section.
Put this at the bottom of the page before the analytics code:
Code:
<actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e%20%3d%3d%20False"> <script type="text/javascript">var switchTo5x=true;</script> <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> <script type="text/javascript">stLight.options({publisher: "your-long-code-number-here"}); </script> </actinic:block>
Code:
<span class='st_sharethis'></span><span class='st_facebook'></span><span class='st_twitter'><span class='st_googleplus'></span></span><span class='st_linkedin'></span><span class='st_email'></span><span class='st_fblike'></span>
Code:
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22" > <actinic:block type="ProductList" /> <actinic:block if="%3cactinic%3avariable%20name%3d%22ListIndex%22%20%2f%3e%20%3d%3d%201"> <meta property="og:title" content="<actinic:variable encoding="strip" name="PageTitle" />" /> <meta property="og:type" content="product" /> <script type="text/javascript"> document.write ('<meta property="og:url" content="'+window.location+'" />'); </script> <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductImageFileName%22%20%2f%3e%20%21%3d%20%22%22"> <meta property="og:image" content="<actinic:variable name="CatalogURL" /><actinic:block php="true" >$path_parts = pathinfo('<actinic:variable name="ProductImageFileName" encoding="perl" selectable="false" />');echo $path_parts['basename'], "\n";</actinic:block>" /> </actinic:block> <meta property="og:site_name" content="Like Button Test" /> <meta property="fb:admins" content="your-facebook-id-number" /> </actinic:block> </actinic:block> </actinic:block>
The buttons go at the top of each website page, in which case the header tags need to be different for brochure, section and product pages.
Again, this goes at the bottom of the page before the analytics code:
Code:
<actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e%20%3d%3d%20False"> <script type="text/javascript">var switchTo5x=true;</script> <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> <script type="text/javascript">stLight.options({publisher: "your-long-code-number-here"}); </script> </actinic:block>
Code:
<div style="padding-top:5px;float:right;"><span class='st_sharethis'></span><span class='st_facebook'></span><span class='st_twitter'><span class='st_googleplus'></span></span><span class='st_linkedin'></span><span class='st_email'></span><span class='st_fblike'></span></div>
Code:
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Brochure%22" > <!--*brochure--> <meta property="og:title" content="<actinic:variable name="CompanyName" /> <actinic:variable encoding="strip" name="PageTitle" />" /> <meta property="og:type" content="product" /> <script type="text/javascript"> document.write ('<meta property="og:url" content="'+window.location+'" />'); </script> <meta property="og:image" content="<actinic:variable name="CatalogURL" /><actinic:variable name="CompanyLogoFileName" />" /> <meta property="og:site_name" content="Like Button Test" /> <meta property="fb:admins" content="your-facebook-id-number" /> <meta property="og:description" content="<actinic:block if="%3cactinic%3avariable%20name%3d%22MetaDescription%22%20%2f%3e%20%21%3d%20%22%22" ><actinic:variable name="MetaDescription" /></actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22MetaDescription%22%20%2f%3e%20%3d%3d%20%22%22" ><actinic:variable name="GlbMetaDescription" /></actinic:block>" /> </actinic:block> <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22" > <!--*section--> <meta property="og:title" content="<actinic:variable name="SectionName" />" /> <meta property="og:type" content="product" /> <script type="text/javascript"> document.write ('<meta property="og:url" content="'+window.location+'" />'); </script> <meta property="og:image" content="<actinic:variable name="CatalogURL" /><actinic:block php="true" >$path_parts = pathinfo('<actinic:variable name="SectionImageFileName" />');echo $path_parts['basename'], "\n";</actinic:block>" /> <meta property="og:site_name" content="Like Button Test" /> <meta property="fb:admins" content="your-facebook-id-number" /> <meta property="og:description" content="<actinic:block if="%3cactinic%3avariable%20name%3d%22SectionDescription%22%20%2f%3e%20%21%3d%20%22%22" ><actinic:variable name="SectionDescription" /></actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22MetaDescription%22%20%2f%3e%20%21%3d%20%22%22%20%20AND%20%3cactinic%3avariable%20name%3d%22SectionDescription%22%20%2f%3e%20%3d%3d%20%22%22" ><actinic:variable name="MetaDescription" /></actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22MetaDescription%22%20%2f%3e%20%3d%3d%20%22%22%20%20AND%20%3cactinic%3avariable%20name%3d%22SectionDescription%22%20%2f%3e%20%3d%3d%20%22%22" ><actinic:variable name="GlbMetaDescription" /></actinic:block>" /> </actinic:block> <actinic:block if="%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Product%20Page%22%29" > <!--*product page--> <meta property="og:title" content="<Actinic:Variable Name="ProductName"/>" /> <meta property="og:type" content="product" /> <script type="text/javascript"> document.write ('<meta property="og:url" content="'+window.location+'" />'); </script> <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductImageFileName%22%20%2f%3e%20%21%3d%20%22%22"> <meta property="og:image" content="<actinic:variable name="CatalogURL" /><actinic:block php="true" >$path_parts = pathinfo('<actinic:variable name="ProductImageFileName" encoding="perl" selectable="false" />');echo $path_parts['basename'], "\n";</actinic:block>" /> </actinic:block> <meta property="og:site_name" content="Like Button Test" /> <meta property="fb:admins" content="your-facebook-id-number" /> <meta property="og:description" content="<actinic:block if="%3cactinic%3avariable%20name%3d%22ProductDescription%22%20%2f%3e%20%21%3d%20%22%22"><actinic:variable name="ProductDescription" /></actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22ProductPageMetaDescription%22%20%2f%3e%20%21%3d%20%22%22%20%20AND%20%3cactinic%3avariable%20name%3d%22ProductDescription%22%20%2f%3e%20%3d%3d%20%22%22" ><actinic:variable name="ProductPageMetaDescription" /></actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22ProductPageMetaDescription%22%20%2f%3e%20%3d%3d%20%22%22%20%20AND%20%3cactinic%3avariable%20name%3d%22ProductDescription%22%20%2f%3e%20%3d%3d%20%22%22" ><actinic:variable name="GlbMetaDescription" /></actinic:block>" /> </actinic:block>
Thanks
Comment