• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Maintenance Screen 1.0.3

No permission to download

wmtech

Well-known member
#1
wmtech submitted a new resource:

Maintenance Screen (version 1.0.0) - No white page for your visitors when installing addons, languages, phrases, etc.

Description:
Every time you install an addon, rebuild your templates or do other maintenance work in your XenForo ACP (Admin-Control-Panel) the forum shuts down for a few minutes and all your forum visitors see a blank white screen without any notice only.

This tiny "Maintenance Screen" XenForo Addon solves that problem. It checks if a blank screen would be shown, intervenes that process automatically and redirects all visitors to a standard HTML file called...
Read more about this resource...
 

Adam Howard

Well-known member
#3
Small code clean up for sorry.html

Lines 8, 9, 10 and 15

PHP:
;    }
should be

PHP:
;}

I think they also started with

PHP:
{    code
Should be
PHP:
{code
Not technically a big deal. But there are some older browsers (and mobile webs) that will scream murder over such little things.
 

Adam Howard

Well-known member
#4
For full valid HTML 4.01 Transitional ;)

Line 20 in sorry.html

ends with

PHP:
 />
Remove the / symbol and replace it with

PHP:
alt="YOUR Site Title"
End result will be

PHP:
alt="YOUR Site Title">
 

Mouth

Well-known member
#5
Minor fix ...

Had to change library/WMTech/MaintenanceScreen/FrontController.php from

PHP:
$output = '<body onload="self.location.href=\'sorry.html\';"><h1>We are working for you!</h1><p>Please come back later.</p><body>' ;
to

PHP:
$output = '<body onload="self.location.href=\'/sorry.html\';"><h1>We are working for you!</h1><p>Please come back later.</p><body>' ;
to ensure it looked for sorry.html in the root
 

Adam Howard

Well-known member
#7
Minor fix ...

Had to change library/WMTech/MaintenanceScreen/FrontController.php from

PHP:
$output = '<body onload="self.location.href=\'sorry.html\';"><h1>We are working for you!</h1><p>Please come back later.</p><body>' ;
to

PHP:
$output = '<body onload="self.location.href=\'/sorry.html\';"><h1>We are working for you!</h1><p>Please come back later.</p><body>' ;
to ensure it looked for sorry.html in the root
You're a fast one. lol

(fast poster)
 

Adam Howard

Well-known member
#8
For full valid css on sorry.html ;)

Line 13

find

PHP:
.main {background: #fff;
Change to

PHP:
.main {background: #ffffff;
Line 15 ends with

PHP:
padding: 30px auto;}
Remove "auto"

End result will be

PHP:
padding: 30px;}

attached is the fixed version (with my code edits and examples)

Change as needed

html files.... I like to play with them. lol
 

Attachments

Luke F

Well-known member
#9
I think it's nicer to use $output = file_get_contents sorry.html rather than the redirect to it. That way visitors can spam f5 and eventually see the site as normal.


That being said, excellent addon, can't believe no one has thought of this before!
 

wmtech

Well-known member
#10
Minor fix ...

Had to change library/WMTech/MaintenanceScreen/FrontController.php from

PHP:
$output = '<body onload="self.location.href=\'sorry.html\';"><h1>We are working for you!</h1><p>Please come back later.</p><body>' ;
to

PHP:
$output = '<body onload="self.location.href=\'/sorry.html\';"><h1>We are working for you!</h1><p>Please come back later.</p><body>' ;
to ensure it looked for sorry.html in the root
If you know what you do, you can change that as you like. Even name another completely different file URL.

PLEASE BE CAREFUL:
If you do such edits, you have to know what you do, because the included instructions may be wrong.

Forum root has not to be web server root. Accordingly the file "sorry.html" should be placed in forum root and not in server root per default. But, sure, everyone is free to adapt the code for his needs. To make it simple, I have decided to upload only one version of it. ;)
 

wmtech

Well-known member
#12
I think it's nicer to use $output = file_get_contents sorry.html rather than the redirect to it. That way visitors can spam f5 and eventually see the site as normal.


That being said, excellent addon, can't believe no one has thought of this before!
To keep it short and simple, it was released as a redirect.
The trickiest part of this addon is to place sorry.html in the correct position and adapt the refresh. ;)
 

Adam Howard

Well-known member
#13
Thank you for your findings. :) But sorry.html should be redesigned by almost everyone using that addon. This is just a sample. :)
I know.
But I figured I'd "tweak" it for the few lazy people who won't go past just editing in their links or know nothing about code or are happy with it "as is"
 

Mouth

Well-known member
#15
If you know what you do, you can change that as you like. Even name another completely different file URL. You cannot name it a "fix" really. ;)
The default goes conform with XenForo coding in providing a relative URL to your forum root and works out of the box if you follow the instructions.

Sorry (no pun intended :)), I disagree as it didn't fully work for me without this change.
With sorry.html in the root of your XenForo installation (/ for me), then if the user is trying to load <xenforo>/misc/contact (/misc/contact) for me, then the Add-On will try to find sorry.html in <xenforo>/misc/sorry.html (/misc/sorry.html for me) which obviously fails as sorry.html is in <xenforo>/ (/ for me) and not in {xenforo}/misc/
 

Adam Howard

Well-known member
#16
Hopefully those "people" won't use your file unedited, because it will redirect a lot of traffic to your Socially Uncensored forum. :D
I did comment (note) that...

"attached is the fixed version (with my code edits and examples)

Change as needed"

Now if people don't read that or do anything with that..... Oh well .... More members for me :D:X3::LOL:;)(y):sneaky::whistle:
 

HWS

Well-known member
#17
Sorry (no pun intended :)), I disagree as it didn't fully work for me without this change.
With sorry.html in the root of your XenForo installation (/ for me), then if the user is trying to load <xenforo>/misc/contact (/misc/contact) for me, then the Add-On will try to find sorry.html in <xenforo>/misc/sorry.html (/misc/sorry.html for me) which obviously fails as sorry.html is in <xenforo>/ (/ for me) and not in {xenforo}/misc/
We have the exact same situation at our sites and no such problem until now.
I'll take a look into that and release an update, if necessary. Thanks for your comment!
 

Sheldon

Well-known member
#18
I did comment (note) that...

"attached is the fixed version (with my code edits and examples)

Change as needed"

Now if people don't read that or do anything with that..... Oh well .... More members for me :D:X3::LOL:;)(y):sneaky::whistle:
Are you kidding me? Your site is such a failure, you add your own code into add-ons now to get more traffic for you? Keep your trash elsewhere.
 

Sheldon

Well-known member
#20
Now I am curious as to how many of your "repackaged" add-ons you have thrown in for Auto-Installer have your trash in it as well.