View Full Version : Update vB options when adding a new setting

23 Nov 2001, 13:45
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:
$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.