...

View Full Version : PHP code request--gallery/popup



togo
06-22-2002, 08:35 PM
PHP code request:

I am building a website that contains several different image galleries--reptiles, birds, and mammals etc. Being graphic heavy I am displaying thumbnails of each picture. I would like the viewer to be able to click on the thumbnail to view the larger image in a popup window. I would rather not have to type the name of every large photo for every new window.

I got help with this using Javascript but cross browser issues are a pain. IE worked great -- Netscape humm

I use the same naming convention for all my photos. Large image = "image.jpg" and thumbnails = "image_thumb.jpg"

Example:
dragonfly.jpg
dragonfly_thumb.jpg

What I would like is the user to be able to click on the thumbnails, "dragonfly_thumb.jpg" etc., and a have a popup window display the larger image, "dragonfly.jpg"

Basically I need a PHP code that that I can place around my thumbnail html that will strip out the "_thumb" and opens a popup window.

Desired Popup window characteristics:

Fits to the size of the large image.
Disabled right mouse click
Disables IE 6 galleryimg
Has "close window" underneath image to close window.


My images directories that code would be pulling from

Root: pictures/envior_pics/

Different galleries folders found under envior_pics:
birds, frogs, insects, lizards, mamals, plants, snakes


I wish I could do this my self but I'm only a graphics guy.
Thanks in advance for the help you might be able to give.

Togo

Íkii
06-22-2002, 09:02 PM
There are a few image gallery systems available for PHP - try a
search on google.

I'm running one up myself - will not be at beta release for about
another week though and uses GD libs to buildrender the thumbs.

I've an old javascript popup version at this url (http://www.btinternet.com/~truesilence/okii/visages/popup.htm)

If that does what you want (it's not NS4 compat), just yell and I'll
let you know what to change to get it working for your thumbs.

Note: the GD'n'PHP one is much better :D

Íkii
06-22-2002, 09:21 PM
Couple of notes - that js version places a trans gif over the big
image, making it harder to save properly - I partly wrote it to play
with cutting strings in defined places (ie every 30 characters or
prior space - it even truncates descriptions that are too long and
adds a hyphen to any word that would take more than one line).
The window sizes to the picture automatically - basically a div
image is replaced by a small gif, the size of that is tested until it
is under 80px high, then it's replaced by the big image, then the
size of that is tested until properly returned - the window is then
sized according to that.
The table is rendered automatically - mainly all you need do is
write the descriptions and make sure the max images is exactly
divisible by the columsn.

Notes on PHP: that nice language can easily scan a directory and
build a page bsaed on the files found in it - ie, you could just put
a script in the directory and it would sniff out the images and write
a page based upon what it found. It can also read the dimensions
of images quite easily - and can (well GD libs can) read the embe-
dded thumbnail in any jpeg or tiff file as well as SOOOOOO much
more :D

togo
06-22-2002, 09:30 PM
Originally posted by Íkii

Notes on PHP: that nice language can easily scan a directory and
build a page bsaed on the files found in it - ie, you could just put
a script in the directory and it would sniff out the images and write
a page based upon what it found. It can also read the dimensions
of images quite easily - and can (well GD libs can) read the embe-
dded thumbnail in any jpeg or tiff file as well as SOOOOOO much
more :D

I understrand PHP can build a page from the files found in it. However the HTML pages with the thumbnails have already been built. My gallery is already in place. All I need is code that can be added to each thumbnail found on the HTML credited pages so a popup will open with the larger image.

--
Togo

SYP}{ER
06-24-2002, 12:15 PM
So why do you even need PHP?

This should be in the JS forums ;)

PhilGDUK
12-03-2004, 02:21 PM
im after the same thing basically only i need it for php. :confused:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum