Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 12 Aug 2012, 04:23
chefy chefy is offline
 
Join Date: Jul 2012
Closed forum and admins

On my forum I have 7 admins. As you know, when the forum is closed, the only ones who can still browse and even post on the forums just like if these were open are the admins. I want to remove this ability from 2 of my 7 admins so when they log in they will see the same message that every user get: "the forum is closed" and they will not be able to do anything until the forums come back to the open status just like any regular user. Is this possible?
Reply With Quote
  #2  
Old 12 Aug 2012, 12:09
watty005 watty005 is offline
 
Join Date: Apr 2010
Real name: Craig Watkins
Can you not create a different usergroup for these 2 admins and apply the permissions from there??
__________________
http://www.thewarzworld.com A WarZ Fan site
Reply With Quote
  #3  
Old 12 Aug 2012, 15:51
chefy chefy is offline
 
Join Date: Jul 2012
I don't believe that there is a specific setting to prevent admins from browsing the forums when closed.
Reply With Quote
  #4  
Old 12 Aug 2012, 16:11
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
I think you would have to modify the class_bootstrap.php file manually in order to add in the userids for those two admins. Basically, if they have admin permissions and have access to the admincp, then they have access to the forum when it is off.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #5  
Old 12 Aug 2012, 16:18
chefy chefy is offline
 
Join Date: Jul 2012
Can't locate the file class_bootstrap.php on my vB 3.8.7 installation
Reply With Quote
  #6  
Old 12 Aug 2012, 17:08
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Ah, I was looking at the vB4 files. Check global.php
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #7  
Old 12 Aug 2012, 17:23
chefy chefy is offline
 
Join Date: Jul 2012
Here is the code snippet that controls that:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

So I think that I should play with this line:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

With that conditional, the system will detect all my admins (there are 7 of them) and allow them to use the forums even when closed. How can I also evaluate if they are let's say userid=1 and userid=2 to disallow them access i.e. send them to the else part of the code?
Reply With Quote
  #8  
Old 13 Aug 2012, 03:29
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Maybe... (not testing and I'm not sure my parenthesis add up correctly):

if (!($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) AND (!in_array($vbulletin->userinfo['userid'],array(1,2)))

I always play with these things on my test site when it comes to conditions, but that's the basic idea.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #9  
Old 16 Aug 2012, 20:51
chefy chefy is offline
 
Join Date: Jul 2012
Lynne, just tested your code and not only it didn't work but also made every .php of my forum (i.e. index.php, forumdisplay.php, showthread.php) to result in a blank page

Could you please review the code again?
Reply With Quote
  #10  
Old 16 Aug 2012, 21:20
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
$vbulletin['userid'] should actually be $vbulletin->userinfo['userid'], so that was wrong. (But, you'll still need to check the parenthesis as that will cause issues if they don't add up correctly.)
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #11  
Old 16 Aug 2012, 21:43
chefy chefy is offline
 
Join Date: Jul 2012
In your code snippet you were already using $vbulletin->userinfo['userid']

Or you mean that instead of that I should use $vbulletin['userid']?
Reply With Quote
  #12  
Old 18 Aug 2012, 15:37
chefy chefy is offline
 
Join Date: Jul 2012
Any ideas please?
Reply With Quote
  #13  
Old 18 Aug 2012, 16:46
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Whoops, I misread my code - the variable name is incorrect. But, I don't think the parenthesis are correct which I stated before. Please check them before trying that code.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #14  
Old 22 Aug 2012, 17:33
chefy chefy is offline
 
Join Date: Jul 2012
What variable name is incorrect? $vbulletin['userid'] or $vbulletin->userinfo['userid']?

Or even better, this is the code that you posted:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


I have been playing with the parenthesis for hours with no luck. Maybe because I'm not a programmer. Could you please take a look?
Reply With Quote
  #15  
Old 23 Aug 2012, 00:08
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
I meant my variable name was correct (argh, I guess I didn't have enough coffee before I posted).

I see 5 left parenthesis and 4 right parenthesis. That isn't going to work.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 03:33.

Layout Options | Width: Wide Color: