[01/12/06] Spam Words

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
52
76%
Very Good
9
13%
Good
4
6%
Fair
0
No votes
Poor
3
4%
 
Total votes: 68

drywash
Registered User
Posts: 29
Joined: Thu Mar 30, 2006 7:36 pm

spamwords

Post by drywash » Tue Oct 17, 2006 12:44 am

Anyone have a simple URL which explains the step-by-step installation instructions for this MOD? It would not install with usershield.

Thanks,

-David

bigtree
Registered User
Posts: 4
Joined: Sun Feb 08, 2004 7:29 am
Location: Canada

Word Censor Options

Post by bigtree » Tue Oct 17, 2006 4:01 am

Is it possible to word censor just the post, NOT the title?

[Tee]derDoc
Registered User
Posts: 11
Joined: Wed Sep 04, 2002 5:15 pm
Location: somewhere in the cold nothern part of Germany

Post by [Tee]derDoc » Tue Oct 17, 2006 8:55 am

Joe,

you have this line in your regexer:

preg_replace("/\[.*?:$bbcode_uid:?.*?\]/si", '', $m);

that supposedly removes any [valid_bbcode] in your post, so that something like http://somelink becomes just http://somelink...
and any stuff gets removed.
But instead in my board it removes the entire ... string.
$bbcode_uid is emtpy and its obviously greedy matching everything until the end of [/url] which is not what its supposed to do.
I know, I know you are using non-greedy *'s but somehow they dont work as advertised in php... I had that prob before ;)
I just took that whole line out, and its works perfectly now...
I have 2 others that removes and 's though... leaving the ...
A TRUE Klingon Warrior does
not comment his code!

helmut
Registered User
Posts: 35
Joined: Mon Nov 10, 2003 9:18 pm
Location: Germany
Contact:

RSS and Spam word filter

Post by helmut » Wed Oct 18, 2006 10:18 pm

Spam in RSS feed
For those who have an RSS mod installed (e.g. RSS Syndication Mod by Lucas) I recommended to change the spam word filter's setting "How should posts that contain spam words be dealt with?" to "Error message". Default of this setting is is "Flag and hide posts" which works quite well, but the flagged posts are still written into the RSS feed. :-|

= Blocked text still logged
After changing the setting to "Error message" the blocked texts are still written to the "Log" of the spam word filter. Administrators still can see what's going on and even see if there are false positives (but you can no longer accept the false positives, this was possible when flagging posts).

= Spam word in error messages
The error messages shown when a text is blocked are also configurable, by default the spam word recognized is listed in the message text. If you want to make your spammers (and users) life harder, you can change the message text and remove the listing of the spam word.

= No increase in spam after switching
I've switched the setting two days ago. My concern when changing the setting was that spammers could immediately see that their post wasn't successful and repost a modified version of the spam text. But number of logged spams hasn't increased noticably.

All in all only advantages. For those using a RSS mod switching the spam word filter to "Error message" should be interesting.
Last edited by helmut on Thu Oct 19, 2006 6:58 pm, edited 1 time in total.

clawed
Registered User
Posts: 32
Joined: Tue Jun 14, 2005 3:04 am

Post by clawed » Wed Oct 18, 2006 11:15 pm

[Tee]derDoc wrote: Joe,

you have this line in your regexer:

preg_replace("/\[.*?:$bbcode_uid:?.*?\]/si", '', $m);

that supposedly removes any [valid_bbcode] in your post, so that something like http://somelink becomes just http://somelink...
and any stuff gets removed.
But instead in my board it removes the entire ... string.
$bbcode_uid is emtpy and its obviously greedy matching everything until the end of [/url] which is not what its supposed to do.
I know, I know you are using non-greedy *'s but somehow they dont work as advertised in php... I had that prob before ;)
I just took that whole line out, and its works perfectly now...
I have 2 others that removes and 's though... leaving the ...


Could be solved by copying the load_bbcode_template() function in /includes/bbcode.php and modifying it so all bbcode gets replaced with "" and then running the bbcode functions in /includes/bbcode.php . That should fix any problems with mangled bbcode that are common as well.

Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati » Thu Oct 19, 2006 5:40 am

helmut,
those are some very good observations. It is possible to modify RSS feeds so that they don't return flagged posts. PM me your RSS.php and I will modify it for you.

Sincerely,
Joe
Image

helmut
Registered User
Posts: 35
Joined: Mon Nov 10, 2003 9:18 pm
Location: Germany
Contact:

Post by helmut » Thu Oct 19, 2006 9:08 pm

Joe Belmaati wrote: those are some very good observations. It is possible to modify RSS feeds so that they don't return flagged posts. PM me your RSS.php and I will modify it for you.

Thanks for your feedback and your offer, Joe. Currently, the forum works quite well with "Error message" activated and RSS is no longer spammed. So at the moment there's no need to correct the RSS.php code. Thank you, anyway. :-)

The one problem left for our forum are the spam user that register. They just register and have the signature and/or URL fields filled with links. It would be good if there was a mod that blocks spam users which uses the same spam word list as the spam word filter.

weebit
Registered User
Posts: 5
Joined: Wed May 17, 2006 3:45 am

last thing to install

Post by weebit » Thu Oct 19, 2006 9:38 pm

I read through the files so I could get a idea on how they work. I am stumped right now. On the other SQL scripts I had to query make table. I did crank up the file db_update.php and it said everything was fine. Now what? do I make table? Or am I missing something else? If it is the make table am I correct to assume that the CREATE TABLE `phpbb_spam_words` ,,, is where to start. But where is the ending? at the -----[ COPY] ?

Thank you in advance! :)

Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati » Fri Oct 20, 2006 6:13 am

helmut wrote: The one problem left for our forum are the spam user that register. They just register and have the signature and/or URL fields filled with links. It would be good if there was a mod that blocks spam users which uses the same spam word list as the spam word filter.
I believe you can prevent that with a simple piece of code. I will PM you something.
Image

saxy46
Registered User
Posts: 2
Joined: Mon Jan 16, 2006 6:57 pm

problem installing

Post by saxy46 » Fri Oct 20, 2006 3:29 pm

Hello,

I have looked over the instructions and the forum and I don't see any posts simliar to my error. I believe I had installed everything correctly. I uploaded the db_udate.php script and ran that, copied over the files, etc. When I log into the admin console, I see the SPAM words admin panel, but when I clilck on Configuration, I get the following error:

*********************************************************
phpBB : Critical Error

Could not query config information

DEBUG MODE

SQL Error : 1146 Table 'ecoffeehouse.SPAM_WORDS_CONFIG_TABLE' doesn't exist

SELECT * FROM SPAM_WORDS_CONFIG_TABLE

Line : 43
File : admin_spamwords_config.php

*********************************************************

I get a simliar error when going to manage words:

*********************************************************
Could not query words table

DEBUG MODE

SQL Error : 1146 Table 'ecoffeehouse.SPAM_WORDS_TABLE' doesn't exist

SELECT * FROM SPAM_WORDS_TABLE ORDER BY spam_word

Line : 181
File : admin_spamwords.php

********************************************************
After seeing these errors, I figured that my installation did not work so I tried to run the db_update.php script again and I got errors saying that the tables already existed. I'm sure its something that I am overlooking....

Please help!

Thanks!

Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati » Fri Oct 20, 2006 5:03 pm

Sounds like you missed a couple of edits in includes/constants.php :D
Image

saxy46
Registered User
Posts: 2
Joined: Mon Jan 16, 2006 6:57 pm

Post by saxy46 » Fri Oct 20, 2006 7:21 pm

Joe Belmaati wrote: Sounds like you missed a couple of edits in includes/constants.php :D


damn....people were right...you ARE the man! I must have missed that file and didn't upload it! LOL

thanks!

It is up and running now....so now I'll go through and put some updates, etc to it.

Thanks!

Nothing is easy
Registered User
Posts: 173
Joined: Sun Apr 02, 2006 1:10 am

Post by Nothing is easy » Sat Oct 21, 2006 10:12 am

Joe Belmaati wrote:
helmut wrote:The one problem left for our forum are the spam user that register. They just register and have the signature and/or URL fields filled with links. It would be good if there was a mod that blocks spam users which uses the same spam word list as the spam word filter.
I believe you can prevent that with a simple piece of code. I will PM you something.


I'd like that pm also please Joe.
bigtree wrote: Is it possible to word censor just the post, NOT the title?


We have many spam attempts where this is the only way of stopping them so would not want to see this facility removed.

114211
Registered User
Posts: 35
Joined: Thu Oct 19, 2006 12:56 am

Post by 114211 » Mon Oct 23, 2006 1:00 pm

well i had it going for awhile and it was working great but now when i post anything i just get a white page and nothing happens. i have the cash mod installed and also the mod where guests cant do html and bbcode:

this is my functions_post:
http://www.aznaddiction.com/wiki/Fuctions_post

this is my posting.php:
http://www.aznaddiction.com/wiki/Posting

do the "view source" on the wiki pages to see the properly formatted code. I think these are the files giving me trouble but id be happy to post more to get this solved as it is a pain in the @**

I can preview the post but when i hit submit it brings a white page and stays there, i have replaced my posting.php and functionspost to the old ones before this happened and its working without spam words until i can get this fixed.

if you wanna check the site too its the one in my sig.
Last edited by 114211 on Mon Oct 23, 2006 1:42 pm, edited 2 times in total.

drywash
Registered User
Posts: 29
Joined: Thu Mar 30, 2006 7:36 pm

Simple clear installation instructions

Post by drywash » Mon Oct 23, 2006 1:08 pm

Dear Joe,

I realize that spamwords cannot be installed with Easymod. Am I wrong about this? Can it be installed with Easymod? It didn't seem to work when I tried it.

Could you please send me a URL or simple step by step instruction for installing spamwords? I could not seem to find it in the package anywhere.

Thanks,

David

Post Reply

Return to “[2.0.x] MOD Database Releases”