Advanced Censor

Started by ziycon, September 19, 2013, 07:46:43 PM

Previous topic - Next topic

ziycon

Link to Mod

Advanced Censor
============

## Version: 0.3
##

## Instructions
##

- Post moderation needs to be enabled for this modification to work.
- You need to make sure that you have entered all the words that you want censored into the native censor feature within Simple Machines Forum by going to: Admin > Posts and Topics > Censored Words

## About
##

Flags any posts to be moderated that contain words listed as censored words .

## License
##

Please see the license.txt

## Features
##

- Flags post to be moderated if censored words are found within the post body

## Version: 0.3
##

v0.3
- Bug fix for a second empty delimiter error when there are no words in the censored word list.
- Bug fix, missing return statement.

v0.2
- Bug fix for an empty delimiter error when there are no words in the censored word list.

v0.1
- Added post flagging if the message body contains censored words.


Srinib

How is this mod different from the standard "word censor" feature we already have?

Arantor

If a word is found in a post that is in the censored words list, it automatically gets post moderated, meaning that it effectively filters it out from the regular users and only moderators see it.

dougiefresh

I installed this mod and got this error:
Quote
2: strstr() [<a href='function.strstr'>function.strstr</a>]: Empty delimiter
Apply Filter: Only show the errors from this file
File: /blah/blah/blah/blah/board/Sources/Subs-AdvancedCensor.php
Line: 33

Block of code involved:
    for ($i = 0, $n = count($vCensorVulgar); $i < $n; $i++)
{
if (strstr($pMessageBody, $vCensorVulgar[$i]))
return true;
}

I have no words defined in the censored words list.

ziycon

Should be fixed now, sorry about that, thanks for the report.

dougiefresh

 :o Sorry to report, but version 0.3 is even more broken than before....

Quote
Parse error: syntax error, unexpected '}' in /home/xptspn5/public_html/site/board/Sources/Subs-AdvancedCensor.php on line 37

Affected code is this section:

for ($i = 0, $n = count($vCensorVulgar); $i < $n; $i++)
{
if (strstr($pMessageBody, $vCensorVulgar[$i]))

}

Seems there is a blank line where the following should be:

return true;

ziycon

Should be fixed now, sorry about, have no idea how I missed something like that! Thanks again :D

dougiefresh

It's alright!  Happens to the best of us....  Thanks for the mod!

perfec2

The mod has been very helpful, till recently, it seems that it was hacked and all my censored words were wiped out. I began to put those words back, now if you put words and click save, it won't appear in the saved screen any more, if I put a word in one side and put want it will be changed to and click save, the word i put remains and changes to desired words when users post that words.

However, that advanced ability this mod brings is no longer there. In attempt to make it works, I do put same word in both sides, before it can suspend post that contains that words for approval. In some cases words I put will still be posted by users without stopping it for approval the way it use to be.

I have uninstall and reinstall back, it's still thesame.

Please how can I fix this as this mod has been of great help to forum.

Arantor

What version of SMF are you on?

perfec2


perfec2

I'm still waiting for a reply, as many users are taking advantage of this to spam my forum.

ziycon

I'm going to look into the code later today, in the meantime you can disable the mod which will 'star' out selected words. I'll get back as soon as I can.

perfec2

Glad hearing from you. Waiting for your update.

Advertisement: