News:

Wondering if this will always be free?  See why free is better.

Main Menu

Styled Maintenance Mode Message

Started by dougiefresh, October 10, 2014, 07:34:40 PM

Previous topic - Next topic

dougiefresh

Link to Mod



STYLED MAINTENANCE MODE MESSAGE v1.4
By Dougiefresh -> Link to Mod



Introduction
SMF has TWO maintenance modes, as defined in Settings.php by the variable $maintenance in your forum folder.  Setting this variable to 1 allows the adminstrators access to perform any necessary actions that don't require taking the database offline.  Setting this variable to 2 (hardcore maintenance mode) makes the forum itself unaccessable for EVERYBODY.  Not even adminstrators can log into the forum.

What This Mod Changes
When any Simple Machines forum is in maintenance mode (where $maintenance in Settings.php is set to 2), there is absolutely no CSS style to make the maintenance message look consistent with the rest of the site.  This mod attempts to resolves this issue, using the default theme CSS, to style the maintenance mode message shown to the user. 

Arantor stated in this post:
Quote
There are two levels of maintenance mode. General maintenance mode - which shows the theme like it should, and hardcore maintenance mode, which shows a basic page.

Considering that the ONLY time the white screen should be applicable is during upgrades - in which state even the default theme is by definition in flux and not necessarily reliable to be used
(Yes, there are several more lines in the post which are omitted!)

Restrictions
Since theme support has not been loaded as of this point, other themes cannot be selected within the UI at this point.  This may change in future versions, but I doubt it.

Admin Settings
There are none.  You must uninstall this mod to remove it.

Compatibility Notes
This mod was tested on SMF 2.0.9, but should work on SMF 2.1 Beta 1, as well as SMF 2.0 and up.  SMF 1.x is not and will not be supported.

Changelog
The changelog can be viewed at XPtsp.com.

License
Copyright (c) 2015 - 2018, Douglas Orend
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Apllicmz

Nice Work
When have linguage files send any news to Update Portuguese file



dougiefresh

Thanks!

The original SMF code for the maintenance mode (found in Sources/Errors.php) didn't use any language files to display the code.  It's noted in the code that language files haven't been loaded yet, so it can't use any language files....  My mod doesn't change this, only fixes the code so that the maintenance mode message is CSS-styled using the default theme.....

Will this ever change?  It won't in any branch of v2.0.x, at least for my mod.....

Ninja ZX-10RR

Sure again you and another useful mod! Congrats! It should be in smf core to me.
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Arantor

Quote from: ♦ Ninja ZX-10RR ♦ on October 16, 2014, 11:25:16 AM
Sure again you and another useful mod! Congrats! It should be in smf core to me.

Strongly disagree.

Ninja ZX-10RR

Why you prefer an ugly black and white page versus a pretty and styled page is a thing I would like you to explain :)
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Arantor

What made you think it was about preference? I also see no reason to explain all my thought processes to you.

Ninja ZX-10RR

The fact that you are being nervous because you just came back home is not my problem, neither your rudeness.

This is a FORUM, so I expressed my opinion and I explained the reasons for it, you expressed your opinion and then refuse to explain it? That's against any forum purpose and also useless, if you want to express your opinions without supporting them nobody will actually care about them since they would be pointless for everybody else except you, the only person that can understand them since you are the one who thought about them. Please explain it or either don't post things like "I see no reason to explain", then don't post and leave? It's nice if I or even we as a community can learn from your thoughs, but it's not nice if you just say "no" and then "no I won't explain", that's absurd.
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Arantor

QuoteThe fact that you are being nervous because you just came back home is not my problem, neither your rudeness.

It's not nervousness.

You expressed an opinion. I expressed a counter opinion. I neither have to defend nor justify my opinions to anyone, just as you do not have to defend or justify yours.

I have just learned from too much time around certain people here that my explanations are usually unwanted and unheeded and that it's simply better to express an opinion and move on.

Ninja ZX-10RR

Did I ever refuse your opinion without even listening? No, I always encouraged you to express it since it's one of the most valuable in here, to me.
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

dougiefresh

Well, for the record, I thought it was a good idea to do this mod.  As of this post, 44 downloads have been made in the last week....  Says something, doesn't it?

Ninja ZX-10RR

Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Westwegoman

Forgive me if I am missing something here but, I don't have this mod installed yet when I put my forum into maintenance mode, it does not have just a white screen with a message. It has the same styling as the forum it's self. Always has.

I'm using the default theme.


Arantor

There are two levels of maintenance mode. General maintenance mode - which shows the theme like it should, and hardcore maintenance mode, which shows a basic page.

Considering that the ONLY time the white screen should be applicable is during upgrades - in which state even the default theme is by definition in flux and not necessarily reliable to be used, I don't understand what benefit this provides because I don't understand how many people spend *any* amount of time in hardcore maintenance mode.

Let me put it this way: the total time my sites have spent in such, over the last 8 YEARS of running sites has that total time measured in hours. Over 8 years.

There is no benefit that I can see to having it.

Westwegoman

Quote from: Arantor on October 17, 2014, 12:01:37 AM
There are two levels of maintenance mode. General maintenance mode - which shows the theme like it should, and hardcore maintenance mode, which shows a basic page.
That certainly clarifies things. Thanks! :)

dougiefresh

I'm trying to write a more reliable backup system for SMF and I thought it would be nice to have a maintenance page that didn't scream "LAME!" during those times that the forum is down due to the backup code....

Arantor

This would be infinitely more feasible if SMF used transactions for everything, though.

dougiefresh

Uploaded v1.1 - January 19th, 2015
o License change to Simplified BSD.  No functionality change.

dougiefresh

Uploaded v1.2 - April 6th, 2015
o Updated for SMF 2.1 Beta 1

njtweb

I am running 2.0.15 and when maint mode is enabled it's not a white page. It's the login page with the maintenance mode message over the login fields. Does this mod override that page as well?

Advertisement: