Forum Moderators: coopster

Message Too Old, No Replies

Reset a Demo to original values

need to figure out a system

         

henry0

2:22 pm on Nov 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am preparing a demo for a content CMS
In order to protect against Porn, BS.. and SPAM I would like it to auto reset to its original values

Never done it before; any input?

I was thinking for example using a table for the edit demo content that will have a pre loaded demo text and a similar table that contains the original text

Now how do I make it “reset-able”

Create a cron job to DB update the demo page?
<Edit: Typo /edit>

Or?

Thanks
Regards

Henry

mincklerstraat

2:51 pm on Nov 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This sounds like a good way to do it to me. Might even be able just to use a dump of the standard table, with the option 'if table exists drop', and maybe someone here will be able to tell you how to get mysql into batch mode via cron or php to just run your dump file. Otherwise, it'd be easy enough to use
file
and just do all those queries one by one, except for the ones commented out.

You might consider doing something slightly differently for the 'users' or 'admins' table/s, if you have any and aren't just using sessions, so users aren't irritated when the cronjob runs and bumps them off, only remove entries where logintimes are x hours old.

If this is your cms, sticky me with your demo url since I like to play (and I won't leave any dirty limerecks).

henry0

3:09 pm on Nov 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for the info

good point abouthe risk of bugging an user!
the CMS is ready but not the demo
I will send it to you as soon as I will be finished
furhter that one is PHP4.3... ready; cannot remember the last # PHP updatae :)
and I am prepaping one that will be PHP5 ready
and will post it for everyone benefit.
anyway I emailed you

thanks

Henry