Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Maintenance Mode and register.php

Asked Modified Viewed 3,061 times
B
bait
B
bait 10
  • Junior Member, joined since
  • Contributed 11 posts on the community forums.
  • Started 6 threads in the forums
  • Started this discussions
asked
Junior Member

Long story short, I'm making a clan website. I've set it so that I can allow iMEMBERs through maintenance mode. I like how you can't 'see' the site without having to actually be registered, and despite my attempts I can't find something that works the same.

Anyhow, my question is, register.php needs somehow be exempt from this check.

How can I have register.php still be made available to guests, while the rest of the site is completely locked down.

I did this many years ago in fusion 5 i believe, i just can't find any source to reference.

Any help would be wildly appreciated, and I apologize if I make any of yours eyes twitch to the thought of this ><
0 replies

5 posts

F
Falk
F
Falk 146
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
answered
Super Admin

Hello, try this ,
open /themes/templates/header.php
find ,

if ($settings['maintenance'] == "1" && ((iMEMBER && $settings['maintenance_level'] == "1" 
   && $userdata['user_id'] != "1") || ($settings['maintenance_level'] > $userdata['user_level'])
)) {
   redirect(BASEDIR."maintenance.php");
 }


replace with

if (!preg_match('/register.php/i', $_SERVER['PHP_SELF'])) {
if ($settings['maintenance'] == "1" && ((iMEMBER && $settings['maintenance_level'] == "1"
   && $userdata['user_id'] != "1") || ($settings['maintenance_level'] > $userdata['user_level'])
)) {
   redirect(BASEDIR."maintenance.php");
 }
}
0 replies
B
bait
B
bait 10
  • Junior Member, joined since
  • Contributed 11 posts on the community forums.
  • Started 6 threads in the forums
  • Started this discussions
answered
Junior Member

Wow, thank you so much! Got it up and running in no time!
0 replies
J
JoiNNN
J
JoiNNN 10
  • Veteran Member, joined since
  • Contributed 850 posts on the community forums.
  • Started 100 threads in the forums
answered
Veteran Member

We should have this as an option in Admin Panel under Maintenance ("Allow users to register while in maintenance?"), some might do just some easy maintenance that won't break the sites while registering.
0 replies
P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

Better thing - allow "section Maintenance"
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

Well, the whole point to go maintenance feature for me would be stopping users from generating more errors logs by not allowing them to even deal a single handshake with the server sql. Allowing registration while doing maintenance equals ninja patching on a live server.
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 5 posts
  • Votes 0 votes
  • Topic users 5 members

5 participants

F
F
Falk 146
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 12 questions
C
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
P
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
B
B
bait 10
  • Junior Member, joined since
  • Contributed 11 posts on the community forums.
  • Started 6 threads in the forums
  • Started this discussions
J
J
JoiNNN 10
  • Veteran Member, joined since
  • Contributed 850 posts on the community forums.
  • Started 100 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet