PDA

View Full Version : PHP Photo Album Navbar Positioning



Kritter5x
12-07-2011, 04:36 AM
1) Script Title:
PHP Photo Album script v2.11

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm

3) Describe problem:
I would like to be able to move the Navbar in this from the bottom of the gallery to the top. Everything else I have been able to work out on my own, but so far the ability to move the Navbar/Page Numbers has eluded me.

Any help would be appreciated. Apologies if this is in the wrong section or has been answered before, I have already searched this forum and found nothing that helps.

jscheuer1
12-07-2011, 05:01 AM
OK, on your page you have something like:


<script type="text/javascript">

new phpimagealbum({
albumvar: myvacation, //ID of photo album to display (based on getpics.php?id=xxx)
dimensions: [3,2],
sortby: ["file", "asc"], //["file" or "date", "asc" or "desc"]
autodesc: "Photo %i", //Auto add a description beneath each picture? (use keyword %i for image position, %d for image date)
showsourceorder: true, //Show source order of each picture? (helpful during set up stage)
onphotoclick:function(thumbref, thumbindex, thumbfilename){
thumbnailviewer.loadimage(thumbref.src, "fit2screen")
}
})

</script>

Just add the highlighted:


<script type="text/javascript">

new phpimagealbum({
albumvar: myvacation, //ID of photo album to display (based on getpics.php?id=xxx)
dimensions: [3,2],
sortby: ["file", "asc"], //["file" or "date", "asc" or "desc"]
autodesc: "Photo %i", //Auto add a description beneath each picture? (use keyword %i for image position, %d for image date)
showsourceorder: true, //Show source order of each picture? (helpful during set up stage)
onphotoclick:function(thumbref, thumbindex, thumbfilename){
thumbnailviewer.loadimage(thumbref.src, "fit2screen")
}
})
;(function(){
var paginate = document.getElementById('phpphotoalbum1_paginate'), album = document.getElementById('phpphotoalbum1');
album.parentNode.insertBefore(paginate, album);
})();
</script>

Notes:

Don't miss the preceding semi-colon (red).

This would be for the first and/or only PHP Photo Album on the page. If you have more than one, each successive Album needs the number 1 (two places) in the above added code incremented.

Kritter5x
12-07-2011, 05:04 AM
Thanks a lot! Works like a charm. :)