[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

alosito2
Registered User
Posts: 6
Joined: Tue Jan 09, 2007 6:17 pm

Post by alosito2 » Sun Jan 28, 2007 12:42 pm

Here is a problem. I have "Number of offenses before user is automatically banned" set to 1. When a user posts a spam message and it is his first post, the mod does flag such a message and I do see it in the section "Flagged posts". However, if I don't delete that message from there fast enough, the same user can continue to post messages, and they don't get flagged. Is there a way to make this mod ban a user automatically without having to delete his flagged message?

User avatar
noth
Registered User
Posts: 2481
Joined: Fri Jan 07, 2005 7:10 pm
Location: North Surrey
Contact:

Post by noth » Sun Jan 28, 2007 3:44 pm

Joe Belmaati wrote: No, but the upgrade is simple: Upload all the new files.


I'm upgrading from 1.0.2 and a large amount of link lists have been getting through :?

I have uploaded all the new 1.1.3 files but do I need to edit any exisiting files at all?

having uploaded all the new files I now see this in my log
Warning: preg_replace(): Compilation failed: missing terminating ] for character class at offset 22 in /home/policeco/public_html/phpBB2/admin/admin_spamwords_log.php on line 241

Warning: preg_replace(): Compilation failed: missing terminating ] for character class at offset 31 in /home/policeco/public_html/phpBB2/admin/admin_spamwords_log.php on line 241

Warning: preg_replace(): Compilation failed: range out of order in character class at offset 21 in /home/policeco/public_html/phpBB2/admin/admin_spamwords_log.php on line 241

Warning: preg_replace(): Compilation failed: missing terminating ] for character class at offset 24 in /home/policeco/public_html/phpBB2/admin/admin_spamwords_log.php on line 241

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

Post by Joe Belmaati » Sun Jan 28, 2007 5:08 pm

noth wrote: Warning: preg_replace(): Compilation failed: missing terminating ] for character class at offset 22 in /home/policeco/public_html/phpBB2/admin/admin_spamwords_log.php on line 241
There's a fix for this a couple of pages back.

@alosito2
: I think I need to go over all the posts relating to this and fix it for an update, if fixing is needed.
Image

User avatar
noth
Registered User
Posts: 2481
Joined: Fri Jan 07, 2005 7:10 pm
Location: North Surrey
Contact:

Post by noth » Sun Jan 28, 2007 6:42 pm

okay I did the fix from a couple of pages back and now the log shows nothing for the message at all

Username | Subject | Flagged | User IP | Time

are all fine

but message is now nothing on every line

this has all started happening since I upgraded to 1.1.3

did both code edits including
Joe Belmaati wrote: OPEN

admin_spamwords.php

FIND

Code: Select all

			$list = preg_split("#[^A-Za-z-\*]#", $HTTP_POST_VARS['massad']);
REPLACE WITH

Code: Select all

			$list = preg_split("#[^A-Za-z-\*@]#", $HTTP_POST_VARS['massad']);
..basically, just add all the characters that you don't want to act as a delimiter for a new word/entry. Beware that the regex special characters need to be backslash escaped. Do a google search to find the special characters...


still getting message field empty :cry:

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

Post by Six Sigma Teacher » Sun Jan 28, 2007 10:08 pm

Joe, on the Mass Add function, my version is splitting the words at spaces and periods and ignoring asterisks, so if I enter:

*badword.com*

The spamwords list now contains:

badword
com

Adding one at a time with the Add New Word button works fine, so it is not urgent, but it could lead to unexpected results.

If it is relevant, I still have that fix in which you PM'ed me about to update when there are multiple postings in one forum.

Thanks again for the MOD!

harpman
Registered User
Posts: 35
Joined: Thu Sep 16, 2004 8:30 pm

Post by harpman » Tue Jan 30, 2007 6:53 pm

Thanks for your thoughts, Six Sigma, and thanks for your code tweaks in response to them, Joe. I like the ability to add PM to admin - I guess I could PM more than one user by adding that line over and over, and decide NOT to notify the poster by removing your "Find" line?

So, this is looking positive.

Can I just confirm that in the case above, we can set the configs so that the registered user's post with spamwords in would appear, and the PM would go out?

Incidentally the reason I'm trying to use this Mod for something slightly other than intended use (please forgive me if that's impolite :oops: ) is that on this forum, the admins want to watch certain topics of conversation if/when they come up. They're not bad in themselves and they don't want to ban discussion of these topics, but they do want to get a notification so they know where to start watching. Then they'll decide what to do manually.

Just thought you might like to know that as it may be an extra use for your Mod!
[ Do I understand your question? Is it hopeless and forlorn? ]

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

Post by Joe Belmaati » Thu Feb 01, 2007 6:55 pm

Basically you would just comment out all the punishment measures.

Ie

Code: Select all

					warn_user();
					ban_user();
Becomes

Code: Select all

//					warn_user();
//					ban_user();
etc.

And yes, simply comment out the insert_pm() line and add one line for each admin that you want to receive a PM.
Image

harpman
Registered User
Posts: 35
Joined: Thu Sep 16, 2004 8:30 pm

Post by harpman » Thu Feb 01, 2007 7:37 pm

Oh great, thank you! I'll give it a go then :D
[ Do I understand your question? Is it hopeless and forlorn? ]

User avatar
noth
Registered User
Posts: 2481
Joined: Fri Jan 07, 2005 7:10 pm
Location: North Surrey
Contact:

Post by noth » Thu Feb 01, 2007 11:16 pm

ever since I upgraded to 1.1.3 from 1.0.2 my log now contains EMPTY MESSAGE FIELDS

I am now running this blind, the log is now only telling me half the story :cry:

I made the edit:

$list = preg_split("#[^A-Za-z-\*@]#", $HTTP_POST_VARS['massad']);

but this stopped the warning messages, now results in blank message fields

please help

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

Post by Joe Belmaati » Fri Feb 02, 2007 8:13 am

Hi,
I need to work out a different highlight scheme for the log page. Apparently some folks are experiencing problems and I have some idea of what's going on. In the meantime, feel free to upload admin_spamwords_log.php from the old distribution - it should work ok.
Image

harpman
Registered User
Posts: 35
Joined: Thu Sep 16, 2004 8:30 pm

Post by harpman » Sat Feb 03, 2007 8:12 pm

Hi Joe,

I just applied the changes you mentioned in an attempt to alter this Mod to my own ends as mentioned above..

Nice Mod by the way ... very nice config and it does what it says on the packet!

I commented out the lines you mentioned, that worked a treat.

I found that in order to flag the message but still let it through, I needed to remove
AND p.post_flagged <> " . TRUE . "


from viewtopic.php

A couple of queries

I found that the "break;" addition you mentioned seems to already be there in the code (?) - so I'm not sure how this will impact the banning ... but it probably doesn't matter because we've already commented out the call to ban_user?

Also, it seems that if I send more than one PM I get a re-defined class error?

Other than that, though, it looks like this is going to work..... any thought on the re-defined class thingy, can that be got around or am I limited to one PM do you think?

Cheers again for your time :wink: :D
[ Do I understand your question? Is it hopeless and forlorn? ]

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

Post by Joe Belmaati » Sun Feb 04, 2007 8:29 am

Hmm, the insert_pm(); function does not instantiate a class. A bit at a loss as to why you'd get a redefined error...
Image

harpman
Registered User
Posts: 35
Joined: Thu Sep 16, 2004 8:30 pm

Post by harpman » Mon Feb 05, 2007 8:37 pm

Does it help if I tell you this is what I get:
Fatal error: Cannot redeclare class emailer in /home/ftp/uncommon/www.uncommonforum.com/testversion/includes/emailer.php on line 28


I suppose it could be a little clash with one of my other Mods ... I've got a few...
[ Do I understand your question? Is it hopeless and forlorn? ]

promarky
Registered User
Posts: 2
Joined: Tue Feb 06, 2007 7:28 pm

Question On Installing This Mod. . .

Post by promarky » Tue Feb 06, 2007 7:31 pm

Hi,

This looks like a great Mod, however being a newbie I have a question.
For the SQL part at the beginning of the instructions, what do I do? I know for the rest you just modify the documents, etc. . .but the beginning just says SQL and doesn't tell me what to do with it?

Does anyone know how to get things started with this MOD?

Thanks,

Mark

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

Re: Question On Installing This Mod. . .

Post by Six Sigma Teacher » Wed Feb 07, 2007 5:03 pm

promarky wrote: Hi,

This looks like a great Mod, however being a newbie I have a question.
For the SQL part at the beginning of the instructions, what do I do? I know for the rest you just modify the documents, etc. . .but the beginning just says SQL and doesn't tell me what to do with it?

Does anyone know how to get things started with this MOD?

Thanks,

Mark


The MOD installs very easily and automatically with EasyMOD, which can be found here: http://area51.phpbb.com/phpBB/viewforum.php?f=15

Post Reply

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