Created
August 21, 2011 15:23
-
-
Save divineslight/1160739 to your computer and use it in GitHub Desktop.
Simple code for social bookmarking snippet in PHP for Google+1, Twitter and FB.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function lph_social_bookmarking( $url ) | |
{ | |
echo | |
'<div class="social_bookmarking"> | |
<!-- Facebook Share --> | |
<div class="social_bookmark facebook"> | |
<div id="fb-root"></div> | |
<script src="http://connect.facebook.net/en_US/all.js#appId=112150088882944&xfbml=1"></script> | |
<fb:like href="'.$url.'" send="false" layout="box_count" width="50" show_faces="false" colorscheme="light" font=""></fb:like> | |
</div> | |
<!-- Google +1 button --> | |
<div class="social_bookmark"> | |
<g:plusone size="tall"></g:plusone> | |
</div> | |
<!-- Twitter share --> | |
<div class="social_bookmark twitter"> | |
<a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical">Tweet</a> | |
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> | |
</div> | |
</div>'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div.social_bookmarking | |
{ | |
float: right; | |
position: relative; | |
top: -65px; | |
} | |
div.social_bookmarking div.social_bookmark | |
{ | |
float: left; width: 50px; margin-right: 10px; | |
} | |
div.social_bookmarking div.twitter | |
{ | |
width: 55px; | |
} | |
div.social_bookmarking div.facebook | |
{ | |
width: 47px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Any idea why my code.php is not syntax highlighted? :/