Gossamer Forum
Home : Products : DBMan : Customization :

Many pics, Only show pic one with link to others HOW?

Quote Reply
Many pics, Only show pic one with link to others HOW?
I want to have the first picture on the main page (List All) with a _blank link to a window with all the pics (or all the rest of the pics). How can this be done?

Chris
Quote Reply
Re: [jnjhost] Many pics, Only show pic one with link to others HOW? In reply to
Ae you using the short/long mod? If so there are instructions for showing 1 in the short listing and the others in the long display.

Thread title in FAQ:
Multiple Image Upload (graphic files at different positions)

----

There are also instructions for showing a link rather than the photo in the display. The thread in the FAQ is called"

Image Upload (Show link rather then photo in display)

Please check out the FAQ as you may find other solutions to try.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Many pics, Only show pic one with link to others HOW? In reply to
I'm not using the short/long. I have tweaked the html_xxx subs myself.

Quick dumb question. I have been searching for a bunch of things. Everytime I see "check the FAQ" search for X, I do that and find nothing. You are talking about the FAQ under DBMAN in resources, correct? I have yet to find anything you have referenced in many threads. I'm missing something.

Chris
Quote Reply
Re: [jnjhost] Many pics, Only show pic one with link to others HOW? In reply to
The FAQ is the one mentioned in my signature.

It is divided into topics, and when I reference title of threads, that is usually the title of the record in the database.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Many pics, Only show pic one with link to others HOW? In reply to
THANKS!

Chris
Quote Reply
Re: [LoisC] Many pics, Only show pic one with link to others HOW? In reply to
Very Helpful! I now have one page with the one pic with a link to the rest of the pics. Now I know this is a fairly simple question which I have yet to be able to find an answer.

I know if/then statements a bit. How can I use an if statement to check if there is a pic in a specific place in the array ie. if {$photo[0] == x} then y.

What do I put in 'x' to see if there is a pic in it's place?

Chris

Last edited by:

jnjhost: Feb 8, 2003, 8:16 AM
Quote Reply
Re: [jnjhost] Many pics, Only show pic one with link to others HOW? In reply to
what if you tried


if ($photo[x]) { dosomthing here }


where x= the desired position in the array

wouldn't that return either a 0 or a non-zero number? with zero meaning no photo


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."

Last edited by:

esm: Feb 8, 2003, 11:40 AM
Quote Reply
Re: [jnjhost] Many pics, Only show pic one with link to others HOW? In reply to
Code:
if (grep /^your_pic\.gif$/, @your_array) {
...we found it...
}
Quote Reply
Re: [esm] Many pics, Only show pic one with link to others HOW? In reply to
In Reply To:
what if you tried
if ($photo[x]) { dosomthing here }
where x= the desired position in the array
wouldn't that return either a 0 or a non-zero number? with zero meaning no photo


This worked! THANKS!!!

|;
if ($photo[0]) { print qq| <img src="$SAVE_DIRECTORY_URL/$rec{$db_key}/$photo[0]" height=200> |; }
if ($photo[1]) { print qq| <img src="$SAVE_DIRECTORY_URL/$rec{$db_key}/$photo[1]" height=200> |; }
if ($photo[2]) { print qq| <img src="$SAVE_DIRECTORY_URL/$rec{$db_key}/$photo[2]" height=200> |; }
if ($photo[3]) { print qq| <img src="$SAVE_DIRECTORY_URL/$rec{$db_key}/$photo[3]" height=200> |; }
if ($photo[4]) { print qq| <img src="$SAVE_DIRECTORY_URL/$rec{$db_key}/$photo[4]" height=200> |; }
if ($photo[5]) { print qq| <img src="$SAVE_DIRECTORY_URL/$rec{$db_key}/$photo[5]" height=200> |; }
print qq|

Chris
Quote Reply
Re: [jnjhost] Many pics, Only show pic one with link to others HOW? In reply to
It would be much easier to loop them.

Code:
for (@photo) {
print qq| <img src="$SAVE_DIRECTORY_URL/$rec{$db_key}/$_" height=200> |;
}