Topic awaiting preservation: Random Img and Text |
|
---|---|
Author | Thread |
Bipolar (III) Inmate From: Lahore, Pakistan |
posted 07-28-2003 09:25
does anyone know a script which randomly selects an img and also displays text according to the picture. like for example the script randomly selects a picture of a flower and also according to the picture displays text. i know how to make the random img script its the text thingy that confusing me |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 07-28-2003 12:57
darknosis: The simplest thing would be to have an array with the image and the text in it. I have the code here to do it in PHP but you haven't specified what language you want this in. |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 07-28-2003 13:19
Something like: code: $images = array(
|
Bipolar (III) Inmate From: Lahore, Pakistan |
posted 07-28-2003 14:34
any language will do, the thing is each img has several lines of text and a few links |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 07-28-2003 14:49
darknosis: Any? Well that will do then |
Maniac (V) Mad Scientist From: :morF |
posted 07-28-2003 15:21
Check out this one: |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 07-28-2003 15:25
hell, you could even keep this stuff as seperate files and read them into the page.. |
Maniac (V) Mad Scientist From: :morF |
posted 07-28-2003 15:55
Yeah...or you could do it that way |
Paranoid (IV) Inmate From: Den Haag, Netherlands |
posted 07-28-2003 19:47
That's how I do it for my wife's artwork .. I have 3 directories .. thumbs, images and descriptions, each containing files with the same names, (but different extensions) ... then I use PHP to read the contents of the thumbs directory and store the root-filenames in an array. From there on it's pretty simple to display them and when someone clicks on a thumbnail, to display the equivalent image and text in the boxes on the page ... |