Advertisement:

Author Topic: Styled Maintenance Mode Message  (Read 7611 times)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,815
  • Mod King
    • XPtsp.com Community
Styled Maintenance Mode Message
« on: October 10, 2014, 07:34:40 PM »
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.
« Last Edit: January 19, 2015, 09:44:59 AM by dougiefresh »

Offline Joomlamz

  • SMF Hero
  • ******
  • Posts: 2,629
  • Gender: Male
  • Suporte SmfPT
    • apllicmz on Facebook
    • apllicmz on GitHub
    • https://www.linkedin.com/in/aplic on LinkedIn
    • @aplichosting on Twitter
    • Webdesign
Re: Styled Maintenance Mode Message
« Reply #1 on: October 11, 2014, 01:34:34 AM »
Nice Work
When have linguage files send any news to Update Portuguese file



Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,815
  • Mod King
    • XPtsp.com Community
Re: Styled Maintenance Mode Message
« Reply #2 on: October 11, 2014, 04:18:36 AM »
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.....

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,149
  • Gender: Male
  • Sniper Legends
    • Flavio93Zena on Facebook
    • Virtual Interactive Games Entertainment Forum
Re: Styled Maintenance Mode Message
« Reply #3 on: October 16, 2014, 11:25:16 AM »
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

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,175
    • StoryBB/StoryBB on GitHub
Re: Styled Maintenance Mode Message
« Reply #4 on: October 16, 2014, 01:48:51 PM »
Sure again you and another useful mod! Congrats! It should be in smf core to me.

Strongly disagree.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,149
  • Gender: Male
  • Sniper Legends
    • Flavio93Zena on Facebook
    • Virtual Interactive Games Entertainment Forum
Re: Styled Maintenance Mode Message
« Reply #5 on: October 16, 2014, 02:19:03 PM »
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

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,175
    • StoryBB/StoryBB on GitHub
Re: Styled Maintenance Mode Message
« Reply #6 on: October 16, 2014, 02:25:55 PM »
What made you think it was about preference? I also see no reason to explain all my thought processes to you.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,149
  • Gender: Male
  • Sniper Legends
    • Flavio93Zena on Facebook
    • Virtual Interactive Games Entertainment Forum
Re: Styled Maintenance Mode Message
« Reply #7 on: October 16, 2014, 02:37:31 PM »
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

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,175
    • StoryBB/StoryBB on GitHub
Re: Styled Maintenance Mode Message
« Reply #8 on: October 16, 2014, 02:43:08 PM »
Quote
The 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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,149
  • Gender: Male
  • Sniper Legends
    • Flavio93Zena on Facebook
    • Virtual Interactive Games Entertainment Forum
Re: Styled Maintenance Mode Message
« Reply #9 on: October 16, 2014, 03:43:11 PM »
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

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,815
  • Mod King
    • XPtsp.com Community
Re: Styled Maintenance Mode Message
« Reply #10 on: October 16, 2014, 05:26:02 PM »
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?

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,149
  • Gender: Male
  • Sniper Legends
    • Flavio93Zena on Facebook
    • Virtual Interactive Games Entertainment Forum
Re: Styled Maintenance Mode Message
« Reply #11 on: October 16, 2014, 05:27:05 PM »
That's a good result 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

Offline Westwegoman

  • Jr. Member
  • **
  • Posts: 199
  • Gender: Male
    • westwegoman on Facebook
    • Westwegoman on LinkedIn
    • Bayou State Fishing
Re: Styled Maintenance Mode Message
« Reply #12 on: October 16, 2014, 11:00:52 PM »
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.


Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,175
    • StoryBB/StoryBB on GitHub
Re: Styled Maintenance Mode Message
« Reply #13 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.

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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Westwegoman

  • Jr. Member
  • **
  • Posts: 199
  • Gender: Male
    • westwegoman on Facebook
    • Westwegoman on LinkedIn
    • Bayou State Fishing
Re: Styled Maintenance Mode Message
« Reply #14 on: October 17, 2014, 12:13:00 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! :)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,815
  • Mod King
    • XPtsp.com Community
Re: Styled Maintenance Mode Message
« Reply #15 on: October 20, 2014, 07:45:34 AM »
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....

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,175
    • StoryBB/StoryBB on GitHub
Re: Styled Maintenance Mode Message
« Reply #16 on: October 20, 2014, 07:58:37 AM »
This would be infinitely more feasible if SMF used transactions for everything, though.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,815
  • Mod King
    • XPtsp.com Community
Re: Styled Maintenance Mode Message
« Reply #17 on: January 19, 2015, 09:45:12 AM »
Uploaded v1.1 - January 19th, 2015
o License change to Simplified BSD.  No functionality change.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,815
  • Mod King
    • XPtsp.com Community
Re: Styled Maintenance Mode Message
« Reply #18 on: April 10, 2015, 07:40:14 PM »
Uploaded v1.2 - April 6th, 2015
o Updated for SMF 2.1 Beta 1

Offline njtweb

  • Full Member
  • ***
  • Posts: 590
Re: Styled Maintenance Mode Message
« Reply #19 on: May 17, 2018, 08:29:17 PM »
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?

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 20,898
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Styled Maintenance Mode Message
« Reply #20 on: May 17, 2018, 10:23:26 PM »
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?
No
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline njtweb

  • Full Member
  • ***
  • Posts: 590
Re: Styled Maintenance Mode Message
« Reply #21 on: May 18, 2018, 08:57:59 AM »
Ok, thank you

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,815
  • Mod King
    • XPtsp.com Community
Re: Styled Maintenance Mode Message
« Reply #22 on: May 22, 2018, 12:00:24 AM »
Uploaded v1.3 - May 21st, 2018
o Updated documentation.  No functionality change.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,815
  • Mod King
    • XPtsp.com Community
Re: Styled Maintenance Mode Message
« Reply #23 on: November 02, 2018, 01:52:49 PM »
Uploaded v1.4 - November 2nd, 2018
o No functionality change.
o Updated documentation to point to new website.