The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hello,
I would like to use my forum for mailing list purposes too, and I want to send emails only to the members that have the "Receive emails" option enabled. I looked on the vbulletin 3 database, and I saw that the user options preferences are coded with a number, so it's quite difficult to see which number represents the desire to receive emails... Can anyone help me "decoding" the number? Thanks ![]() |
#2
|
||||
|
||||
![]()
The user options are just a bitfield.
From init.php PHP Code:
So if you want to get all users which have this options enabled;: [sql]SELECT username, email FROM user WHERE options & 16[/sql] |
#3
|
|||
|
|||
![]() Quote:
![]() It works fine ![]() |
#4
|
|||
|
|||
![]()
Hi guys, I'm not familiar with bitfields... There's a way to set the bit #16 to 0 with just a mysql query?
Thanks ![]() |
#5
|
||||
|
||||
![]()
Yes. Bit #16 = 2^15 = 32768
[sql]UPDATE table SET field=field-32768 WHERE field & 32768[/sql] Or to set it where it is not set [sql]UPDATE table SET field=field+32768 WHERE NOT (field & 32768)[/sql] |
#6
|
||||
|
||||
![]()
Except, I think he means the bit valued at 16, not the 16th bit . In the above options case the value should be 16.
![]() |
#7
|
||||
|
||||
![]()
But he said bit #16
![]() |
#8
|
||||
|
||||
![]() Quote:
![]() |
#9
|
|||
|
|||
![]() Quote:
or where could I find more info? google doesn't help ![]() |
#10
|
||||
|
||||
![]()
Correct me if I'm wrong - but you want to set the 'adminemail' option (which is bit 5, value 16) to zero ?
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|