Beta Testers: New "Public Demo Mode" feature

35 posts by 6 authors in: Forums > CMS Builder
Last Post: December 15, 2011   (RSS)

By Dave - June 8, 2009

Hi everyone,

We're working on a new feature for v1.29 that allows for "public demos". Basically how this works is you can setup CMS Builder, then put it into demoMode by changing the following value in /data/settings.dat.php:

demoMode = 1

and then the following happens:
- When a new user visits the viewers and admin program a copy of the database tables get created just for them
- This copy lasts 1 hour and then it's removed
- All the admin features are locked down (not editable)
- Uploads are disabled
- All other parts of the software can be tried

Basically this allows you (and us) to setup a public demo where anyone can try out the software without risk of breaking something on the server or entering in-appropriate content that other demo visitors might see.

Many of our customers ask for a public demo and many of you have asked for the ability to set that up safely so that's what this is for.

A lot of code changes were required for this so if anyone wants to help beta test (you must own at least 1 CMSB license) please email me at dave@interactivetools.com and post any questions here on this thread.

Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Beta Testers: New "Public Demo Mode" feature

By Dave - June 9, 2009 - edited: June 10, 2009

A few more notes on this.

Once you've setup a demo and put it in "demo mode" you can edit it again by renaming admin.php to a temporary name (such as admin2.php), then disabling demo mode, making changes, then re-enabling and renaming back.

This will prevent anyone from accessing the demo who doesn't know the temp php filename you chose.

Also, I've attached a plugin that will display "Demo Mode: Some features are disabled. Demo will reset in ## minutes." on the bottom. Just save it to cmsAdmin/lib/plugins/ and then enable it from the admin menu.

Let me know any questions or feedback.

Update: Fixed bug in plugin that caused other footer content not to show when _not_ in demo mode.
Dave Edis - Senior Developer
interactivetools.com
Attachments:

displaydemonotice.php 1K

Re: [Dave] Beta Testers: New "Public Demo Mode" feature

By Djulia - June 10, 2009

Hi Dave,

I have just made the update but I have an error message with the use of the fields of the type "list" and "Get options from database (advanced)".

Warning: Cannot modify header information - headers already sent by (output started at lib/menus/header.php:12) in lib/database_functions.php on line 560 There was an error creating the list field. MySQL Error: Incorrect table name ''

You think that it is the update which causes this error ?

I continue to explore the new function.

Thanks, Djulia

Re: [Dave] Beta Testers: New "Public Demo Mode" feature

By Djulia - June 10, 2009

Hi Dave,

I do not understand the use of the plugin.

When demoMode is 0, it is possible to activate all the plugins ( Capture 1).

But, if I place after on demoMode 1, the plugins Display Demo Notice and Footer License Link are automatically deactivated and the countdown timer is not visible ( Capture 2).

You have an idea ?
I do not find my error.

Thanks, Djulia

Re: [Djulia] Beta Testers: New "Public Demo Mode" feature

By Dave - June 10, 2009

Djulia,

Thanks for the report on "Get options from database (advanced)". Yes, that's a new bug. We'll fix it for the next beta build or here is the patch if you'd like to do it now:

- edit /cmsAdmin/lib/database_functions.php
- search for $selectTable
- replace this line:
$selectTable = "`" . $TABLE_PREFIX . $fieldSchema['optionsTablename'] . "`";

- with this line:
$selectTable = $TABLE_PREFIX . $fieldSchema['optionsTablename'];

Hope that helps! Let me know if that fixes it for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Beta Testers: New "Public Demo Mode" feature

By Djulia - June 10, 2009 - edited: June 10, 2009

Hi Dave,

"Get options from database (advanced)" is now corrected !

But, I always have the same problem with the plugin, and I do not obtain time : (...) $minutesRemaining minutes. in the footer of the admin pages.


In fact, as soon as I put in demo mode the two plugins are automatically deactivated by cmsB.

You have an idea ?

Thanks, Djulia

Re: [Djulia] Beta Testers: New "Public Demo Mode" feature

By Dave - June 10, 2009

Djulia,

That's very strange. Can you email me CMS and FTP login details to dave@interactivetools.com and I will take a look at the plugin issue for you. Note: Email, don't post login details to the forum.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Beta Testers: New "Public Demo Mode" feature

By Djulia - June 11, 2009

Hi Dave,

Oops ! I found the origin of my problem.

In fact, the problem was caused with the use of the file settings.dat.php and the activePlugins variable.
My configuration of origin was : activePlugins = "footerLicenseLink.php, displayDemoNotice.php"

I always used my local file to make my tests. Also, after each modification, I transferred the initial configuration again of the file settings.dat.php. [crazy]

Djulia

Re: [Djulia] Beta Testers: New "Public Demo Mode" feature

By Dave - June 11, 2009

Djulia,

Great, thanks for the update. Let me know if you run into any other problems! :)

Thanks for your help with this.
Dave Edis - Senior Developer
interactivetools.com