Log in

View Full Version : 'Tip of the Day' toughts


MrNase
12-16-2004, 07:06 AM
Hello,

I plan to make a modifiction where you can display something like 'Tip of the Day' on top of your forums.

Everything should be in a small box and it should contain small tips like 'Smileys make your posts look friendly' or 'You can use bbcode to format your posts'.

The tips should be displayed randomly. The only thing I worry is about the way how to save the entries... By now I plan to use a plain textfile which stores any tip:


This is tip number 1.
*********
This is tip number 2.
*********
I guess you know what tip this is.
*********


Do you think thats faster than a query? Remember: The tip is read out of the database or textfile everytime one reloads the forums. I plan to disable it for guests (or spiders) but Iam afraid of the server load.

Xenon
12-18-2004, 12:54 PM
actually a tip of the day should just change once a day, so i'd save all tips into the db, and then run a vb cron once a day to store one tip into the datastore cache, and then just always access the cached value :)

MrNase
12-19-2004, 05:10 PM
Well ok.. A tip of the day should actually change once a day :D

I plan to do some sort of random tip which changes from reload to reload :)

Boofo
12-20-2004, 07:59 AM
Well ok.. A tip of the day should actually change once a day :D

I plan to do some sort of random tip which changes from reload to reload :)
I do a 10 minute quote on my site and I use the db for it. It's fast and only one query every 10 minutes to insert it into the datastore and uses no query to read it. ;)