Implemented Maintenance mode

Daegaladh

Member
I would be very useful that you could set the list in maintenance mode and show a page while you're updating or configuring something.
 

Mark

Administrator
Staff member
I can see this in forums, but honestly have never had a need for this on a topsite.

What exactly do you feel the benefit of maintenance mode is? and what functions would you like to see disabled?
 

Daegaladh

Member
As I said, to show a maintenance page while updating or configuring stuff and avoid people to see things broken.
 

Mark

Administrator
Staff member
Sorry, in that case I don't see much value in this request. You can easily add a notice to the wrapper template to notify your users that you are working on the site.
 

Basti

Administrator
Staff member
I think he is more after something like a new wrapper.html if maintance is checked, and normal wrapper is only seen by list admin. All other would see, " we are working to update something, check back soon"

Dont see the benefit for a topsite as well, but would be quite easy to integrate with 1 new admin setting and 3 lines of code in index.php
Lets see what other think about this.
 

Bart

Active Member
Better yet i would suggest a test mode so that before any changes are the admin can see how they would look before they implement it onto the site.
 

Mark

Administrator
Staff member
does this simplify this request? if logged in as admin, show admin only a different (development) skin than what the rest of the users are seeing? That way regular users browsing the site are not interrupted.
 

Bart

Active Member
It would a lot, have 2 skins, 1 that is for all and a test skin for admin only when logged in with a toggle between them.
 

Daegaladh

Member
Partially, but there's still the problem where people could be doing something (for example buying premium, or modifing their accounts) while you are updating and overwriting files, and something gets broken as result.
 

Mark

Administrator
Staff member
thanks, this is why I asked you earlier what features you would like to see disabled.

So you also want to be able to prevent users from logging into the userCp, doing searches, changing sort orders....etc


I am changing the status from "working on it" to "long term todo". I suggest installing a test list for development to minimize the impact of your tweaking on your members.
 

Mark

Administrator
Staff member
After spending the past week doing countless updates, I agree with the value of maintenance mode especially when we have a lot of releases or major version changes.

For me, the best approach is to replace index.php with a simple HTML page notifying the user that an upgrade is in progress.

This does the job nicely, and is dead simple. Anybody see any reason why this would not be good enough?
 

daannet

Member
What do you think about a
PHP:
if ($_CONF['maintenance'] = 'true'){
$TMPL['content'] = do_skin maintenance blablabla
}
else{
NORMAL CODE
}
So that the maintenance mode could be enabled from the admin area?
 

Basti

Administrator
Staff member
Something along those lines would work out quite well i guess. Admin could still see the wrapper.html, all other users see maintaince.html
 

daannet

Member
Something along those lines would work out quite well i guess. Admin could still see the wrapper.html, all other users see maintaince.html
Indeed. That is what i mean... xD

I still use my .htaccess for this at the moment. :
RewriteCond %{REMOTE_ADDR} !^11\.111\.111\.111 #your ip (this isn't mine xD)
RewriteCond %{REQUEST_URI} !^/maintenance\.html$
RewriteRule ^(.*)$ http://domain.com/maintenance.html [R=302,L]
 
Top