Hi,
Site = www dot imaginart dot com dot au
I've just added the code below to includes/templates/MY TEMPLATE/templates/tpl_product_info_display.php and it seems to have worked fine for most products (e.g. if you go into 'Prints', you will find the 'Share X on Facebook' link). However, I have noticed that no 'Gift Cards' have this link. Why would it not have worked for a whole category? Also, as a side question - would there be a way of editing what is sent across to Facebook? At the moment the ID code is also sent, but it would be nice to stop this.
Thanks for any help that can be offered.
Brian
Code:
<link rel="image_src" href="<?php echo "http://" . $_SERVER['HTTP_HOST'] . "/shop/" . $products_image_medium; ?>"/>
<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><style> html .fb_share_link { padding:2px 0 0 20px; height:16px; background:url(http://b.static.ak.fbcdn.net/rsrc.php/zAB5S/hash/4273uaqa.gif) no-repeat top left; }</style><a href="http://www.facebook.com/share.php?u=<?php echo "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?" . $_SERVER['QUERY_STRING'];?>" onclick="return fbs_click()" target="_blank" class="fb_share_link">Share <strong><?php echo $products_name; ?></strong> on Facebook</a>
Bookmarks