[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

homer09001
Registered User
Posts: 5
Joined: Mon Jun 04, 2007 3:19 pm

Re:

Post by homer09001 » Mon Dec 17, 2007 12:39 am

cubicdesign wrote:Jesus, you scared the HELL out of me.

I put the files back and now is working.

I will never install a mod that modify my database while I can't make a backup of it.


Clawed
You can back up the database by exporting it in the admin control panel.

No. I can't. It says:
"Sorry, but database backups are not currently supported for your database system."
why don't you just write a cronjob to backup you db into a txt file then e-mail it to you?

can be easily done

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

Re: [01/12/06] Spam Words

Post by Nothing is easy » Wed Dec 26, 2007 10:04 am

Hi Joe.

Just to let you (and others) know that my 3.0 has gone live with a version of this mod that I re-wrote for 3.0 :D

Due to the time I had available from the release of 3.0 gold to my 3.0 go live, I left out the approve component as I didn't used that but the log entries are still created. However, over the next couple of weeks I will also add that code and then make the code available in the format required for a 3.0 Mod that can nbe validated.

I added another couple of features..

1) Pm's are checked for spam
2) Users with over a certain number of posts can post selected words that are defined in the spam words table (as opposed to being able to post all words)
3) Allow selected spam words to be used in pm's
4) Profile fields are checked (using a 1 pass of the words table lololol)

I have to say once again though Joe....this mod and your continued support of it has been fantastic and I couldn't have done my 3.0 version without your original code.

8-)

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

Re: [01/12/06] Spam Words

Post by Joe Belmaati » Wed Dec 26, 2007 8:09 pm

Great stuff! I'm sure a lot of people will be thrilled with the 3.0 version. Please check your PM in box. I replied to your PM of last week.
Image

Six Sigma Teacher
Registered User
Posts: 22
Joined: Thu May 26, 2005 6:48 pm
Contact:

Re: [01/12/06] Spam Words

Post by Six Sigma Teacher » Mon Jan 07, 2008 7:18 pm

Hey there Nothingiseasy - fantastic stuff.

Honestly, I have been avoiding moving to phpbb3 for the reason that I did not want to take a chance with spam. To me it seems that even a better captcha can be defeated, and a dynamic spam filter like this is going to be needed. My list now stops almost all spam to my boards - maybe 98% - and all porn spam. This is particularly essential since the photos they embed would cause professional damage to me if they were up for even a few people to see.

Quick questions: would you post a link here once you get something you want to release? and second, will it be easy to move the spam words over?

Again, I can't say "Thanks!" enough to Joe, and now you, for giving this to us.

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

Re: [01/12/06] Spam Words

Post by Nothing is easy » Tue Jan 08, 2008 7:07 pm

Six Sigma Teacher wrote:Hey there Nothingiseasy - fantastic stuff.

Honestly, I have been avoiding moving to phpbb3 for the reason that I did not want to take a chance with spam. To me it seems that even a better captcha can be defeated, and a dynamic spam filter like this is going to be needed. My list now stops almost all spam to my boards - maybe 98% - and all porn spam. This is particularly essential since the photos they embed would cause professional damage to me if they were up for even a few people to see.

Quick questions: would you post a link here once you get something you want to release? and second, will it be easy to move the spam words over?

Again, I can't say "Thanks!" enough to Joe, and now you, for giving this to us.
To transfer over the existing Spam Words database was very easy. All I did was take a backup of the table from the 2.0 database and reload it via phpmyadmin into the 3.0 database.

I went with a very quick hack to allow me to go live. That quick hack just carried out the spam word checks on posts and the profile fields and rejected when a match with the spam word database was found.

I am now putting together the remainder of the code to allow the word table to be maintained and the log file to be viewed via the acp, etc and will post links to download that code as soon as it is ready.

The code should be ready fairly soon but as US immigration have just allowed me back in to see my family it'll be delayed just a little bit but not by much.

Six Sigma Teacher
Registered User
Posts: 22
Joined: Thu May 26, 2005 6:48 pm
Contact:

Re: [01/12/06] Spam Words

Post by Six Sigma Teacher » Tue Jan 08, 2008 10:07 pm

One person's "very quick hack" is the next person's fourteen hours of work. :D

Take care of your family first. I'll be waiting for when you are ready to move this over to phpbb3.

Thanks so much!

squeak251
Registered User
Posts: 3
Joined: Thu Jan 03, 2008 6:00 pm

Re: [01/12/06] Spam Words

Post by squeak251 » Thu Jan 10, 2008 9:30 pm

I am trying to install this mod, but I can't open the movie file. Is there anyone who can provide a written explanation on how to incorporate this.

squeak251
Registered User
Posts: 3
Joined: Thu Jan 03, 2008 6:00 pm

Re: [01/12/06] Spam Words

Post by squeak251 » Fri Jan 11, 2008 1:33 pm

I have managed to open this at work now, it was coming up as a movie file not text, but I can now access it.

Deco20
Registered User
Posts: 97
Joined: Sat Oct 22, 2005 2:57 pm

Re: [01/12/06] Spam Words

Post by Deco20 » Tue Feb 12, 2008 7:23 am

I don't know what the hell happens but when I do this set:

Number of offenses before user is automatically banned: 1

Then the user become banned when he make 3 offenses. I believe that the code was already ok but I had to fix this with the following change in order to reduce the number of offenses to 2:

In root\includes\spamwords.php

Old line:

Code: Select all

	if ($userdata['user_spam_warnings']  = $spam_config['user_warnings'] && $spam_config['user_warnings'] != 0 && $userdata['user_level'] != ADMIN)
New line:

Code: Select all

	if ($userdata['user_spam_warnings'] >= $spam_config['user_warnings'] && $spam_config['user_warnings'] != 0 && $userdata['user_level'] != ADMIN)

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

Re: [01/12/06] Spam Words

Post by Joe Belmaati » Wed Feb 13, 2008 12:45 am

where did you get this piece of code from?

Code: Select all

if ($userdata['user_spam_warnings']  = $spam_config['user_warnings'] && $spam_config['user_warnings'] != 0 && $userdata['user_level'] != ADMIN)
it should be

Code: Select all

if ($userdata['user_spam_warnings'] > $spam_config['user_warnings'] && $spam_config['user_warnings'] != 0 && $userdata['user_level'] != ADMIN)
Image

Deco20
Registered User
Posts: 97
Joined: Sat Oct 22, 2005 2:57 pm

Re: [01/12/06] Spam Words

Post by Deco20 » Thu Feb 14, 2008 6:24 am

Joe Belmaati wrote:where did you get this piece of code from?

Code: Select all

if ($userdata['user_spam_warnings']  = $spam_config['user_warnings'] && $spam_config['user_warnings'] != 0 && $userdata['user_level'] != ADMIN)
it should be

Code: Select all

if ($userdata['user_spam_warnings'] > $spam_config['user_warnings'] && $spam_config['user_warnings'] != 0 && $userdata['user_level'] != ADMIN)
You are right, that's the code I previously had

Code: Select all

if ($userdata['user_spam_warnings'] > $spam_config['user_warnings'] && $spam_config['user_warnings'] != 0 && $userdata['user_level'] != ADMIN)
but i had to changed it to:

Code: Select all

if ($userdata['user_spam_warnings'] >= $spam_config['user_warnings'] && $spam_config['user_warnings'] != 0 && $userdata['user_level'] != ADMIN)
the weird thing is that I understand that your code is the right one, but for some reason the board counts 1 more so i fix it by changing > to >=

Deco20
Registered User
Posts: 97
Joined: Sat Oct 22, 2005 2:57 pm

Re: [01/12/06] Spam Words

Post by Deco20 » Thu Feb 14, 2008 7:05 am

By the way, a very useful code for avoiding spam words. This code censore the following popular trick by analysing the message in just one line:

W
W
W
.
S
P
A
M
.
C
O
M

#
#-----[ FIND ]------------------------------------------
#
$message = preg_replace('#\[url=|\]|\[/url\]#si', '', $message);
#
#-----[ AFTER, ADD ]------------------------------------------
#
$message = str_replace("\r\n", '', $message);

Deco20
Registered User
Posts: 97
Joined: Sat Oct 22, 2005 2:57 pm

Re: [01/12/06] Spam Words

Post by Deco20 » Thu Feb 14, 2008 8:28 am

I 'm not sure if there is a problem in the mod. I could avoid the filter by editing the messages altough I made some changes and now is working properly. Maybe the problem is that I have Log Actions Mod . That mod adds another if ( $error_msg == '' ) line to the code so to fix it you have add a copy of the following code after the 2 if ( $error_msg == '' ) lines instead of only one of them.

Code: Select all

				//
				// Check spam words....
				//
				if ( !$post_info['allow_spam_words'] )
				{
					include($phpbb_root_path . 'includes/spamwords.'.$phpEx);
				}

trusting
Registered User
Posts: 5
Joined: Wed Feb 27, 2008 4:10 am

Re: [01/12/06] Spam Words

Post by trusting » Wed Feb 27, 2008 7:23 pm

I need help ...

I downloaded and installed Spam Words, but when I do a test post using the words I've listed, it doesn't stop the post. I've set exceptions to "No" for all users and set the number of posts to 0, then tried posting spam words both as myself (admin) and as a newly registered user. Both tests got through. And it's not showing anything in the log.

I've double checked the files ... they're all installed. I checked the database ... it's there and the words are in it.

In configuration, I've tried both "flag and hide posts" and "error message". Neither has happened. "Disable spam words filter" is set to "No".

Any ideas on why it isn't working?

Thanks,
Teresa
Last edited by trusting on Wed Feb 27, 2008 7:27 pm, edited 1 time in total.

trusting
Registered User
Posts: 5
Joined: Wed Feb 27, 2008 4:10 am

Re: [01/12/06] Spam Words

Post by trusting » Wed Feb 27, 2008 7:24 pm

Just a quick note to say that I got it working. The installation instructions didn't open correctly and I hadn't done all the edits.

Thanks for this MOD!

Teresa :)

Post Reply

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