The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
is_member_of problem
hi
i don't understand why this https://vborg.vbsupport.ru/showthrea...17#post1425217 is a problem the function is built this way: PHP Code:
PHP Code:
PHP Code:
does somebody know what i'm making false? |
#2
|
|||
|
|||
Whats the value of $vbulletin->options['login_groups']?
(You'll need to explode() it if it is a character delimited list of group Ids.) |
#3
|
|||
|
|||
The value is 2,3,4
It is a default fielt(textfield). So i thouth it is saved as 2,3 into the db and then i can just insert the value into the function |
#4
|
|||
|
|||
have to be
PHP Code:
|
#5
|
|||
|
|||
ok thx
|
#6
|
|||
|
|||
As nexialys has shown you need to explode it as 2,3,4 appears to PHP as string, like "2,3,4," so when you insert it into your function it would look like this: is_member_of($vbulletin->userinfo, "2,3,4") which as you have found won't work.
|
#7
|
|||
|
|||
but then it returns an array.
and in the functioninformation there is no array required, so i thought it must be a list of numbers.. thx |
#8
|
|||
|
|||
having read the next lines after the function is_member_of() { would have give you a hint, it verify if the $usergroupid is an array or not...
|
#9
|
|||
|
|||
have you nothing to do with your baby, instead of saying/writing that i'm not reading the whole function?:P
*joke* but yes, thats right i thought the whole time that this is also so a function which accepts a string like the documentation sais: Code:
* This function can be overloaded to test multiple usergroups: is_member_of($user, 1, 3, 4, 6...) |
#10
|
|||
|
|||
hum the function documentation have a typo then... you can report it to the official site
and yeah, i have a newborn, but i also have a wife and 3 other kids to take care of a 7 pounds baby.. lol... i take care of her when everybody is exhausted... |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|