PHP Web Gallery - printing image name
Moderator: General Moderators
-
ShineDesign
- Forum Newbie
- Posts: 13
- Joined: Sat Oct 09, 2004 5:50 pm
PHP Web Gallery - printing image name
Hello Everybody,
I'm doing a website which has two files, a PHP file and a text file. The PHP file defines everything for the web gallery, (all the maintainer does is add images to a folder and the php makes the thumbnails / displayes them in a frame on the site) and the text file has all the html on how the site looks. My question is, how do I make the php and text file display the image name underneath it's respective thumbnail? (for ordering purposes...customer calls up "I'd like to order picture "bla bla bla".)
Anybody know how this can be done? For a demo, go to:
http://www.shinedesign.org/other/gallery
and for the source files:
http://www.shinedesign.org/other/gallery/zip.zip
Thanks
I'm doing a website which has two files, a PHP file and a text file. The PHP file defines everything for the web gallery, (all the maintainer does is add images to a folder and the php makes the thumbnails / displayes them in a frame on the site) and the text file has all the html on how the site looks. My question is, how do I make the php and text file display the image name underneath it's respective thumbnail? (for ordering purposes...customer calls up "I'd like to order picture "bla bla bla".)
Anybody know how this can be done? For a demo, go to:
http://www.shinedesign.org/other/gallery
and for the source files:
http://www.shinedesign.org/other/gallery/zip.zip
Thanks
-
ShineDesign
- Forum Newbie
- Posts: 13
- Joined: Sat Oct 09, 2004 5:50 pm
I'm thiking I can just echo the file name once an array is set to store all filenames.
But...
How would I do this?
I just need to echo the filename of each thumbnail underneath it's respective thumnail. My code is in the zip file http://www.shinedesign.org/other/gallery/zip.zip
two files in there.
But...
How would I do this?
I just need to echo the filename of each thumbnail underneath it's respective thumnail. My code is in the zip file http://www.shinedesign.org/other/gallery/zip.zip
two files in there.
-
ShineDesign
- Forum Newbie
- Posts: 13
- Joined: Sat Oct 09, 2004 5:50 pm
I tried posting the php, and the server gave an error everytime I submitted the post. The php is 487 lines.
Believe me, I did try to figure it out beforehand, for nearly 3 hours everyday the past 4 days. This site is due tomorrow and I need help asap.
Without posting 4 different times with the code, I made a web page listing it. If that could be looked at, it would be very much appreciated. The code can be found at:
http://www.shinedesign.org/other/gallery/php.html
From what I can gather, the image thumbs are being stored in an array when they're displayed in the html. I just don't know how to echo each individual thumb filename from the array.
Believe me, I did try to figure it out beforehand, for nearly 3 hours everyday the past 4 days. This site is due tomorrow and I need help asap.
Without posting 4 different times with the code, I made a web page listing it. If that could be looked at, it would be very much appreciated. The code can be found at:
http://www.shinedesign.org/other/gallery/php.html
From what I can gather, the image thumbs are being stored in an array when they're displayed in the html. I just don't know how to echo each individual thumb filename from the array.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
ShineDesign
- Forum Newbie
- Posts: 13
- Joined: Sat Oct 09, 2004 5:50 pm
I don't understand the "ethics" behind your decision to not help.
If a schoolroom teacher were to tell a student who had a question "I can't ethically help you with your homework" after the student had done hours upon hours of research to try and solve it himself, what good is the teacher? This forum acts as a teacher in the world of free technical advice. The least a teacher could do is point the student in the right direction, or tell him/her what topics to look under for the answer...
I find it amazing, no good deed goes unpunished. You decide to do a web gallery for free for a photographer who's displaying his work of our United States military to download and print for free, all because it's for those who put their lives on the line for our country, and yet I still can't get any help with one question that allows our soldiers to order a print from the photographer. Show some patriotism.
If a schoolroom teacher were to tell a student who had a question "I can't ethically help you with your homework" after the student had done hours upon hours of research to try and solve it himself, what good is the teacher? This forum acts as a teacher in the world of free technical advice. The least a teacher could do is point the student in the right direction, or tell him/her what topics to look under for the answer...
I find it amazing, no good deed goes unpunished. You decide to do a web gallery for free for a photographer who's displaying his work of our United States military to download and print for free, all because it's for those who put their lives on the line for our country, and yet I still can't get any help with one question that allows our soldiers to order a print from the photographer. Show some patriotism.
Last edited by ShineDesign on Sat Oct 09, 2004 6:54 pm, edited 1 time in total.
-
jabbaonthedais
- Forum Contributor
- Posts: 127
- Joined: Wed Aug 18, 2004 12:08 pm
-
ShineDesign
- Forum Newbie
- Posts: 13
- Joined: Sat Oct 09, 2004 5:50 pm
And a little help is all I'm asking for. I've stated I know the background in what I'm trying to do, it's just formulating the code to reflect those procedures that I don't yet know how to do. Just pointing me in the direction of where I can go to figure out the answer is more than enough. I hardly ever ask for help, only when it's critical and on the line. This site is due tomorrow (as the United States soldiers get shipped back out to the middle east on monday) and I've exhausted all the resources I know of so far.
I apologize if I'm asking for too much...I'm just at the point where I need "lamans" terms help with this. After 55 hours of work per week at my normal job, and doing this on the side (I first was asked to do it on wednesday) I'm extremely tired and have a headache like you wouldn't believe. The monitor doesn't help that either.
I apologize if I'm asking for too much...I'm just at the point where I need "lamans" terms help with this. After 55 hours of work per week at my normal job, and doing this on the side (I first was asked to do it on wednesday) I'm extremely tired and have a headache like you wouldn't believe. The monitor doesn't help that either.
Last edited by ShineDesign on Sat Oct 09, 2004 7:04 pm, edited 1 time in total.
-
ShineDesign
- Forum Newbie
- Posts: 13
- Joined: Sat Oct 09, 2004 5:50 pm
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
viewtopic.php?t=21887
viewtopic.php?t=23269
Were the ones I was imagining in particular. The basics of a template engine are:
A text file containing replacable "tags" of sorts where ~dynamic content can be filled in by the scripting language.
The first thread, Templating Engine, has some talk of where the template (text) file contains simple strings like {USERNAME} and {U_HOME}. You can simply use php to replace these using [php_man]str_replace[/php_man]() or if you are feeling fiesty, [php_man]preg_replace[/php_man]().
Loading the template is a simple [php_man]file_get_contents[/php_man]() like call, usually. The substitution is done normally in a linear sequence, only one time (as needed).
viewtopic.php?t=23269
Were the ones I was imagining in particular. The basics of a template engine are:
A text file containing replacable "tags" of sorts where ~dynamic content can be filled in by the scripting language.
The first thread, Templating Engine, has some talk of where the template (text) file contains simple strings like {USERNAME} and {U_HOME}. You can simply use php to replace these using [php_man]str_replace[/php_man]() or if you are feeling fiesty, [php_man]preg_replace[/php_man]().
Loading the template is a simple [php_man]file_get_contents[/php_man]() like call, usually. The substitution is done normally in a linear sequence, only one time (as needed).
-
ShineDesign
- Forum Newbie
- Posts: 13
- Joined: Sat Oct 09, 2004 5:50 pm
Thanks for the response. I've looked through the posts, but with the combination of lack of sleep mixed with a week-long headcold and a bad headache...I just can't take in all the coding to formulate the solution right now. I swear my IQ goes down at least 30 points when I'm sick...
I'll try to pick it up later if this headache goes away.
I'll try to pick it up later if this headache goes away.