SnippetMaster Support Forums

General => How To's & FAQs => Topic started by: genecap on January 11, 2006, 10:51:53 AM



Title: Change Demo Mode from Yes to No
Post by: genecap on January 11, 2006, 10:51:53 AM
After the Admin changed the Enable Demo mode from No to Yes.
A user could not save changes, just like it should work.

Then the Admin changed the Enable Demo back to "No", but the change did not happen.
This is what the Admin sees:

This feature is not enabled in Demonstration Mode.

How to fix?


Title: Re: Demo Mode from No to Yes to No
Post by: admin on January 11, 2006, 11:07:24 AM
Hello,

Yes, this is "by design".  :)

But wait!  Let me explain..   8)

Let's say that you enable demo mode... and you have it up on your website for customers to try out.

And then they disable demo mode.. and start writing over your demo files, etc... or changing your demo user's password, or adding users, or whatever.. (all those things are disabled in demo mode).

That would be a problem.

So the only solution I could think of was to not allow the ability to "turn off" demo mode once it has been turned on. 

The solution:

1) Download and open the /snippet-db/random-folder-name/program_settings.php file with a text editor.
2) Change line #9 from this:
Quote
demo_mode#1

to this:
Quote
demo_mode#0

3) Save and upload the file, overwriting the old version.

That will "manually" disable the demo mode. 

I'll probably eventually add some way to do this without manually having to edit the database file.. but for now it's a manual process.  :)



Title: Re: Demo Mode from No to Yes to No
Post by: genecap on January 11, 2006, 12:03:29 PM
Very good way to solve this issue, it worked :D
The file to edit is  located within a sub folder of snippet-db. The sub folder name looks like some random name, but editing per your instructions worked.
Thanks...


Title: Re: Demo Mode from No to Yes to No
Post by: admin on January 11, 2006, 12:11:02 PM

The file to edit is  located within a sub folder of snippet-db. The sub folder name looks like some random name, but editing per your instructions worked.


Oh ya.. I forgot about that.  This is the "database" folder, and is a random name that is picked when you install the program.  It's for security, so that nobody can easily guess the location of your database files.  :)



Title: Re: Demo Mode from No to Yes to No
Post by: Terminator1138 on January 12, 2006, 11:57:08 AM
could one fix this by setting up a demo rules for not allowing certain changes and admin functionality so they could not change demo files?  Thus admin could log in and change the demo mode?


Title: Re: Demo Mode from No to Yes to No
Post by: admin on March 28, 2006, 09:21:49 AM
It would be extremely difficult to do that, and would be dependent on setting proper write permissions of the files, database folders, etc...

I have added an "alert popup" to warn admin that the change to Demo Mode can only be reversed by manually changing the database setting...

.. and I also added instructions to change the database to the tooltip popup for the option.  :)