The demo site is controlleed by two handlers in the apps/demo app:
- demo/index - Creates a new user when you visit
/demo
and logs them in - demo/reset - Resets the database and files via cron
The files that are modified are:
- apps/demo - Demo handlers
- apps/admin/css/admin.css - Added styles for demo reset notice
- css/mobile.css - Added styles for demo reset notice
- css/style.css - Added styles for demo reset notice
- layouts/admin.html - Added code for demo reset notice
- layouts/default.html - Added code for demo reset notice
- layouts/index.html - Added code for demo reset notice
In addition, the css
, files
and layouts
folders are duplicated as css2
, files2
,
and layouts2
, as well as conf/navigation.json
to conf/navigation2.json
. These
are used to return those folders to their default state on each reset.
And the cron entry looks like this:
0 * * * * cd /path/to/demo/site; php index.php demo/reset