The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
SQL Command to Turn On/Off Registrations?
We'd like our admins to be able to turn on/off registrations in one click from our private admin sidebar (on forum home).
Does anyone know what SQL command I would need to put in a plugin to make this possible? Thank you! |
#2
|
|||
|
|||
You'll need more than a SQL command to do it.
First, the SQL command you are looking for is UPDATE (TABLE_PREFIX) settings SET value= (0 or 1, I'm sure you can figure out which is which here) WHERE varname='bbactive'; HOWEVER, this is not sufficient. vBulletin actually has a datastore for options, which is actually what it uses when applying the results for any options you've configured. Using a SQL command to alter that won't work, since the actual datastore field contains every single option in the Options section of the ACP. Instead, your plugin would need to pull in the adminfunctions.php file and run the build_options() function within that. And of course, you'd want to ensure to secure it so that only proper users could access it, but hopefully that's common sense :P. |
Благодарность от: | ||
findingpeace |
#3
|
||||
|
||||
Thanks so much!
|
#4
|
|||
|
|||
Somehow, I misread the thread and thought it was for turning the board on and off. To do that for allowing registration, change bbactive in the above SQL command to allowregistration.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|