Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-22-2002, 08:35 PM   PM User | #1
togo
New to the CF scene

 
Join Date: Jun 2002
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
togo is an unknown quantity at this point
PHP code request--gallery/popup

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
togo is offline   Reply With Quote
Old 06-22-2002, 09:02 PM   PM User | #2
Ökii
Regular Coder

 
Join Date: Jun 2002
Location: UK
Posts: 577
Thanks: 0
Thanked 0 Times in 0 Posts
Ökii is an unknown quantity at this point
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

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
__________________
Ökii - formerly pootergeist
teckis - take your time and it'll save you time.
Ökii is offline   Reply With Quote
Old 06-22-2002, 09:21 PM   PM User | #3
Ökii
Regular Coder

 
Join Date: Jun 2002
Location: UK
Posts: 577
Thanks: 0
Thanked 0 Times in 0 Posts
Ökii is an unknown quantity at this point
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
__________________
Ökii - formerly pootergeist
teckis - take your time and it'll save you time.
Ökii is offline   Reply With Quote
Old 06-22-2002, 09:30 PM   PM User | #4
togo
New to the CF scene

 
Join Date: Jun 2002
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
togo is an unknown quantity at this point
Quote:
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
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
togo is offline   Reply With Quote
Old 06-24-2002, 12:15 PM   PM User | #5
SYP}{ER
Regular Coder

 
Join Date: Jun 2002
Location: Ontario, Canada
Posts: 183
Thanks: 0
Thanked 0 Times in 0 Posts
SYP}{ER is an unknown quantity at this point
So why do you even need PHP?

This should be in the JS forums
__________________
Offtone.com - In the works...
SYP}{ER is offline   Reply With Quote
Old 12-03-2004, 02:21 PM   PM User | #6
PhilGDUK
New to the CF scene

 
Join Date: Dec 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
PhilGDUK is an unknown quantity at this point
im after the same thing basically only i need it for php.
PhilGDUK is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:06 AM.


Advertisement
Log in to turn off these ads.