/    Sign up×
Community /Pin to ProfileBookmark

pic of the day

Greetings all!

How can I convert this quote of the day script to a pic of the day script?…

OR…

A script that will let me display a new pic a day from a collection of pictures…
Anyone?

var oneDay=1000*60*60*24
var dayNumber=Math.floor(new Date().getTime()/oneDay)
var myQ=new Array()

myQ[myQ.length]=”Being truthful, when you know it will cost you, is the true test of honesty”
myQ[myQ.length]=”Wonder is what sets us apart from other life forms. No other species wonders about the meaning of existence or the complexity of the universe or themselfs”

var picked=dayNumber%myQ.length
document.write(myQ[picked])

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@VladdyJun 11.2005 — Best conversion would be putting this functionality on the server side...
Copy linkTweet thisAlerts:
@ranosbauthorJun 11.2005 — Dont have SSI on my website...
×

Success!

Help @ranosb spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...