TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

dynamic popup windows...

Page: 1 Reply
Sep 14th 2004#160058 Report
Member since: Jun 9th 2002
Posts: 22
Hi all,

I'm busy working on a portfolio site. It contains 100's of images, most with different sizes. I've designed a popup ( http://www.b3design.ch/fire+ice/popup.htm ). I would like that this window pops up when a thumbnail is clicked and shows the user the larger image. However, I would like a few things:

1.) The window should only be as big as the image+description, i.e: each thumbnail would have to have a custom popup size assigned to it.

2.) I would like the window to be named according to what image is showing...

Now the problem I have is the fact that I have so many images I don't want to/can't make a seperate popup document for each image. Is there a way I could have the same file which just dynamically updates itself in size, aswell as content when the user clicks a thumbnail?

I hope that made sense

Thanks for any help
Reply with Quote Reply
Sep 14th 2004#160059 Report
Member since: Feb 18th 2004
Posts: 736
This sounds like you want to record all this info into a database and use something like PHP or ASP to read the database and create the name/size on the fly.
For either, google 'asp database' or 'php mysql database'.
Reply with Quote Reply
Sep 14th 2004#160060 Report
Member since: Jun 9th 2002
Posts: 22
Thanks for the reply Galaphile. Only problem is that my server only supports php, no mysql or asp :/ Is'nt there a way I could 'call' the image size from the image and then insert it in the thumbnails code?
Reply with Quote Reply
Sep 14th 2004#160061 Report
Member since: Apr 20th 2002
Posts: 3000
The code for the popup can be generated through PHP. Using the image functions in PHP you can grab the image dimensions. Just feed all the paths to the images in an array() and have a for loop go through the values in the array and output the correct code. As for setting the title for each window, I think you should name your files so that you can just run the image path through a quick PHP script to output the correct title. (ex. name the file "Giant_Monkeys.jpg", then do str_replace("_", "  ", $filename);).
Reply with Quote Reply
Sep 14th 2004#160082 Report
Member since: Feb 18th 2004
Posts: 736
Yeah...mo0s way should work...a database would just be easier to organize.
Reply with Quote Reply
Sep 14th 2004#160084 Report
Member since: Mar 18th 2001
Posts: 6632
There is a script on www.hotscripts.com that will do this for you. All you have to do is put it in a directory and it does the rest. I can't remember what it was called, just look in the php section under image galleries or something.
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum