PHP for photo display

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
deklof
Forum Newbie
Posts: 2
Joined: Wed Oct 18, 2006 10:59 am

PHP for photo display

Post by deklof »

I hae a web site with many photos about past club events. The current implementation of the site involves a cover page full of thumbnails for each event. Clicking on the thumbnail opens another web page with the file name of the full ssize photo and the photo caption hard wired into the html page. Thus there is a photo and an html file for each photo.

I would like to use php to reduce the number of pages on the site. Specifically, I would like to have a function on the cover page that would display the full sized image and the related caption in a new window when the thumbnail was clicked, but that would not require an html page for each photo. Thus the function would take two arguments, the path to the full-sizedophoto, and a literal string containing the caption. The function would open the file in a new window and wait for the user to close the window.

I am new to php and don't know how to code such a function and how to call it from hyperlinks in the cover page.

Thanks
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

Shameless plug...

How bout trying this.
deklof
Forum Newbie
Posts: 2
Joined: Wed Oct 18, 2006 10:59 am

Post by deklof »

Thanks.
I checked out GOOP and your site. It looks great and if I was starting over from scratch I would consider it, but I already have a working site (http://www.j-a-n-e.org) including galeries that conforms to the style of the rest of the site. All I really want to do is get away from using an individual html file for each photo. These individual tmls account for about one third of the 9300 pages in my site and are all the same except the caption and the jpg file link.
Dennis
Post Reply