Back to vBulletin 3 Articles

Update vB options when adding a new setting
by Chen 23 Nov 2001

Ok, I'll be the first.
This is mostly for hack writers though.

When you add a new entry to the setting table (and by that adding a new vB option), be sure to do this after you insert the setting:
Code:
$newoptions=generateoptions();
$DB_site->query("UPDATE template SET template='$newoptions' WHERE title='options'");
This is because the options the forum uses, aren't pulled from the setting table, but from the template named options.
So unless you do the above, the new $variable for the added setting will be empty until the user goes into his Change Options screen and updates the options.

This is only applicable if you are using some kind of installer script to install the hack.
Otherwise, be sure to tell the users to update their options before using (but after installing!) the hack.

Similar Mods

[HTL] & [Normal] Setting Varname Next to the Setting Title. vBulletin 3.0 Full Releases

vblts.ru supports vBulletin®, 2022-2024