View Full Version : Forum options bitfield help
jwocky
03-05-2015, 03:02 AM
I am just not understanding the concept of bitfields too well :(
Was hoping someone could help me with a simple task. I have a forum options table for a forum as '97989'. Is there an easy way to determine if "Forum is Open" is set to Yes or No via PHP ?
Thank you!
If you had your options in the variable $options, you could use this:
if ($options & $vbulletin->bf_misc_forumoptions['allowposting'])
{
// Forum Open
}
else
{
// Forum closed
}
That's assuming you have $vbulletin available. If not, the value is actually 2, so you could use if ($options & 2) instead.
jwocky
03-05-2015, 12:48 PM
If you had your options in the variable $options, you could use this:
if ($options & $vbulletin->bf_misc_forumoptions['allowposting'])
{
// Forum Open
}
else
{
// Forum closed
}
That's assuming you have $vbulletin available. If not, the value is actually 2, so you could use if ($options & 2) instead.
That worked perfectly! Thank you so much :D
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.