Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=2170)
Allow Access In Maintenance Mode
Original Author: Arantor (http://www.simplemachines.org/community/index.php?action=profile;u=265135) |
Current Author: SMF Customization Team (http://www.simplemachines.org/community/index.php?action=profile;u=1)
Supported Languages: English, Spanish, Russian, Portuguese
Link To Mod (http://custom.simplemachines.org/mods/index.php?mod=2170) |
Mod Discussion (http://www.simplemachines.org/community/index.php?topic=338635.0) |
Other SMF Customization Team Mods (http://custom.simplemachines.org/mods/index.php?action=profile;u=1)
Summary:This mod allows admins to grant forum access to trusted membergroups while the forum is in maintenance mode.
The usual "Remember, this forum is in 'Maintenance Mode'." reminder is also given to those other groups, while regular users are still barred.
Compatibility:Compatible with SMF 1.1 & 2.0
Installation Information:The Package Manager should work in most cases, if you have problems installing please use the discussion thread as well as Manual Installation of Mods (http://docs.simplemachines.org/index.php?topic=402)
Change Log:Version 1.2 - October 12, 2011
+ Added 2.0x support
! Fixed 2.x error which prevented the mod from working
Version 1.1 - June 17, 2011
+ Added Portuguese support
Version 1.1 - October 15, 2009
+ Added Spanish support
+ Added 2.0 RC2 support
Version 1.0 - September 24, 2009
Original releaseCopyright (c) 2015, Simple Machines, under BSD 3-Clause License.
All rights reserved.
Nice Mod, thanks Arantor. ;)
as always heres spanish translation ;)
$txt['permissionname_admin_maintmode'] = 'Permitir acceso en modo mantenimiento';
$txt['permissionhelp_admin_maintmode'] = 'Esta opcion permite a los usuarios de este grupo de usuarios acceder a el foro aun estando en modo mantenimiento.';
good for spanish_es and spanish_latin and its utf8 versions as well.
Many thanks 130860 :)
I'll add that shortly when I brush up the main mod page.
nice one
Woo-hoo! Thanks, Arantor! This was my request way back when and I was able to get some help from Karl Benson and a few other SMF Wizards to implement a hand-coded version.
I'm going to see about extracting my manual code and using your MOD (I really have been uncomfortable with it and wondered if it would break our site when we tried to upgrade to 2.0.x).
Grazie mille!
Cal
Cal, when you do the upgrade from 1.x to 2.x, all mods get removed anyway as all the files get replaced, so you should be able to strike that one off the list of upgrade concerns.
I had actually forgotten that you'd documented it manually before.
ok, me again, this time with the xml file ;)
greetings!
Thanks :)
I'll get that added on next week when I'm back at home.
Donated to SMF Customization Team :)
I'll add Spanish support shortly though.
Spanish support has been added to this package, bumping it to version 1.1. I also added support for 2.0 RC2 for Charter users (though I cannot imagine this needing to change afterwards, but I'll retest on RC2-public when it arrives)
Nice mod! Thanks.
I seem to be having problems with this mod,
I have tried it on my work in progress RC2 forum which is heavily moded and I have also tried it on a Fresh install of RC2 with no mods.
in both scenarios it just reloads the Login page when Any member but Admin tries to login while in maintenance mode ?
I have set the Permissions, Am i missing something ?
What did you set permissions to?
Permission set to ALLOW access in maintenance Mode
Which group is that for?
Those are the permissions for a New non post based group I created called "Tester".
And they can't access the forum at all in maintenance mode? Weird.
What other mods do you have? What URL were you trying to get to?
Quote from: Arantor on January 11, 2010, 09:42:46 AM
And they can't access the forum at all in maintenance mode? Weird.
What other mods do you have? What URL were you trying to get to?
Ok I will keep this simple and not involve the Production site I am putting together for now which is were I first encountered the problem.
So I then Created a Fresh install of RC2 Public to see if it was the Mod or a conflict with other mods I had.
I am still Having this issue on a Fresh Install of SMF RC2 Public with No other modifications using the Curve Theme.
Set Permission for Global Moderator to allow.
No Errors in Log or while installing and I Have taken a look through the Code Manually and it all appears to be there.
Pics attached from Fresh RC2 Public installation.
So if you log in with a global moderator account it doesn't work? Weird - it works for me at first glance. I guess I need to re-test it more thoroughly on RC2 (I originally wrote it on 2.0 RC1.2)
Russian translation:
// Allow Access in Maintenance Mode
$txt['permissionname_admin_maintmode'] = 'Разрешить просмотр форума во время техобслуживания';
$txt['permissionhelp_admin_maintmode'] = 'Члены этой группы смогут просматривать и использовать форум даже в режиме техобслуживания.';
Thanks. I hope the Customization Team can add this is, since I no longer have the ability to update it (given that I originally wrote it)
Xenmorph: Really sorry for the delay on this.
I can confirm the issue. I'll be looking into it as soon as possible.
Does this mod work with rc3? If not how can I make compatible with it?
It should work, yes. It does have a bug though (reported on some installations, not everybody experiences it), which does not depend on RC3.
Good. I have the bug and don't understand where is the problem.
[EDIT]
The problem is in row 545 of LogInOut.php file
if (empty($maintenance) || allowedTo('admin_maintmode'))
redirectexit('action=login2;sa=check;member=' . $user_info['id'], $context['server']['needs_login_fix']);
else
redirectexit('action=logout;' . $context['session_var'] . '=' . $context['session_id'], $context['server']['needs_login_fix']);
In that point the user hasn't any permission ( I have a dump of $user_info: Array ( .... [permissions] => Array (
- => calendar_view [1] => profile_view_any [2] => view_stats ) )
Sorry for the big bump.
I am trying to install this MOD to my forums. The installation works fine except my custom theme's index.template.php does not have the line
if ($context['in_maintenance'] && $context['user']['is_admin'])
in it at all.
I have manually searched for lines similar to it, and not one line in the file even says maintenance. :o
I have tried running the forum without the lines but it does not work. It just treats it as standard maintenance mode. I have indeed modified the permissions for the group.
I am using the theme Archway on SMF 2.0RC5 if that is needed.
Any help is greatly appreciated.
Thanks,
Corey
Any hope of this working with RC5? I have manually installed it several times, and even though i can complete every step it still will not allow my global mods (with permissions set) to access the forum in maint mode.
I saw the post two up from mine and checked that line, but i do not see what he is trying to say.
Thanks!
Quote from: xKroniK13x on April 21, 2011, 01:33:39 PM
Sorry for the big bump.
I am trying to install this MOD to my forums. The installation works fine except my custom theme's index.template.php does not have the line
if ($context['in_maintenance'] && $context['user']['is_admin'])
in it at all.
I have manually searched for lines similar to it, and not one line in the file even says maintenance. :o
I have tried running the forum without the lines but it does not work. It just treats it as standard maintenance mode. I have indeed modified the permissions for the group.
I am using the theme Archway on SMF 2.0RC5 if that is needed.
Any help is greatly appreciated.
Thanks,
Corey
I have this issue too, and I'm on 2.0. From what I can see though, that line mentioned only displays notifications about it being in admin mode so it shouldnt hinder it?
Exactly right Jade! That's only for where it shows those notifications in the user area of the theme. If a custom theme doesn't have that code there's no need to add the bits for this mod in that section.
Quote from: IchBin™ on July 18, 2011, 12:18:56 PM
Exactly right Jade! That's only for where it shows those notifications in the user area of the theme. If a custom theme doesn't have that code there's no need to add the bits for this mod in that section.
But it doesnt work at all... :(
What doesn't work?
The entire mod. I quoted someone saying that without that part in the theme the mod doesnt work.
So it doesn't work on a custom theme if you can't put those lines in it? Or it doesn't matter what you do, the mod doesn't even work in the default theme?
it works fine on the default theme, but if you cant find that line on a custom theme i dont think the mod will work at all.
The mod should still work if the template code is not found. It should still allow specified member groups access to the forum when in maintenance mode. If that is not the case, we need to look closer at the mod.
I think you might want to test it darls, cause I just cannot get it to work at all :(.
i have a clean smf 2.0 install, installed this mod on it, it installed cleanly. made a test account, gave that account permission to log in while in maintenance mode. put forum in maintenance mode, tried to log in with the account and it would not allow them to log in, if i take the forum out of maintenance mode and try to log in the account can log in, and i put it back in maintenance mode they stay logged in.
i even installed an older RC4 version of the mod and the test user can not log in while in maintenance mode.
Illori, did I read your post wrong? You are saying the mod didn't work as advertised?
I just did a test install as well, and when a member group was given permission to login while in maintenance mode, there were no problems. Once the permission was removed they weren't allowed to login as expected.
Jade, would you like me to look at this on your site?
you are correct Ich i tested it on a clean install with curve theme and it did not work at all.
if you want to see the install i just duplicated it again on my live server, send me a message and i can let you take a look.
tested this mod with 1.1.14 the login somewhat works, but you get a "Session verification failed. Please try logging out and back in again, and then try again." error upon login if you go back [using link on the page] and refresh the page you can then see the forum.
What Illori's describing is exactly the problem :).
This is not working at all for me, either. I gave Global Moderators the appropriate permission, but they just get looped back to the "Forum is in Maintenance Mode" screen when trying to log in.
IchBin i believe is trying to look further into this mod, but due to real life has not given us an update on the status.
I'm not sure it's a problem with the modification. Without this mod installed, isn't anyone with "admin_forum" permission supposed to be able to access the forum when it's in maintenance mode? Because this wasn't working either.
this is an issue with the mod as stated above. the mod allows others access and those can not access the forum where admin can.
Edit: Unless the session verification message is being hidden in maintenance mode, which would be horribly unhelpful...
Okay, well here's what I see looking at the modification's code: Before the changes, we're checking if the user is allowed to admin_forum. This modification adds a permission called admin_maintmode and changes all of the conditional statements to check for that permission instead of admin_forum. However, even if a usergroup has the admin_forum permission, they are not able to access the forum while in maintenance mode (with or without the mod).
This means that there is probably a second condition specified somewhere checking if the user is a member of group 1. My understanding was that admins should be able to create additional admin groups which can access the forum in maintenance mode even without this modification, but that this modification let administrators allow people to access the forum in maintenance mode without giving their group the admin_forum permission (which comes with additional privileges). Even if the checking for group 1 is intentional, then the mod needs to be changed to account for that fact.
(This is all on 2.0.)
Thanks to everyone looking into it :).
Haven't figured it out yet.. It would seem that the allowedTo() check needs to be input earlier as it's not pickup up the permission on login.
I have the smf 2.0 and this mod doesn't work to my forum...
I'm use a custom theme, any help please? Really I need it :-\
This mod has been updated, and should fix the current issue of not being able to login for someone with maintenance access. Big thanks to Spuds for taking the time to figure out the problem and fixing it.
It looks like it doesn't work anymore @ 2.0.5. Any chance for update or help?
Cheers,
OG
Should still work. You just need to emulate the version number. click the advanced link in the package manager, and put in the current supported version of the mod. It should install then. If it fails, post back.
I didn't have problems with install. It just didn't grant acces (after setting group privileges, etc.)
I've uninstalled it and some other mods, installed again and now it works. I don't know what was the problem. Maybe I did something wrong or there were some conflicts. It works now and that's great!
Thanks!
I just installed this and it functions 100% on 2.0.7 without emulation. The only problem I have encountered is that there is no "Remember - This forum is in 'Maintenance Mode'." message displayed.
I am not sure why. Could it be to do with the fact I switched to utf-8 British-English for the forum?
Anyway, not a huge deal, the point is the mod does work, but that text display would be very handy :).
Your theme may not have it - not all themes do.
Quote from: Sir Cumber-Patcher on January 31, 2014, 12:13:15 AM
Your theme may not have it - not all themes do.
I definitely has it as it shows with the main admin account, just not the 'approved accounts' so i'm not sure what the issues is :(. Again, not a huge deal but I just thought I would mention it.
Nice mod :D
Turkish (utf8) translation
$txt['permissionname_admin_maintmode'] = 'Bakım modunda foruma girebilir';
$txt['permissionhelp_admin_maintmode'] = 'Bu seçenek kullanıcının bakım modunda forumda gezinebilmesini sağlar.';
Works great !!.. cheers for that ;)
Hello. Before is starting to write my problem, i want to apoliogize about my english skill. I live in hungary, and the English Education system, not the best here. Thank you.
The problem: I installed the SMF 2.0.14 and Simpleportal 2.3.7. I made a forum for the Role Play server, so i make Admin1,2,3,4, Admin Controller membergroups. I want to set who can see the forum While the maintenance mod activated, so i donwloaded the "Allow Access in Maintenance mod" I set the privileges correctly, but the problems started here.. The user logged succesfully to the server, but he Did't see the main page, just the Forum section. He couldn't see the Blocks, etc etc...