MyBB Community Forums

Full Version: Bad word filter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello,
Simple problem, perhaps somebody can help me?

I have a word that I want to be censored on my forum. So I add the word in admin CP -> configurations -> Word Filters.

I add a word "whatever123" and it exchange into "space". So when somebody writes it it will change into an empty space.

So, when somebody types a message
"
Hi everybody,
My name is whatever123
I am a guy
Bye
"

It will be visible as:

"
Hi everybody,
My name is  
I am a guy
Bye
"

BUT!
When somebody types a message:
My name iswhatever123
OR
My name is whatever123I
OR
My name is whatever123Iam

The word "whatever123" will stay there. How can I get rid off it when its surrounded by other letters/words?
I thought I could add it to filter in the following way "#whatever123" or "%whatever123", but it doesnt work.

Any advice would be highly appreciated!
King regards!
(2018-06-10, 09:23 AM)Ramireo Wrote: [ -> ]Hello,
Simple problem, perhaps somebody can help me?

I have a word that I want to be censored on my forum. So I add the word in admin CP -> configurations -> Word Filters.

I add a word "whatever123" and it exchange into "space". So when somebody writes it it will change into an empty space.

So, when somebody types a message
"
Hi everybody,
My name is whatever123
I am a guy
Bye
"

It will be visible as:

"
Hi everybody,
My name is  
I am a guy
Bye
"

BUT!
When somebody types a message:
My name iswhatever123
OR
My name is whatever123I
OR
My name is whatever123Iam

The word "whatever123" will stay there. How can I get rid off it when its surrounded by other letters/words?
I thought I could add it to filter in the following way "#whatever123" or "%whatever123", but it doesnt work.

Any advice would be highly appreciated!
King regards!

Use the '*' without the quotes. Asterisk symbol is used as a wildcard for MyBB's 'Word Filter' function.
Thanks for the answer!
didnt work.. I tried:

*wordIwanttoremove

wordIwanttoremove*

*wordIwanttoremove*

the word is still there, while e.g. surrounded by:
whateveRwordIwanttoremove
(2018-06-10, 01:44 PM)Ramireo Wrote: [ -> ]Thanks for the answer!
didnt work.. I tried:

*wordIwanttoremove

wordIwanttoremove*

*wordIwanttoremove*

the word is still there, while e.g. surrounded by:
whateveRwordIwanttoremove

Are you using this in the ACP?

NOTE: The Word column has been blurred due to bad words being used, I did not want to get into trouble with the mods in MyBB.com. 
But... you get the idea.

Most important is to choose the replacement word to replace the bad word. Click on the SAVE FILTER button, too! If you do not, then it will not work. 

You also see in the Word line box description where it says to use the '*' for wildcard letters or numbers.

[Image: 81e8df9a9c6dcc4211fc34620e8689f5.png]
Thanks for the answer!
I really appreciate it Smile


Thats exactly what I am doing -> Admin Control Panel -> Configuration -> Word Filters.

I can see the "asterisk advice" next to "add filter":

Word - I type the WordIwantToRemove:
*WordIwantToRemove*

Replacement:
myreplacement

Nothing works..
MAYBE its because the WordIwantToRemove has ":" next to it?
WhateverHereWordIwantToRemove:SomenextWord
I tried changing ":" with some random letter, but still - asterisk doesnt work..


I dont know, but perhaps there is some other way to do it? Some other plugin or.. Idk..
(2018-06-10, 08:29 PM)Ramireo Wrote: [ -> ]Thanks for the answer!
I really appreciate it Smile


Thats exactly what I am doing -> Admin Control Panel -> Configuration -> Word Filters.

I can see the "asterisk advice" next to "add filter":

Word - I type the WordIwantToRemove:
*WordIwantToRemove*

Replacement:
myreplacement

Nothing works..
MAYBE its because the WordIwantToRemove has ":" next to it?
WhateverHereWordIwantToRemove:SomenextWord
I tried changing ":" with some random letter, but still - asterisk doesnt work..


I dont know, but perhaps there is some other way to do it? Some other plugin or.. Idk..

There is something that I am missing here. 

Here's are 2 examples that I can show...

Word           Replacement
motherf--k*  motherfooker  (The dashes are actually letters - You get the idea)
--shole         nuthole

Your example...

Word                           Replacement 
WordIwantToRemove    ILikeThisWord
*IwantToRemove          ILikeThisWord
WordIwantTo*              ILikeThisWord

In the word that you want to replace with, don't use ':' or any other symbol except for the '*'. (without quotes)

That's the best way that I can explain this.
well, it doesnt work..
It replaces a word ONLY when a word is surrounded by empty spaces on the left and right. But thats it.
Nothing seems to work
(2018-06-11, 12:51 PM)Ramireo Wrote: [ -> ]well, it doesnt work..
It replaces a word ONLY when a word is surrounded by empty spaces on the left and right. But thats it.
Nothing seems to work

That's odd...

Maybe one of the developers will look at this and offer a solution.

I wish I could help more, but I have run out of answers.
I heard you can do it by something called "mycode". Do you know anything about that?
Form the attempts described above I tried to reproduce this and what I have found is:
The filter is working perfectly, with or without the * sign. But there are improvements required.

1. If you try to filter stone with metal it works fine (spaces surrounded).
2. If you try to filter stone* with metal the word 'stone' will not be replaced until a character other than space is appended. For example 'stoner' will be replaced perfectly. The behavior should not be like that. The filter should occur with or without character appended.
3. Currently it is considering '*' as a single character. So to filter out 'stoneman' or 'stoneboy' you need to place the target word as 'stone***'. which is again wrong. Single character should be represented by '?' and '*' should be representing 0 or more characters.

There is, ofcourse an issue with filtering and needs to be improved. Good catch. But I'd like to listen from other devs before moving it to Github.
For now, moving it to 1.8 bugs and issues.
Pages: 1 2