Beta Testers: New "Public Demo Mode" feature

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

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! 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