Re: Easy way to offline a cake site

2007-02-14 Thread D.Pape

sounds good and easy.
i don't know , but i think i would check the OFFLINE variable in 
AppController::beforeFilter() (on the same way i check for authorization).

and there should be a login form for administrators, if you have to test 
the system on the live-server.
and where do you set the offline-message?

daniel


keymaster schrieb:
 I would like to redirect every url to an Undergoing Temporary
 Maintenance - Back Soon page.

 Thought the easiest way might be to

 1. create a config var OFFLINE
 2. in /app/config/routes check the OFFLINE var, and if true, reroute
 everything to /pages/offline
 3. create an action in pages controller: offline.
 4. create a view in /view/pages/offline containing the offline message

 To turn a site offline, set the config var to TRUE.

 Is this the simplest way, or is there a better cake way to do this ?

 Thanks.


 

   


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Easy way to offline a cake site

2007-02-14 Thread Langdon Stevenson

I built a system that does exactly this for an on-line magazine.

As Daniel suggested, I used AppController::beforeFilter() to check for 
the online/offline setting (stored in a config table/record in the 
database.

To allow an administrator access I also checked if the admin route was 
being used.  If it was then I ignore the online/offline setting.

This approach has worked quite well and allows the client to take their 
magazine offline (with a customisable message also stored in the config 
table and settable through the admin interface)

Regards,
Langdon


D.Pape wrote:
 sounds good and easy.
 i don't know , but i think i would check the OFFLINE variable in 
 AppController::beforeFilter() (on the same way i check for authorization).
 
 and there should be a login form for administrators, if you have to test 
 the system on the live-server.
 and where do you set the offline-message?
 
 daniel
 
 
 keymaster schrieb:
 I would like to redirect every url to an Undergoing Temporary
 Maintenance - Back Soon page.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---