View Full Version : Pic of the Day script?
thediablo
July 7th, 2003, 11:49 AM
anyone know a script?
with links and stuff of each pic...
the pics need to be in random order..
please help me...
thanks in advance.
Digitalosophy
July 7th, 2003, 11:55 AM
what langauge?
thediablo
July 7th, 2003, 12:19 PM
o lol!
PHP of course
:P
Digitalosophy
July 7th, 2003, 12:27 PM
lol well i'm not much of a php expert but i guess it would be the same concept in ASP.
what i would do is, create a field in your db for your images. create another one for their links, and one more for their description. simply load them randomly, or by ID, or whatever. sorry i really don't know the php code so I can't help you, but there is a start
thediablo
July 7th, 2003, 12:58 PM
o man i dont where to start here..
i dont need it to be stored in a DB..
and client told me that he needs the script to do this..
When u enter the page.
a thumbnail of humm.. 400x400 pic is displayed and when u click on that image it goes to another page with the same picture but at fullsize...
annnd the random 400x400 pic needs to change every 24hr not everytime you join the page...
i got this for the random thumbnail...
<?php
//the urls to the pics
$urls = array(
"http://www.truetere.com" ,
"http://www.moramia.com" ,
);
//the text to be displayed
$titles = array(
"pic of the day" ,
"pic of the day" ,
);
//generate a random number
//change the number in the $random to be equal to the
//number of links to display
srand(time());
$random = (rand()%2);
//display link
echo ("<a href = \"$urls[$random]\">$titles[$random]</a>");
?>
but how do i make everything else????
i still need... when the user clicks there it goes to another page with the same picture but fullsized...
and the random pic needs to change every 24hr...
please help
:hangover:
Digitalosophy
July 7th, 2003, 12:59 PM
i really don't know how to do it with php sorry
thediablo
July 7th, 2003, 01:08 PM
:hangover: no problem...
anyone else tha can helpme?
abzoid
July 7th, 2003, 09:56 PM
This is fairly simple to do with javascript, and there's no need to re-invent the wheel. Got to Google and do a search for random image javascript and you'll find dozens of cut & paste scripts to choose from.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.