This topic is locked

Maintenance mode

1/28/2012 2:02:44 PM
PHPRunner General questions
N
notuo author

Hi.
Is there a way to have a system in "maintenance mode"?
I can think in the login to code something, but what if any one knows the direct page for an specific part of it? All the pages goes first to login?
Thanks in advance for any comments

P
procheck 1/28/2012

If you add code to disable your login page, then any direct links to other pages will be expired automatically and they will be redirected to the login page.

N
notuo author 1/29/2012



If you add code to disable your login page, then any direct links to other pages will be expired automatically and they will be redirected to the login page.


Thank you prochecksports.
I am afraid I don't understand what do you mean with "add code to disable your login page". Do you mind to elaborate a little more? how?, where?

P
procheck 1/29/2012

The simplest way would be in BeforeLogin, simply add return false; on the first line
In AfterUnsuccessfulLogin add a message.
$message = "Maintenance Mode Message";
There are a number of more elaborate ways of doing this also. You could add a dropdown box or a checkbox to the login screen to put it into Maintenance Mode and this could only be activated by the Admin. This way could be viewed by everyone.
You could set up a table that is only available to the administrator when he/she logs and it would be used to set the mode and any other features which you might require. You could then query this table in BeforeLogin to check the mode.
Does this make more sense?
Al

N
notuo author 1/30/2012



Does this make more sense?
Al



Yes, thanks. I understand the idea now.
Have a great week