Forums  ›  General  ›  General discussions
 

How does one create a Demo site?

Thanks for the super quick reply Deano. Maybe we could also set up a demo site with a few modules installed so that people can see what they can or can't do.

It's done with cron and a linux bash shell script. Basically after a clean install and the site setup the way you want it, you would use the linux mysqldump command to create a copy of the database.

Then create a bash script that imports that database every hour using the linux mysql command called from cron. The script also needs to go through the directories that modules use to store files deleting all content except the the ones you want left there.

The site also needs a simple countdown timer in javascript that will show how long until the next reset.

I have had one of these before for demoing my dolphin modules. I need to do it again for cheetah. So i will try to get to that this weekend and provide some instructions.

For those of you familiar with the Boonex Web Site, you will recall that they had a test site that rejuvenated itself every 20 minutes. This allowed people to log on as demo using a password demo, and have a bit of fun until the site reset itself. As visitors could only use the member's area, little damage could be done, but they could upload as many as twenty photos and post the odd blog before the reset.

A reset should be relatively easy because one only needs to replace the database, but is it? What about all those Photos, blogs, videos etc, that may have been uploaded. They need to be removed as well, but the demo material needs to remain.

So how is it done? Does a Cron Job replace the database and can it do so while the site is running? Does the same Cron Job replace the data files.

I need to know because I need to build such a site for the people who are putting up obstacles about joining a new site I've just created.

Is there a routine already available, or even a fully working module that does the job?

All comments appreciated.