vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=93253

Restrict/allow users/groups - non vb pages
by VirtualBurn
31 Jul 2005 04:22

1 Attachment(s)
This hack will enable you to;
  • Stop Guests viewing non-vb pages
  • Stop Registered users viewing non-vb pages
  • Prompt with custom information
  • Allow 'specified' Group to access

For example:

This code stops my guests (ID:0) and my registered users (ID:2) from accesing the non-vb pages but with let the 'Premium Member' group (ID:9) walk right in.

####################################################

1. Create new phrase [ACP --> Lang & Phrases --> Phrase Manager --> Add New Phrase]

Phrase Type: Permissions
Varname: nonvb_restrict
Text: Your Message

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

####################################################

2. Create new Template [ACP --> Styles & Templates --> Style Manager --> Add new template]

Style: Default style
Title: nonvb_restrict
template: Copy below
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

####################################################

3. Protect Pages

In each of the non-vb pages you wish to protect find:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and add the following code after:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

change the numbers in red as you desire.
  • 0 = user ID 'Guest'
  • 2 = group ID 'Registered'
  • 9 = group ID 'Premium'

This has been tested, implemented and working.

Original code by 'Gary King' although his hack was different, various questions and suggestions throughout the thread prompted me to put this together.

Corriewf 01 Aug 2005 06:48

AWESOME JOB! I have an irc chat page which is not integrated with vb so this helps alot.

Corriewf 01 Aug 2005 06:49

Oh and could you please attach a zip file with the instructions please?

VirtualBurn 02 Aug 2005 01:55

All the instructions are above.

That is the same reason I put this together, I have a live support page which uses PJirc, I also use it to restrict groups to the ticket support system.

Once you have configured the last bit of code, you can insert it into any of your vb or non-vb pages so they will see your custom message instead of the standard vb 'you do not have permission to view this page'

Adrian Schneider 02 Aug 2005 02:34

Just a note:

You can remove:

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

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

with

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

as vBulletin does this for you. :)

VirtualBurn 02 Aug 2005 03:34

That's real good of you to advise some changes, thanks alot. :)


All times are GMT. The time now is 00:46.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.