PDA

View Full Version : Updating Settings in the Admin Panel


futureal
08-30-2002, 06:30 AM
Here's a question:

I have added a value to the "setting" table. However, I am updating that value *without* going through the "Update Options" part of the Admin CP (it is in a different part of the admin CP).

How do I tell vBulletin that a setting has changed? I've noticed that when I change my setting, I have to go to "Update Options" and click "Submit" in order to make my setting take effect -- even though it was actually changed somewhere else. I am assuming that the Options are cached somewhere to reduce queries, so I guess I really just need to know how to force the system to re-query for updated settings.

The reasoning behind my new setting is to have an on/off control for part of my arcade, without making any additional queries around the forums. Right now I have it fully integrated with the showthread system, at a cost of only a single query.

Thanks in advance for any help that anyone can provide.

Scott MacVicar
08-30-2002, 06:37 AM
its in the template table with the title of options, once you've added something to the setting table run this query.

UPDATE template SET template=CONCAT(template,'\n\$VARNAME = 1;\n') WHERE title='options'

where varname is whatever and 1 being on and 0 being off as usual :)

futureal
08-30-2002, 07:02 AM
Got it. Works great now, thanks!

Erwin
08-30-2002, 07:10 AM
Thanks PPN for that tip. I've always wondered that... frustrating when I am changing servers, and I am trying to switch my forums on manually in phpmyadmin. :)

Scott MacVicar
08-30-2002, 07:19 AM
Had to edit it there stupid newlines being removed :E