![]() |
is_member_of improvement.
Requested by Boofo
Some people want to check for multiple groups at once, instead of having to slam OR is_member_of(anothercheck) together for each group, if you apply this hack it will be simple to check for multiple groups. The format for the function is now, Code:
is_member_of($bbuserinfo, ID1, ID2, ID3,.....); Find the function in includes/functions.php ~line 190 and replace it with the following. This should not affect any current is_member_of conditionals you're using. PHP Code:
|
You have once again proven yourself the "Master"! Thank you, very much, sir. ;)
[high]* Boofo skulks away having proven to not be a good Grasshopper to Master. :([/high] |
Quote:
|
Wouldn't it be easier to allow the second argument to be an array with usergroup id's?
ie. PHP Code:
|
MY initial use of array() in the conditionals didnt work, maybe because of the way it is evaluated.
If you can work out if array() works in conditionals it would be an easy modification to the code |
Try this:
PHP Code:
|
Interesting hack, should be useful to many :)
|
What exactly do i raplace????
Code:
// ###################### Start is member of ####################### |
Replace all of it unless you've previously hacked that function.
|
replaced it all and i got this:
Code:
Fatal error: Cannot redeclare is_member_of() (previously declared in /usr/home/yates238/public_html/includes/functions.php:176) in /usr/home/yates238/public_html/includes/functions.php on line 208 |
All times are GMT. The time now is 01:22 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|