The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
What does this symbol do?
PHP Code:
Thanks |
#2
|
|||
|
|||
It's the bitwise AND operator: http://php.net/manual/en/language.operators.bitwise.php. $vbulletin->userinfo['permissions']['forumpermissions'] is a number which, when you look at it as a binary value, each bit is the state of one forum permission for that user. $vbulletin->bf_ugp_forumpermissions['custom_perm'] is a "mask" value with only one bit set, the bit corresponding to the "custom_perm" permission (whatever that is). So if you "bitwise AND" those two values, the result will be either 0 or non-zero, depending on whether or not the user has that permission.
Probably that's either too much or not enough of an explanation. If it's not enough, this might help: http://en.wikipedia.org/wiki/Bitmask |
#3
|
||||
|
||||
Ahh it's pretty confusing but i think i got an idea of what it does, thanks!
|
#4
|
|||
|
|||
Just to confuse you a little more ...
A double ampersand "&&" is the same as AND in that code. So it could also appear as this.. PHP Code:
|
#5
|
||||
|
||||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|