View Full Version : PHP Photo Album I'm not getting all my images!

09-18-2008, 04:10 AM
1) Script Title: PHP Photo Album

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

3) Describe problem: I have installed the script and it seems to work ok, however I have a total of 58 images in my file and I only get a fraction of the
I have set the dem var as such

var dimension="3x10" //Specify dimension of gallery (number of images shown), such as 4x2, 3x1 etc

I take this to mean how many images will be displayed on each page. what I get is image # 4,5,6 then 10,11,12 so esentially I loose the first 3 images and get three and loose three and on.

I have not changed anything else except the basics IE file locations ect

Can anyone help?

09-18-2008, 04:25 AM
I'm thinking that the images are there, but you cannot see them - something to do with your layout and/or styles. To be certain:

Please post a link to the page on your site that contains the problematic code so we can check it out.

It could be something else, but to figure out what, I would still need to see the problem page.

09-18-2008, 04:29 AM
here is the link:


you ill need this also

[passwords deleted as per user request]

please delete this after use!

09-18-2008, 05:49 AM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- DW6 -->

<style type="text/css">

.slideshow{ /*CSS for DIV containing each image*/
float: left;
margin-right: 10px;
margin-bottom: 10px;

.slideshow img{ /*CSS for each image tag*/
border: inset #9933FF;
width: 241px;
height: 200px;

#navlinks{ /*CSS for DIV containing the navigational links*/
width: 400px;

#navlinks a{ /*CSS for each navigational link*/
margin-right: 8px;
margin-bottom: 3px;
font-size: 110%;

#navlinks a.current{ /*CSS for currently selected navigational link*/
background-color: #000000

<link rel="stylesheet" href="../../thumbnailviewer.css" type="text/css" />

<script src="../../thumbnailviewer.js" type="text/javascript">

* Image Thumbnail Viewer Script- Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code

<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>Hope Set 2</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../mm_entertainment.css" type="text/css" />
<style type="text/css">
.style1 {color: #000000}
.style3 {color: #FF1473}
.style5 {
color: #FFFFFF;
font-weight: bold;
font-size: 16px;
font-family: Geneva, Arial, Helvetica, sans-serif;
.style6 {
color: #000000;
font-size: 12px;
.style7 {
color: #FFFFFF;
font-size: 10px;
.style9 {
color: #FFFFFF;
font-weight: bold;
.style10 {color: #FFFFFF}
.style12 {color: #CCCCCC}
<script type="text/JavaScript">

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
<script src="../../Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<body style="margin:40px 0 0 100px;" bgcolor="#000000" >
<table width="810" border="10" cellpadding="4" cellspacing="4" bordercolor="#FFFFFF">
<td width="368"><span class="sidebarHeader"><img src="../../tour package/Images/Model images/Hope/name on girls page.png" alt="Model Name" width="225" height="75" align="left" /></span></td>
<td width="800"><div align="center"><img src="../../Images/Banner.jpg" alt="banner" width="500" height="132" /></div></td>
<td colspan="2" nowrap="nowrap"><br />
<script src="Images/Set2/getpics.php" type="text/javascript"></script>

<script type="text/javascript">

* PHP Photo Album script- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use

var dimension="3x10" //Specify dimension of gallery (number of images shown), such as 4x2, 3x1 etc
var imagepath="/Members_area/Hope/Images/Set2/" //Absolute path to image directory. Include trailing slash (/)
var href_target="new" //Enter target attribute of links, if applicable

//Toggle popup link setting: popupsetting[0 or 1, "pop up window attributes" (if 1)]
var popupsetting=[0, "width=500px, height=400px, scrollbars, resizable"]

//Toggle image description: descriptionprefix[0 or 1, "Text to show" (if 1)]
var descriptionprefix=[1, "Hope Set 2 - "]

//Sort images by date? ("asc", "desc", or "")
//"desc" for example causes the newest images to show up first in the gallery
//"" disables this feature, so images are sorted by file name (default)
var gsortorder="asc"

//By default, each image hyperlinks to itself.
//However, if you wish them to link to larger versions of themselves
//Specify the directory in which the larger images are located
//The file names of these large images should mirror those of the original
//Enter a blank string ("") to disable this option
var targetlinkdir=""

/////No need to edit beyond here///////////////////

function sortbydate(a, b){ //Sort images function
if (gsortorder=="asc") //sort by file date: older to newer
return new Date(a[1])-new Date(b[1])
else if (gsortorder=="desc") //sort by file date: newer to older
return new Date(b[1])-new Date(a[1])

if (gsortorder=="asc" || gsortorder=="desc")

var totalslots=dimension.split("x")[0]*dimension.split("x")[1]

function buildimage(i){
var imagecompletepath=(targetlinkdir!="")? targetlinkdir+galleryarray[i][0] : imagepath+galleryarray[i][0]
var tempcontainer='<a href="'+imagecompletepath+'" target="'+href_target+'" onClick="return popuplinkfunc(this)">'
tempcontainer+='<img src="'+imagepath+galleryarray[i][0]+'" title="'+galleryarray[i][0]+' ['+galleryarray[i][1]+']" />'
tempcontainer+='</a><br />'
tempcontainer+=(descriptionprefix[0]==1)? descriptionprefix[1]+(i+1) : ""
return tempcontainer

function jumptopage(p){
var startpoint=(p-1)*totalslots
var y=1;
for (i=0; i<totalslots; i++){
document.getElementById("slide"+i).innerHTML=(typeof galleryarray[startpoint+i]!="undefined")? buildimage(startpoint+i) : ""

var curimage=0
for (y=0; y<dimension.split("x")[1]; y++){
for (x=0; x<dimension.split("x")[0]; x++){
if (curimage<galleryarray.length)
document.write('<div id="slide'+curimage+'" class="slideshow">'+buildimage(curimage)+'</div>')
document.write('<br style="clear: left" />')

function popuplinkfunc(imgsrc){
if (popupsetting[0]==1){
var popwin=open(imgsrc.href, "popwin", popupsetting[1])
return false
return true


<!--Below HTML code refers to the navigational links for the gallery-->

<div id="navlinks">
<script type="text/javascript">
for (i=1; i<Math.ceil(galleryarray.length/totalslots)+1; i++)
document.write('<a id="navlink'+i+'" href="javascript:jumptopage('+i+')\">Page'+i+'</a> ')
<td colspan="2"><div align="right"><a href="Hope.html"><img src="../../Images/back.png" alt="Return to Models Page" width="255" height="33" border="0" align="top" /></a></div></td>
<p align="center" class="style3"><span class="style12">Copyright &copy;-2008 Electric City Models Inc..</span></p></td>


09-18-2008, 05:44 PM
Thank you very much for your help!!