The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Usergroup check in plugin
Hopefully you will be able to understand my needs here. I will try to explain the best i can.
I have the following piece of code in a plugin i am trying to work with: Code:
$schbot = ($vbulletin->superglobal_size['_COOKIE'] == 0 AND preg_match("#(google|msnbot)#si", $_SERVER['HTTP_USER_AGENT'])); // check if user is in a certain usergroup and if system is enabled if ($show['guest'] AND !$schbot AND $vbulletin->options['schison']) I have read about the conditionals, and got the following: Code:
is_member_of($bbuserinfo, 2) Code:
$schbot = ($vbulletin->superglobal_size['_COOKIE'] == 0 AND preg_match("#(google|msnbot)#si", $_SERVER['HTTP_USER_AGENT'])); // check if user is in a certain usergroup and if system is enabled if (is_member_of($bbuserinfo, 2) AND !$schbot AND $vbulletin->options['schison']) Basically the code is making sure i am not from google or msn, and if i am in usergroup 2 it will fire a message. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|