Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: shin111 on January 30, 2010, 03:52:08 PM

Title: Edit Censored Words List?
Post by: shin111 on January 30, 2010, 03:52:08 PM
I accidently added a word I shouldnt've to the 'censored word list', actually -- just some spaces, which caused all the forum's posts to disappear.

Adding ********** causes problems too, but I clicked 'whole word only' and thankfully it came back.

Now I'd like to remove these from the list.

Can I fix this?
Title: Re: Edit Censored Words List?
Post by: Arantor on January 30, 2010, 03:55:52 PM
Just go to Admin > Posts and Topics > Censored Words, and remove the word you don't want to be censored - and the matching word it's replaced with. Then save - the blanking out of the row will remove that word.
Title: Re: Edit Censored Words List?
Post by: shin111 on January 30, 2010, 04:11:42 PM
Well, I wondered if there was a way to get at the actual list or replace the file with it with the original.
Title: Re: Edit Censored Words List?
Post by: kat on January 30, 2010, 04:37:33 PM
I think that'll be stored in your database, so you'd need to fiddle about with phpmyadmin.


Not certain of that, though.
Title: Re: Edit Censored Words List?
Post by: shin111 on January 30, 2010, 05:55:51 PM
I'm just kindof concerned, because if someone, say a junoir mod, enters a word in there that I don't know what it is, and messes up the forum posts because of it, it could be a hassle to fix.

Title: Re: Edit Censored Words List?
Post by: shin111 on January 30, 2010, 06:02:55 PM
Maybe I'm blind but I can't seem to find it in the database either.  :o
Title: Re: Edit Censored Words List?
Post by: live627 on January 30, 2010, 06:30:16 PM
censor_proper and censor_vulgar in {db_prefix}settings
Title: Re: Edit Censored Words List?
Post by: shin111 on January 30, 2010, 07:10:57 PM
I'm in PhpMyAdmin and I see a list like this?

#
# Structure smf_ban_groups
# Structure smf_ban_items
# Structure smf_boards
# Structure smf_board_permissions
# Structure smf_calendar
# Structure smf_calendar_holidays
# Structure smf_categories
# Structure smf_collapsed_categories
# Structure smf_log_actions
# Structure smf_log_activity
# Structure smf_log_banned

I don't see it?

Sorry I am new to this.
Title: Re: Edit Censored Words List?
Post by: live627 on January 30, 2010, 07:21:58 PM
on the left it is the table named smf-settings
Title: Re: Edit Censored Words List?
Post by: Arantor on January 30, 2010, 07:35:04 PM
/me is confused why you'd go into the database, when the edit dialogue lists all the current censor triggers.
Title: Re: Edit Censored Words List?
Post by: shin111 on January 30, 2010, 07:41:12 PM
It does? It didn't seem to to me.

Let me see.. Hmm.. I guess it works that way after all.. how odd, it seemed to work entirely differently.

I'd enter a word, and then it would be done and disappear. I guess I was just mistaken in how it worked?
Title: Re: Edit Censored Words List?
Post by: Nick Whetstone on February 09, 2010, 07:29:42 PM
Is this issue resolved? I couldn't decide on whether or not to think it was from your last post. If solved, please mark it as so. If not, please explain.
Title: Re: Edit Censored Words List?
Post by: shin111 on February 09, 2010, 09:44:18 PM
Marked! I didn't know you could do that thanks!
Title: Re: Edit Censored Words List?
Post by: ispasov on May 04, 2010, 07:23:25 AM
Hi, I have another problem.

I marked a word for censoring into that "..." and checked the option "mark whole words only". My problem is that I shtill get "..." in the middle of the words that contain that word like aaa"..."aaaa.

How to fix this? SMF 1.1.11
Title: Re: Edit Censored Words List?
Post by: Arantor on May 04, 2010, 07:26:38 AM
What *exactly*?

aaa...aaa shouldn't trip on the ... if whole words only is marked, assuming you have no mods that already changed it.
Title: Re: Edit Censored Words List?
Post by: ispasov on May 04, 2010, 07:40:47 AM
I am sorry but I couldn't fully understand your answer. Maybe is my English. :'(

My forum is in Bulgarian and the censored word is a part of other words which don't have to be censored. Example XXX is the censored word which I want to transform into YYY , But it is a part of another word like abcdXXXefj which is a normal word, no need to censore.

The manager of censored words change the word like this abcdYYYefj instead of leave it as it is. I don't want that.

Sp which option should I check about censored words?
Title: Re: Edit Censored Words List?
Post by: Arantor on May 04, 2010, 08:29:19 AM
Please give me ACTUAL examples where it occurs on your forum, using the actual words there.
Title: Re: Edit Censored Words List?
Post by: ispasov on May 04, 2010, 08:40:17 AM
OK. I am writing them in Bulgarian.

еба - This is the word for censoring.
Дебати is the word that appears Д...ти.

Title: Re: Edit Censored Words List?
Post by: Arantor on May 04, 2010, 08:44:01 AM
Are you using UTF-8 or not?
Title: Re: Edit Censored Words List?
Post by: ispasov on May 04, 2010, 08:49:04 AM
Quote from: Arantor on May 04, 2010, 08:44:01 AM
Are you using UTF-8 or not?

Yes I am. I have marked UTF-8 during installation.
Title: Re: Edit Censored Words List?
Post by: Arantor on May 04, 2010, 09:02:18 AM
This is a flaw in PCRE you cannot get around.

The core reason is that SMF and thus PHP are using regular expressions based on \w and \W - that a character is or is not a character that can be part of a word.

To quote the PHP manual:

QuoteMatching characters by Unicode property is not fast, because PCRE has to search a structure that contains data for over fifteen thousand characters. That is why the traditional escape sequences such as \d and \w do not use Unicode properties in PCRE.

You're using UTF-8, a form of Unicode (yes yes, I know, let's just keep it simple), and this doesn't support the \w methodology used.

Options: one, rewrite it in a different, and significantly slower, form, or two accept that it can't be dealt with as it's a limitation of PHP, not SMF.
Title: Re: Edit Censored Words List?
Post by: ispasov on May 04, 2010, 09:20:26 AM
OK, could you help me to rewrite it in something else.
I hope that the users will be able to see cyrillic characters, right?
Title: Re: Edit Censored Words List?
Post by: Arantor on May 04, 2010, 09:31:40 AM
I don't think you understand.

It will slow your forum down by a MASSIVE amount, no matter how cleverly written it is, because censortext is called in LOTS of places, and using regular expressions with PCRE means it's using compiled code which will always be faster than non compiled code.

I'm not prepared to rewrite you a non-native (interpreted, not compiled) version that is UTF-8 safe because it will KILL performance of your forum.
Title: Re: Edit Censored Words List?
Post by: ispasov on May 04, 2010, 09:35:09 AM
OK, so lets leave it like this and wait for better times.  O:)
Thanks, I will keep follow the posts of this forum for more information.
Title: Re: Edit Censored Words List?
Post by: Arantor on May 04, 2010, 09:42:50 AM
It won't ever change. Let me explain the problem.

You have your body text, and you're comparing it, letter by letter by letter by letter, one at a time, against a list of about 15,000 different known characters that can make up a word, to match this.

And you're doing this for every letter of every post, every letter of every subject, every letter of every signature - and other places. It can't ever be fast, which is why the PHP PCRE library (which is what's doing the work) doesn't support it.
Title: Re: Edit Censored Words List?
Post by: ispasov on May 04, 2010, 09:56:14 AM
OK. Thank you. That's life. :)