Forum Moderators: coopster

Message Too Old, No Replies

Joke of the day script

         

GeXus

8:43 pm on Nov 4, 2004 (gmt 0)

10+ Year Member



Does anyone know where I could find a joke of the day script? I have about 500 jokes each in an individual text file. I just want a script where I can set what directory the text files are in and have it display the content randomly, once per day.

Thanks!

ogletree

8:44 pm on Nov 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Go to G and type in joke of the day script.

Timotheos

9:02 pm on Nov 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hotscripts.com is a good one too.

GeXus

9:33 pm on Nov 4, 2004 (gmt 0)

10+ Year Member



Thanks, Yeah i tried both of those, couldnt seem to find one though.

Slade

9:42 pm on Nov 4, 2004 (gmt 0)

10+ Year Member



Do you want to pick a new joke every day, or every page load?

dreamcatcher

11:58 pm on Nov 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you thought about writing your own script?

Why not just load your jokes into an array and then just pull one random joke? Shouldn`t be too hard to do. :)

coopster

3:00 am on Nov 5, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Unless you don't know any good jokes ;)

stuntdubl

3:26 am on Nov 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You may try doing a search for "quote of the day script" also. I set one of these up once (being a clueless programmer), and I imagine it would work fine for your application too.

DaButcher

7:57 am on Nov 5, 2004 (gmt 0)

10+ Year Member



I would do as dreamcatcher said above, only here I specify a bit more how you do it:

1. Modify a dirlist script to find only the jokes..
2. Move all jokes to a /jokes/ or something..
3. Use COUNT() on the array which has the list of jokes
4. Define a start date (CONSTANT) in your script
5. Find difference between today and the startdate
6. Parse the joke[difference_between_today_and_startdate], IF difference_between_today_and_startdate <= num_of_jokes, else: start over

mcibor

7:01 pm on Nov 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Go to Google and type:
"joke of the day" +script

It's the fifth find on "search all".

Have a nice day!

[edited by: jatar_k at 5:15 pm (utc) on Nov. 7, 2004]
[edit reason] removed url [/edit]