turn off forums, but allow moderators

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dalai
    Senior Member
    • Oct 2005
    • 149
    • 3.6.x

    turn off forums, but allow moderators

    hi is there a way to turn off the forums, but still allow access for the moderators, is it set in config.php

    Craig
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    #2
    No, not for Moderators. Only Admins and Super Mods can access a closed forum.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment

    • borbole
      Senior Member
      • Feb 2010
      • 3074
      • 4.0.0

      #3
      Originally posted by dalai
      hi is there a way to turn off the forums, but still allow access for the moderators, is it set in config.php

      Craig
      At the at the class_bootstrap.php file find the following code:

      PHP Code:
      if (!$vbulletin->options['bbactive'] AND
                  (
      $vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']))
              {
                  
      // show the board disabled warning message so that admins don't leave the board turned off by accident
                  
      $warning vB_Template::create('board_inactive_warning')->render();
                  
      $header $warning $header;
                  
      $footer .= $warning;
              } 
      And change it to:

      PHP Code:
      if (!$vbulletin->options['bbactive'] AND
                  (
      $vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) OR (is_member_of($vbulletin->userinfo7)))    
              {
              
                  
      // show the board disabled warning message so that admins don't leave the board turned off by accident
                  
      $warning vB_Template::create('board_inactive_warning')->render();
                  
      $header $warning $header;
                  
      $footer .= $warning;
              } 

      Find this other code:

      PHP Code:
      // check that board is active - if not admin, then display error
              
      if (
                  !
      defined('BYPASS_FORUM_DISABLED')
                      AND
                  !
      $vbulletin->options['bbactive']
                      AND
                  !
      in_array(THIS_SCRIPT, array('login''css'))
                      AND
                  !(
      $vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'])
              ) 
      And change it to:

      HTML Code:
      // check that board is active - if not admin, then display error
              if (
                  !defined('BYPASS_FORUM_DISABLED')
                      AND
                  !$vbulletin->options['bbactive']
                      AND
                  !in_array(THIS_SCRIPT, array('login', 'css'))
                      AND
                  !($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'])
                      AND
                  (!is_member_of($vbulletin->userinfo, 7))    
              )
      This will allow the moderators witht he default gid 7 to enter the forums as well when being off line. If your moderator groups has got another custom id, then replace 7 at

      PHP Code:
      (!is_member_of($vbulletin->userinfo7)) 
      for both instances with the custom gid. Hope it helps.

      Comment

      • rannski
        New Member
        • Mar 2013
        • 4
        • 5.0.0

        #4
        hello. sorry to revive an old thread but this code edit worked for me. however, i want to include also superadmins (userinfo 5) in the list of allowed so how should i change this line to include it?

        PHP Code:
        (is!_member_of($vbulletin->userinfo7)) 
        thanks in advance.
        Last edited by rannski; Mon 8 Apr '13, 10:20pm.

        Comment

        • rannski
          New Member
          • Mar 2013
          • 4
          • 5.0.0

          #5
          never mind. i found a hack for it http://www.vbulletin.org/forum/showthread.php?t=244094


          Comment

          Related Topics

          Collapse

          Working...