The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
let me try to explain.
like the above example: 32 16 8 4 2 1 this is 65, in your database you have a field called permissionwhatever to store that number (65), and if a usergroup has that value 65 it means they have full permission, each bit represent for a permission. if it's 64, then the value you don't have must be 1, 60 means without 1 and 4 and it cannot be any other number. so that's the way it realizes you don't have what permission. |
#12
|
|||
|
|||
Quote:
Quote:
Quote:
|
#13
|
|||
|
|||
Also have a look at this post: https://vborg.vbsupport.ru/showpost....62&postcount=4
Might help in understanding |
#14
|
|||
|
|||
Okay, I already completely understand how the vB permissions work
What I do not understand is this: Quote:
|
#15
|
||||
|
||||
Hmm, what exactly do you not understand?
2^0 = 1 2^1 = 2 2^2 = 4 2^3 = 8 2^4 = 16 ... As you can see, all numbers are even - except 1. So if you add them together, you will always get an even number if 1 is not included. 1 is 2^0, which means this bit must be set if a number is odd. |
#16
|
|||
|
|||
Oh!!! Yeah, now I understand.
When a number is an even number, it consists of such sub-numbers, as 2,4,8,16, but not 1. And when a number is odd, it has 1 included, so 3 & 1 works This is so cool... Thanks everyone. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|