SimplePortal

Development => Feature Requests => Topic started by: ♦ Ninja ZX-10RR ♦ on November 29, 2014, 07:50:58 AM

Title: Allow access in maintenance mode permission?
Post by: ♦ Ninja ZX-10RR ♦ on November 29, 2014, 07:50:58 AM
Is there a way to set it up? Perhaps helpers and supporter would be granted access to test things :) now it is done that if a member has the "Administrate forum and database" permission then he automatically gains the rights to access the portal while in maintenance mode, as per the subject I would like a separate permission for that as I am developing my portal and I keep having to remove and put the maintenance back to show the portal to my helpers...
Thanks in advance! :)
Title: Re: Allow access in maintenance mode permission?
Post by: andy on November 29, 2014, 09:15:44 AM
This is an SMF support question, not a Simple Portal one.
Title: Re: Allow access in maintenance mode permission?
Post by: ♦ Ninja ZX-10RR ♦ on November 29, 2014, 10:36:55 AM
Nope, I was talking about SimplePortal maintenance mode -_- which is different from the SMF maintenance mode.
Title: Re: Allow access in maintenance mode permission?
Post by: [SiNaN] on November 29, 2014, 11:08:00 AM
I think this is a quite specific case, so it won't probably make into the mod by default but you can achieve what you want with the following change:

Subs-Portal.php

Code: (Find) [Select]
if (WIRELESS
Code: (Replace) [Select]
global $user_info;
if (count(array_intersect(array(2, 3, 4), $user_info['groups'])) > 0)
$modSettings['sp_maintenance'] = false;

if (WIRELESS

Just change 2, 3, 4 as the id of member groups that you want to be able to view the portal on maintenance mod, separated by commas.
Title: Re: Allow access in maintenance mode permission?
Post by: ♦ Ninja ZX-10RR ♦ on November 29, 2014, 11:40:02 AM
Awesome, I will try to do all the edits you have suggested me so far, I have been into six hours straight of .css scripting >_< and then a little move of stuff between two houses, then clean up and... Well a ton of annoying and boring stuff. >_<
Will try this one, many thanks once again! :)

EDIT: Confirmed it worked!
SimplePortal 2.3.8 © 2008-2024, SimplePortal