The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#12
|
|||
|
|||
How do you know which option goes to which bit position value?
|
#13
|
|||
|
|||
Quote:
Another way you can find out some of the values is to go (in the admicp) to Maintenance > Execute SQL Query, and look at the Automatic Query list. There are automatic queries to set all users to receive admin emails or not, so if you select one of those queries you can see how it's changing the database. If you choose "Yes - Receive Admin Emails" and press continue, you'll see this: Code:
UPDATE user SET options = options + 16 WHERE NOT (options & 16) and you can tell from that that the value you want for that option is 16. (BTW, you can choose a query from the Automatic Query menu and press Continue, and it will show you the query but not execute it unless you press Continue again). |
#14
|
|||
|
|||
Thanks Kevin, great information.
|
#15
|
|||
|
|||
Thanks all for your help.
Quote:
Quote:
Now I have another question that's related to this. Basically I have set up some custom profile buttons for members' communication preferences. They are simple Yes/No radio buttons: (1) Newsletter subscription (monthly): Yes/No (2) Digest subscription (weekly): Yes/No (3) Promotional email subscription (monthly): Yes/No I have set every member to "Yes" for both, but I want to change everyone who doesn't receive admin emails to "No" for (1), (2) and (3) and everyone who doesn't want PM notification to "No" for (2). This is to ensure I don't annoy anyone with unwanted emails. Can anyone please advise what queries I would need to run to do this? |
#16
|
||||
|
||||
Custom profile fields are are in the userfield table, to alter those its something like
PHP Code:
|
#17
|
|||
|
|||
So if, for example, I want to change people everyone who doesn't receive admin emails to "No" for newsletter subscription it would be:
PHP Code:
Something doesn't seem right about the above code. Shouldn't field 16 =0 ? |
#18
|
|||
|
|||
You'd need something like:
Code:
UPDATE user LEFT JOIN userfield USING(userid) SET fieldX='No', fieldY='No', fieldZ='No' WHERE (options & 16) = 0 and Code:
UPDATE user LEFT JOIN userfield USING(userid) SET fieldY='No' WHERE (options & 4096) = 0 of course you need to set X, Y, and Z to the actual ids. |
Благодарность от: | ||
hopspitfire |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|