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?

Certain user group may log in during maintenance mode?

Asked Modified Viewed 2,900 times
S
Slay3r
S
Slay3r 10
  • Junior Member, joined since
  • Contributed 36 posts on the community forums.
  • Started 11 threads in the forums
  • Started this discussions
asked
Junior Member

Is it possible to allow certain group members along with the administrators to log in during maintenance mode in V7?

If so,how please?

I had this thread started but for V6 and it worked for V6 but now I need it for V7 and can not reply in that thread...
http://php-fusion.co.uk/forum/viewthr...d_id=21870
0 replies

7 posts

F
fanggaming
F
  • Junior Member, joined since
  • Contributed 43 posts on the community forums.
  • Started 3 threads in the forums
answered
Junior Member

This should work.

themes\templates\header.php

Change groupid variable

$groupid = 3;
if ($settings['maintenance'] == "1" && !iADMIN && !checkgroup($groupid)) { redirect(BASEDIR."maintenance.php"); }
0 replies
S
Slay3r
S
Slay3r 10
  • Junior Member, joined since
  • Contributed 36 posts on the community forums.
  • Started 11 threads in the forums
  • Started this discussions
answered
Junior Member

thanks but if I replace the 1 with a 5 (group ID) it somehow takes the site out of maintenance mode.
0 replies
F
fanggaming
F
  • Junior Member, joined since
  • Contributed 43 posts on the community forums.
  • Started 3 threads in the forums
answered
Junior Member

Well that code cant take the site out of maintenance mode its just not possible, all it will do is check the users group you specify. I have tested this and it worked on my site no issues. I think you are saying cos you cant see the maintenance mode text when logged in as group 5. if you want them to see that edit panels.php

change:
if (iADMIN && $settings['maintenance']) {
echo "<div class='admin-message'>".$locale['global_190']."</div>";
}


to:

$groupid=5;
if ((iADMIN || checkgroup($groupid)) && $settings['maintenance']) {
echo "<div class='admin-message'>".$locale['global_190']."</div>";
}
0 replies
S
Slay3r
S
Slay3r 10
  • Junior Member, joined since
  • Contributed 36 posts on the community forums.
  • Started 11 threads in the forums
  • Started this discussions
answered
Junior Member

Naw man,what I want is public to see maintenance mode & VIP group (5) members to be able to log in.
0 replies
F
fanggaming
F
  • Junior Member, joined since
  • Contributed 43 posts on the community forums.
  • Started 3 threads in the forums
answered
Junior Member

That's what all that does. none of that code there takes the site out of maintenance mode.
0 replies
S
Slay3r
S
Slay3r 10
  • Junior Member, joined since
  • Contributed 36 posts on the community forums.
  • Started 11 threads in the forums
  • Started this discussions
answered
Junior Member

Quote

fanggaming wrote:
This should work.

themes\templates\header.php

Change groupid variable

$groupid = 3;
if ($settings['maintenance'] == "1" && !iADMIN && !checkgroup($groupid)) { redirect(BASEDIR."maintenance.php"); }


Doesn't work.
Anyone else please?

BTW,this ABSOLUTELY DOES take my website OUT of MM!
Edited by Slay3r on 06-03-2009 17:35,
0 replies
Y
ytterx
Y
ytterx 10
YtterX
  • Member, joined since
  • Contributed 163 posts on the community forums.
  • Started 1 thread in the forums
answered
Member

it should be:
$groupid = 5;
if ($settings['maintenance'] == "1" && (!iADMIN || !checkgroup($groupid))) { redirect(BASEDIR."maintenance.php"); }
Edited by ytterx on 07-03-2009 10:48,
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 7 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

S
S
Slay3r 10
  • Junior Member, joined since
  • Contributed 36 posts on the community forums.
  • Started 11 threads in the forums
  • Started this discussions
F
F
  • Junior Member, joined since
  • Contributed 43 posts on the community forums.
  • Started 3 threads in the forums
Y
Y
ytterx 10
YtterX
  • Member, joined since
  • Contributed 163 posts on the community forums.
  • Started 1 thread in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet