vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Allow other usergrups to access forum when disabled... (https://vborg.vbsupport.ru/showthread.php?t=287385)

liamwli 09-01-2012 10:00 PM

Allow other usergrups to access forum when disabled...
 
1 Attachment(s)
This hack will allow you to choose extra usergroups to access the forums when they have been disabled.

This could be useful if, say you wanted to let Super Moderators access when disabled, or maybe when you first make the forum, a small group of testers...

I don't know if this will be used, but it could come in useful :)

THIS REQUIRES CODE CHANGES!!

Due to the lack of a hook at the location I need, you will have to edit the code of the file:

Code:

/includes/class_bootstrap.php
BACKUP THAT FILE FIRST!!

Find the following line:

Code:

// check that board is active - if not admin, then display error
Then find the first { symbol.

Delete all the code until you reach the lines that read:

Code:

// #############################################################################
                // password expiry system

Make sure you keep those lines and the first {!!

Replace it with this:

Code:

// ############################################################
// ################## CODE MODIFICATIONS ######################
// ############################################################

require_once(dirname(__FILE__).'/gaccess.php');

}

Once that is done, save the file....

Now, download the zip file below, and upload the file 'gaccess.php' to the /includes directory.

Once that is done, import the XML file as a product.

You can then configure the usergroups you want to have access in: Settings --> Options --> Turn your vbulletin on and off --> The new option at the bottom ;)

LIKE I SAID, MAKE SURE YOU BACKUP THAT FILE BEFORE EDITING!!

Any issues, PM me or reply to this thread :)

liamwli 09-02-2012 03:52 PM

Reserverd

borbole 09-02-2012 07:29 PM

You can use the global_bootstrap_init_complete hook to do this with a mod.

inshajeex 12-01-2012 07:28 AM

working nice!!!


All times are GMT. The time now is 11:51 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01001 seconds
  • Memory Usage 1,715KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete