1 (edited by frankpeng 2009-10-15 01:41)

Topic: How to update filter words by database operation?

Hi,
I have installed censoring table and set conf_value=1 for conf_name=o_censoring. After I logged in as admin, I can see all of the filter words. But I have to click update on EACH word, otherwise it won't work. The problems is that I have thousands of words and many databases. So I have to use program to do this job. Please enlighten me how to make it work after I load censoring table and set up config o_censoring=1?
I have deleted all php files in cache directory after I filled up censoring table and set up o_censoring=1. It won't help.
Is there another switch to activate the filtering function?
Please help!
Thanks a lot!

Re: How to update filter words by database operation?

frankpeng wrote:

So I have to use program to do this job. Please enlighten me how to make it work after I load censoring table and set up config o_censoring=1?

Please, post what program have you used?

frankpeng wrote:

Is there another switch to activate the filtering function?

Go to "<FORUM_URL>/admin/settings.php?section=features" and enable "Censoring" option.

Re: How to update filter words by database operation?

I am using shell scripts to fill up the censoring table.

I know how to enable censoring by using browser. 

Also I know how to enable censoring by directly changing config table in database. In the table config, conf_name o_censoring=1 means enable censoring. o_censoring=0 means disable censoring.

My problem is that it won't work after I fill up the censoring table and set up the config table o_censoring value.
I have to click the "update" button in the browser to enable the filtering word.

I went back to the database. What the "update" button did is to make a censor_cache.php in the cache directory and reset the filtering word in the censoring table.

Before clicking the "update" button, the censoring table is like this(for example):

id, search_for, replace_with
1,  shit,             s*h*i*t
2,  F*u*c*k       f-u-c-k
3, s-t-u-p-i-d     s*t*u*p*i*d

After click the "update" button of the first word, the censoring table changed like this:

2,  F*u*c*k       f-u-c-k
3, s-t-u-p-i-d     s*t*u*p*i*d
1,  shit,             s*h*i*t

Now the first filtering word works, the last two still not working. Seems very strange.