Hi,
Are you just wanting to offer a "share" button? If so, you could just use some Javascript. This is what I did on one of my sites:
http://waaaant.com/info-Visitors-180.htm
I just do it using this bit of JS (this example uses jQuery)
$('.shareSocial').click( function() {
var what = $(this).attr('rel');
current_title = encodeURI($(document).attr('title'));
current_href = encodeURIComponent($(location).attr('href'));
if (what == "fb") {
window.open('http://www.facebook.com/sharer.php?u=' + current_href + '&t='+current_title,'mywindow','width=400,height=200,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=yes,resizable=yes');
} else if (what == "tw") {
window.open('http://twitter.com/home?status=' + current_title + ' ' + current_href,'mywindow','width=500,height=240,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=yes,resizable=yes');
} else if (what == "gp") {
window.open('https://plus.google.com/share?url='+current_href,'Google+','height=100,width=500');
} else {
alert("unknown social?");
}
});
So then in your templates you would just do something like:
<a href="javascript:void(0);" class="shareSocial" rel="tw">Share on Twitter</a> -
<a href="javascript:void(0);" class="shareSocial" rel="gp">Share on Google+</a>
I havn't played around too much with Pintrests share method, so can't offer any help on that atm.
Hope that helps
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Are you just wanting to offer a "share" button? If so, you could just use some Javascript. This is what I did on one of my sites:
http://waaaant.com/info-Visitors-180.htm
I just do it using this bit of JS (this example uses jQuery)
Code:
// <a href="javascript:void(0);" class="shareSocial" rel="fb"> $('.shareSocial').click( function() {
var what = $(this).attr('rel');
current_title = encodeURI($(document).attr('title'));
current_href = encodeURIComponent($(location).attr('href'));
if (what == "fb") {
window.open('http://www.facebook.com/sharer.php?u=' + current_href + '&t='+current_title,'mywindow','width=400,height=200,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=yes,resizable=yes');
} else if (what == "tw") {
window.open('http://twitter.com/home?status=' + current_title + ' ' + current_href,'mywindow','width=500,height=240,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=yes,resizable=yes');
} else if (what == "gp") {
window.open('https://plus.google.com/share?url='+current_href,'Google+','height=100,width=500');
} else {
alert("unknown social?");
}
});
So then in your templates you would just do something like:
Code:
<a href="javascript:void(0);" class="shareSocial" rel="fb">Share on Facebook</a> - <a href="javascript:void(0);" class="shareSocial" rel="tw">Share on Twitter</a> -
<a href="javascript:void(0);" class="shareSocial" rel="gp">Share on Google+</a>
I havn't played around too much with Pintrests share method, so can't offer any help on that atm.
Hope that helps
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!