The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
So I could do this then to make it possibly easier:
Code:
include_once("includes/adminfunctions.php"); include_once("includes/adminfunctions_options.php"); if(new_mod_setting_board_offline){ save_settings(array('bbactive' => 0)); } if(new_mod_setting_board_online){ save_settings(array('bbactive' => 1)); } |
#12
|
|||
|
|||
Quote:
Code:
if ($oldsetting['varname'] == 'bbactive') $settings['my_new_bbactive'] = $settings['bbactive']; else if ($oldsetting['varname'] == 'my_new_bbactive') $settings['bbactive'] = $settings['my_new_bbactive']; so that is either one is changed, the other is set to the same value (of course you'd change my_new_bbactive to whatever the varname of your new setting actually is). I guess with this code, if someone changed both at the same time and saved, I'm not sure what would happen. If you think that's a problem you might want to check if both values are in the $setting array and have one take precedence or something. |
#13
|
||||
|
||||
I would not go around changing peoples settings they have set in the DB at all. I would just use this in my plugin.
PHP Code:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|