Adding a Facebook Share Button in top of the Album View in Gallery 1.5.10

X-Korpio
X-Korpio's picture

Joined: 2002-08-15
Posts: 18
Posted: Wed, 2010-02-17 23:06

Hi all, here is a simple hack that will allow you to add a Facebook Share button in top of your images in your albums

Adding this simple line:

Quote:
<p style="text-align: right;"><a name="fb_share" type="button" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>&nbsp;&nbsp;&nbsp;&nbsp; </p>

In line 472 in the view_album.php file it will add the button, the code should look like so:

Quote:
<!-- image grid table -->
<p style="text-align: right;"><a name="fb_share" type="button" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>&nbsp;&nbsp;&nbsp;&nbsp; </p>
<table border="0" cellspacing="5" cellpadding="0" width="100%" class="vatable" align="center">

Here is a demo: http://pichissound.enteratenorte.com/fotos/xvandrea

It doesnt matter the skin you are using ;) I attact my view_album.php file in this post, just download, rename from view_album.php_.txt to view_album.php and upload to your gallery root folder :D

AttachmentSize
view_album.php_.txt31.03 KB
 
bwooster

Joined: 2002-10-23
Posts: 16
Posted: Wed, 2010-03-03 21:59

Anyone have a good method to do this for the latest 1.6 RC3 code? And for a general share button, such as from addthis? Example snippet:
<!-- AddThis Button BEGIN -->
<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;username=xa-4b8edb6d2f3b333d"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4b8edb6d2f3b333d"></script>
<!-- AddThis Button END -->