Can someone direct me to a post on how to include the Facebook share icon and script?
I have searched the forums and can't find anything. There is a post by JeremyBass, but I need more instructions than provided there.
I have a handful of sites that I've created with CMS Made Simple, so I do know how to open and edit pages, themes, and stylesheets.
Here is the code I got from Facebook which would display the Facebook icon and the phrase Shrare on Facebook.
I would replace u= with u=.
I have attempted to place this code in various places and always get smarty errors.
function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+ ... height=436');return false;} html .fb_share_button { display: -moz-inline-block; display:inline-block; padding:1px 20px 0 5px; height:15px; border:1px solid #d8dfea; background:url(http://b.static.ak.fbcdn.net/rsrc.php/z ... 73uaqa.gif) no-repeat top right; } html .fb_share_button:hover { color:#fff; border-color:#295582; background:#3b5998 url(http://b.static.ak.fbcdn.net/rsrc.php/z ... 73uaqa.gif) no-repeat top right; text-decoration:none; } " class="fb_share_button" onclick="return fbs_click()" target="_blank" style="text-decoration:none;">Share
Facebook share icon
Re: Facebook share icon
This one should go to ypur stylesheet
This one goes to the top of bage body in your template
And this one - anywhere you want "share" link to apear.
You may want to create User defined tag "my_url"
and replace '' with '{my_url}'
Code: Select all
html .fb_share_button {
display: -moz-inline-block;
display:inline-block;
padding:1px 20px 0 5px;
height:15px;
border:1px solid #d8dfea;
background:url(http://b.static.ak.fbcdn.net/rsrc.php/zAB5S/hash/4273uaqa.gif) no-repeat top right;
}
html .fb_share_button:hover {
color:#fff; border-color:#295582;
background:#3b5998 url(http://b.static.ak.fbcdn.net/rsrc.php/zAB5S/hash/4273uaqa.gif) no-repeat top right;
text-decoration:none;
}
This one goes to the top of bage body in your template
Code: Select all
{literal}
<__script__ type="text/javascript">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>
{/literal}
Code: Select all
<a href="http://www.facebook.com/share.php?u=<url>" class="fb_share_button" onclick="return fbs_click()" target="_blank" style="text-decoration:none;">Share</a>
Code: Select all
return 'http://www.'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];