Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

Permit non-Admin group to log on during Maintenance Mode?

Aloittaja Cal O'Shaw, lokakuu 11, 2007, 02:40:59 IP

« edellinen - seuraava »

Cal O'Shaw

Hello,

What would be really helpful is the ability, while Maintenance Mode is on, to allow certain individuals or membergroup to log on whilst keeping the forum closed to all other members.

After working on the forum, it would be extremely helpful to allow certain individuals to log on and test out their area before opening it to the membership.  Certainly it will reduce downtime if I don't have to check all the areas and hope I know what I'm looking for in those areas.

It's also helpful in testing new features as the members would see them, rather than assuming the privs are set correctly because I'm an Admin and they work for me.  Some things I don't want the average members to see (new boards, membergroups, features, etc).  One evening I was making changes and had to do them with members active because I needed to test what members would encounter.  Only a few began using the feature before it was ready...

Giving these testers full Admin rights is not a good idea, not because of a lack of trust, but because they do not need Admin powers.  All they need to do is logon, check their area, give their okay, and I can then unlock the forum.

Is there anyway this can be done?  Ideally see it as part of the base code (1.1.5?), but a mod package or just a set of edit instructions at least.

I hope something can be done as upgrading to 1.1.4 is my first upgrade (new tech admin, installed mods, but we've had some crashes in the past and I'd like to avoid that, especially as the search bug was just found).

Thank you very much for any help anyone can provide in making this work.

Regards,

Cal

Cal O'Shaw

I'm sorry for adding this late, but being able to add a message to display on pages so my 'testers' can be kept up to date would be very helpful as well.  Most likely on the Admin page where the maintenance mode messages are defined.  So I could put up messages like:

"Work still in progress, do not test yet"
"Please test your areas and PM results"
"We're good!  Switching out of Mainenance Mode at 2230"

Thanks!

rsw686

You can change the maintenance mode message in the Admin panel right below where you check the Maintenance Mode box.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

Cal O'Shaw

Those are the title and message to members who are locked out.  I'm talking about a message shown on each page by those allowed to log on.  It would be a way to let them all know what's going on without sending a bunch of PMs.  Besides, I could be busy on something, one of my testers logs on and assumes I'm done and starts testing.  A message option "on the inside" means I don't have to watch for them to show up and stop what I'm doing to tell each one to wait or start testing.

If the same message is shown to those "outside" and "inside", then it would be extremely useful to have them as seperate strings.

Thanks!

rsw686

#4
On index.template.php in the themes folder find


// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>', $txt[616], '</b><br />';


Add into the echo statement $GLOBALS['mmessage'] where you want the maintenance message displayed.

Something like this


// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>', $txt[616], '<br/>', $GLOBALS['mmessage'], '</b><br />';


If you want different messages just add another gloabal variable to the Settings.php and follow the same format on the Admin Settings page to set that variable as it does for the "outside" maintenance message.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

rsw686

I just noticed that this checks for $context['user']['is_admin'] so you'll want to add in the list of users here as well like in http://www.simplemachines.org/community/index.php?topic=72395
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

Cal O'Shaw

Hi,

I appreciate the help with displaying a message "inside" during Maintenance Mode, but being able to allow other selected users in is really the more critical item for me and I would think others (certainly the idea got favorable comments in the other topics I mentioned this in).

Whilst I would like to eventually see this as a priv to be checked in Member or Group configs, I would at this point be very happy with a code string that shows me how to put in the member IDs of those who can log on during Maintenance Mode.  Something that acts like (meta-code here, my PHP isn't yet up to snuff)

if (mode=Maintenance_Mode) and (user_number=[1,25,667,766]) then login

So members 1, 25, 667, and 766 can log on, as well as any Admins.

I really appreciate any help I can get with this, either as a quick-and-dirty code fragment now, or a nice mod with menus and checkboxes later.

I updated http://www.simplemachines.org/community/index.php?topic=72395 with my request as well, but my understanding is that requests for mods go here.

Thank you,

Cal

rsw686

Lainaus käyttäjältä: cal.oshaw - lokakuu 15, 2007, 11:17:26 IP
I appreciate the help with displaying a message "inside" during Maintenance Mode, but being able to allow other selected users in is really the more critical item for me and I would think others (certainly the idea got favorable comments in the other topics I mentioned this in).

I answered your other question in the thread I linked above days ago. Posting the same questions in multiple threads isn't helpful.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

Cal O'Shaw

I'm sorry, I didn't quite pull the pieces together in your prior post.

As I noted in my post above, I posted here because it's my understanding that requests for mods go here, and this seems a feature others could find useful.  I also linked to that other topic to avoid confusion and different people in different topics trying to provide a solution.

Again, I thank you and everyone else for your help.

Regards,

Cal

Advertisement: