This is a simple unstyled side panel which will display a Tweet button, Follow (twitter) button, Google+1 button and a Like button.
You will need to change "my_twitter_name" to yours for the follow button to work.
You may need to style it to fit in your theme, but it should work np
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]
if (!function_exists("fetch_url"
) {
function fetch_url() {
$url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
return $url;
}
}
add_to_footer("<script type='text/javascript' src='https://apis.google.com/js/plusone.js'></script>"
;
openside("Social"
;
// Tweet/ Follow
echo "<a href='http://twitter.com/share' class='twitter-share-button' data-count='horizontal'>Tweet</a>\n<br />\n<br />\n";
echo "<a href='http://twitter.com/my_twitter_name' class='twitter-follow-button' data-show-count='true'>Follow</a>\n<br />\n";
echo "<script type='text/javascript' src='http://platform.twitter.com/widgets.js'></script>\n";
echo "<br />\n";
// Google +1
echo "<div class='g-plusone' data-size='medium' data-count='true'></div>\n";
echo "<br /><br />\n";
// Like
echo "<iframe src='https://www.facebook.com/plugins/like.php?href=".$url."' scrolling='no' frameborder='0' style='border:none; width:450px; height:80px'></iframe>\n";
closeside();[/syntaxhighlighter]