We start of first by asking you to back up your current photogallery.php, just in case you don't like the modifications once they are done. Now, open up photogallery.php from the root directory,
I want you to find the following, (its around line 52)
opentable($locale['450']);
if ($data['photo_thumb2']) $photo_thumb = PHOTODIR.$data['photo_thumb2'];
$photo_file = PHOTODIR.$data['photo_filename'];
$photo_size = @getimagesize($photo_file);
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n<td class='tbl2'>\n";
echo "<a xhref='".FUSION_SELF."'>".$locale['400']."</a> >\n";
echo "<a xhref='".FUSION_SELF."?album_id=".$data['album_id']."'>".$data['album_title']."</a> >\n";
echo "<a xhref='".FUSION_SELF."?photo_id=$photo_id'>".$data['photo_title']."</a>\n</td>\n";
if (isset($prev) || isset($next)) {
if (isset($prev)) echo "<td width='1%' class='tbl2'><a xhref='".FUSION_SELF."?photo_id=".$prev['photo_id']."' title='".$locale['451']."'><<</a></td>\n";
if (isset($next)) echo "<td width='1%' class='tbl2'><a xhref='".FUSION_SELF."?photo_id=".$next['photo_id']."' title='".$locale['452']."'>>></a></td>\n";
and you will replace this with the following, (you will have to go through and remove the highlighted 'x', cause it adds them to prevent your browser from parsing it and to show you the code!)
opentable($locale['450']);
if ($data['photo_thumb2']) $photo_thumb = PHOTODIR.$data['photo_thumb2'];
$photo_file = PHOTODIR.$data['photo_filename'];
$photo_size = @getimagesize($photo_file);
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n<td class='tbl2'>\n";
echo "<a xhref='".FUSION_SELF."'>".$locale['400']."</a> >\n";
echo "<a xhref='".FUSION_SELF."?album_id=".$data['album_id']."'>".$data['album_title']."</a> >\n";
echo "<a xhref='".FUSION_SELF."?photo_id=$photo_id'>".$data['photo_title']."</a>\n(Photo ".$data['photo_order']." of ".dbcount("(photo_id)", "photos", "album_id='".$data['album_id']."'").")</td>\n";
echo "<td width='10%' class='tbl2'>";
$prev_photo="";
$next_photo="";
$prev_result = dbquery("SELECT photo_thumb1, photo_title, photo_id FROM ".$db_prefix."photos WHERE photo_order='".($data['photo_order']-1)."' AND album_id='".$data['album_id']."'");
$next_result = dbquery("SELECT photo_thumb1, photo_title, photo_id FROM ".$db_prefix."photos WHERE photo_order='".($data['photo_order']+1)."' AND album_id='".$data['album_id']."'");
if (dbrows($prev_result) != 0) {
$prev_pic=dbarray($prev_result);
$prev_photo = "<a xhref='".FUSION_SELF."?photo_id=".$prev['photo_id']."' title='".$locale['451']."'><img xsrc='".PHOTODIR.$prev_pic['photo_thumb1']."'></a>\n";
}
if (dbrows($next_result) != 0) {
$next_pic=dbarray($next_result);
$next_photo = "<a xhref='".FUSION_SELF."?photo_id=".$next['photo_id']."' title='".$locale['452']."'><img xsrc='".PHOTODIR.$next_pic['photo_thumb1']."'></a>\n";
Further down the page, around line 61, you will see the following,
echo "<a xhref=\"javascript:;\" onclick=\"window.open('showphoto.php?photo_id=".$data['photo_id']."','','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=".($photo_size[0]+20).",height=".($photo_size[1]+20)."')\">";
echo "<img xsrc='".(isset($photo_thumb) ? $photo_thumb : $photo_file)."' alt='".$data['photo_filename']."' title='".$locale['453']."' border='0'></a>\n</div>\n";
replace that with,
echo "<table width='100%' align='center'><tr><td align='center'>".$prev_photo."</td><td align='center'><a xhref=\"javascript:;\" onclick=\"window.open('showphoto.php?photo_id=".$data['photo_id']."','','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=".($photo_size[0]+20).",height=".($photo_size[1]+20)."')\">";
echo "<img xsrc='".(isset($photo_thumb) ? $photo_thumb : $photo_file)."' alt='".$data['photo_title']."' title='".$data['photo_title']." - ".$locale['453']."' border='0'></a>\n</td><td align='center'>".$next_photo."</td></tr></table></div>\n";
and I believe that should do the trick, you can check it out at this link
http://www.theadnanahmed.com/photogallery2.php (don't worry about the errors for the comments/ratings, its another one of my modifications that I do not feel like replicating here, hehe)
That I believe that takes care of everything! So hopefully you were all able to follow this and get the changes in your file as intended. If they are any errors please do let me know via
this form.
Thanks for reading through,
Adnan.