PDA

View Full Version : PHP Photo Album - file name appear in popup?



aavaughan
10-10-2007, 03:20 AM
1) Script Title: DD PHP Photo Album script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...album.htm#note

3) Describe problem: increased functionality question


Hi, I posted once before and got a great response on how to change the script to where the photo file name appears beneath the photo, which allows you to do a brief description of the photo as the file name and it appears. This seemed like a logical and simple way to get an description of the photo

Please go to http://anne.swva.net/earrings.htm for my page in the works (note I haven't changed the file names to descriptions yet.)

My question is this: instead of having the file name appear on the main thumbs page, can the script be altered to have the file name appear on the enabled popup window? This allows much more room and gives more white space on the thumbs page.

THANKS in advance for help and assistance!

- AV

PS - Can anyone explain what this part of the original script does? I havent figured it out yet:

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

torrent
02-03-2008, 03:15 AM
//Toggle image description: descriptionprefix[0 or 1, "Text to show" (if 1)]
var descriptionprefix=[1, "Photo "]
It appends a number starting from one to "Photo" which is displayed below each pic.
[] [] []
Photo1 Photo 2 Photo 3


I changed mine to Screenshot and removed the 1.;)

jscheuer1
02-04-2008, 06:31 AM
You may want to look at this thread:

http://www.dynamicdrive.com/forums/showthread.php?p=116523

jscheuer1
02-04-2008, 05:26 PM
More specifically, try substituting this:


function popuplinkfunc(imgsrc){
if (popupsetting[0]==1){
var desc=imgsrc.href.replace(/^.*\/([^\.]+)\..*/,'$1');
var popwin=open('', "popwin", popupsetting[1]);
popwin.document.write('<title>'+desc+
'<\/title><body style="margin:0;padding:0;font:85% sans-serif;text-align:'+
'center;overflow:auto;background-color:#0d576d;color:white;"><img title="'+
desc+'" alt="Larger Image" style="margin:2px 0;" src="'+imgsrc.href+'"><br>'+desc);
popwin.document.close();
popwin.focus();
return false;
}
else
return true;
}

for the existing popuplinkfunc(imgsrc) function.