XF 1.4 Where is Board Active set in SQL?

.Rolex

New member
Hi,

I'm looking for where this option is turned on and off in the database.

Any help is appreciated!

.Rolex
 
Do you want to turn the forum on/off from the db? If so run this query:

Code:
UPDATE xf_option SET option_value = 1 WHERE option_id ='boardActive';

This will turn it on. To turn it off set option_value to 0.
I'm working on an automated maintenance script.



sweet. thank you sir :)
You also need additional code to invalidate the options cache. If you are doing that solely with a SQL query then the easiest way would be:

Code:
DELETE FROM xf_data_registry WHERE data_key = 'options'
 
Do you want to turn the forum on/off from the db? If so run this query:

Code:
UPDATE xf_option SET option_value = 1 WHERE option_id ='boardActive';

This will turn it on. To turn it off set option_value to 0.

You also need additional code to invalidate the options cache. If you are doing that solely with a SQL query then the easiest way would be:

Code:
DELETE FROM xf_data_registry WHERE data_key = 'options'

Does this still work on the current XF version? I'm doing something similar.

Which of these two queries would need to happen first, deleting the options cache or setting the board Active value?
Does the options cache need to be deleted again when turning the board back on via sql query?

Separately, what's the query needed to turn a board notice on?

Thanks!
 
It is working perfect with XF 2.2.12

have written a bash/shell-script for daily backups and im using the following commands:

Bash:
# current status
mysql -B -u ${db_user} -p${db_pass} -h ${db_host} ${db_live} -se "select option_value from xf_option where option_id = 'boardActive';"

# disable board
mysql -B -u ${db_user} -p${db_pass} -h ${db_host} ${db_live} -se "update xf_option set option_value = '0' where option_id = 'boardActive';"
mysql -B -u ${db_user} -p${db_pass} -h ${db_host} ${db_live} -se "delete from xf_data_registry where data_key = 'options';"

# activate board
mysql -B -u ${db_user} -p${db_pass} -h ${db_host} ${db_live} -se "update xf_option set option_value = '1' where option_id = 'boardActive';"
mysql -B -u ${db_user} -p${db_pass} -h ${db_host} ${db_live} -se "delete from xf_data_registry where data_key = 'options';"
 
Last edited:
Back
Top Bottom