The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Help with the numeric value present in DB when defining forum permissions
Hi Everyone!
I am trying to post a new thread using PHP code that I have written myself. I have checked the posting permissions and what I did was to retrieve the information from the relevant table in the DB. When I get the information, I have the field "forumpermissions" which resides within a table of the same name, but I don't understand how the numeric value changes when you adjust the permissions for a particular forum. Any suggestions on how this numeric value changes when permissions are updated? Thanks in advance. |
#2
|
||||
|
||||
You can see the bitfield values in the file includes/xml/bitfield_vbulletin.xml I think there may be an article about this also so you should probably try a search over in the articles forums.
|
#3
|
|||
|
|||
Thanks for your reply,
I saw the bitfield but I cant understand how it generates the number when the permission changes. I mean : The value in the "forumpermission" field of the db is a kind of result of a mathematical operation of the bitfields in the "bitfield_vbullettin.xml"? How can I detect the changes between the different permissions? Are there some vb classes that performs the control of the forum permissions which I can use? Thanks in advance. |
#4
|
|||
|
|||
Is it that you're not familiar with bitfields, or that they aren't working like you'd expect?
If it's the first one, then I guess the answer is that it basically adds together the values for each permission. You can check for a particular permission by using the & operator (bitwise AND), like "if ($forumpermission & 64)" will be true if permission 64 is set (whatever that is). It makes a lot more sense if you look at the values in binary, since each permission value will correspond to one bit in the number. If you understand all that but they aren't working like that, then I don't know. |
#5
|
|||
|
|||
Thanks for your suggestion.
I checked the permissions using the (&) and it works. Your help has been really appreciated. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|