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 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! There was a glitch in the "Display Demo Notice" plugin that removed the other footer content when you weren't in demo mode. I'll update that in the thread above or you can apply this fix (add code in red to /lib/plugins/displayDemoNotice.php):

// only show in demo mode
if (!inDemoMode()) { return $html; }


But when you are in demo mode you shouldn't be able to activate or deactivate any plugins. You should get an error like this "Plugins are disabled in demo mode.".

Let me know if that fixes it.
Dave Edis - Senior Developer
interactivetools.com

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