Lisa, the Simpson!
December 05, 2008, 10:32 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 Add Site
 
   Home   Galleries Library Help Login Register  
Pages: [1]
  Print  
Author Topic: PHP help needed  (Read 690 times)
Andreas
Hero Member
*
Offline Offline

Gender: Male
Posts: 510

WWW
« on: December 18, 2007, 23:52 »

Since you were so great in helping me with some PHP stuff last time, I thought I might ask here again. Smile I'm looking for a simple image gallery script that allows me to browse through an image collection. Now there are probably millions of gallery script out there, and most of them are probably way too complicated for what I'm planning to do, so maybe it's just a few simple code lines for you.

What I have is an HTML page with a table that contains all image thumbnails, about 80 pics in total, named "t_picture01.jpg", "t_picture02.jpg" etc., located in a "thumbnails" subfolder. The images themselves are named "picture01.jpg", "picture02.jpg" and are located in a "photos" subfolder. Now, if you click on a thumbnail, a popup window should open and display that image. So far, so good, this is easy with HTML and some Javascript.

Now what I would like to have is a feature that allows the user to browse through the images in this popup window with "previous" and "next" links. Ideally, the script should read the current filename (or number suffix), and change the links accordingly. I. e. if someone opens the image "picture18.jpg" in that popup window, the "previous" and "next" links should link to "picture17.jpg" and "picture19.jpg".

As a "deluxe" version, it would be cool to display an image description as well, but it's not really mandatory. Of course I could do the whole stuff manually as well, by simply creating small HTML files that contain the images and matching links, but I don't really want to create some 80 HTML files for that. Wink Any suggestions?
Logged

Andreas
Dagdamor
Lisahugger
Administrator
*
Offline Offline

Gender: Male
Posts: 2567

WWW
« Reply #1 on: December 19, 2007, 02:06 »

Andreas
Doesn't sound too complex if I understood your proposal right. I will try and write something today.
* Dagdamor likes PHP despite all its contradictions... just like Flanders and Bible Eek
Logged

When the power of love overcomes the love of power, the world will know peace. - Jimi Hendrix
Gazmanafc
SMF Customiser
Hero Member
*
Offline Offline

Gender: Male
Posts: 1083

There can be only one Snake and one Big Boss
WWW
« Reply #2 on: December 19, 2007, 02:47 »

When you're done with that. I've got some code you can bite on!

In otherwords, ICQ me when you get the chance Dag, I'd like to keep the actual project I'm working on a secret until I announce otherwise. But I could do with a little help with it. Wink

Cheers.
Logged

Dagdamor
Lisahugger
Administrator
*
Offline Offline

Gender: Male
Posts: 2567

WWW
« Reply #3 on: December 19, 2007, 05:50 »

Andreas
The finished script is in the attachment. Smile
Just unpack it, upload into your site, upload some photos/thumbnails into "photos" and "thumbnails" subfolders (with appropriate filenames) and open the http://your_site/gallery/ link in the browser.

You also can specify titles and descriptions for each picture, if you want to. Just create yet another subfolder, "info", and put several text files in it, e.g. "picture01.txt", "picture02.txt". The first line in the textfile is treated as image title, everything else is treated as description. You can specify this additional information to only part of the pics; the script associates files by numbers in their filenames.

ALM
Sure, why not? I'll add you to my ICQ visible list. Good luck with catching me online, though. Tongue

* Gallery_script_for_Andreas.zip (2.52 KB - downloaded 51 times.)
Logged

When the power of love overcomes the love of power, the world will know peace. - Jimi Hendrix
Andreas
Hero Member
*
Offline Offline

Gender: Male
Posts: 510

WWW
« Reply #4 on: December 19, 2007, 09:52 »

Wow, that was fast, thanks a lot! Smile I'll play with it, and will crawl back if it doesn't work anymore. Wink
Logged

Andreas
Dagdamor
Lisahugger
Administrator
*
Offline Offline

Gender: Male
Posts: 2567

WWW
« Reply #5 on: December 19, 2007, 10:31 »

Andreas
*LOL* Aww... Big Grin
* Dagdamor gives Andreas Maggie's spare pacifier.
Hope it works, glad to be of any help Smile
Logged

When the power of love overcomes the love of power, the world will know peace. - Jimi Hendrix
Andreas
Hero Member
*
Offline Offline

Gender: Male
Posts: 510

WWW
« Reply #6 on: December 19, 2007, 10:43 »

* Dagdamor gives Andreas Maggie's spare pacifier.

Hmm, that certainly helps.  Maggie
Logged

Andreas
Andreas
Hero Member
*
Offline Offline

Gender: Male
Posts: 510

WWW
« Reply #7 on: December 20, 2007, 11:11 »

I had some time to implement your script into the website today, and it works fine. I haven't tried the description feature so far (since I have to write the descriptions first Wink ), but I was able to integrate it perfectly, and even to make it multilingual. Thanks again for your help. Smile
Logged

Andreas
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1 RC3 | SMF © 2001-2006, Lewis Media