[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

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

Post by Joe Belmaati »

I think I posted a fix for this some pages back.
Image
Attack of the Squirrels
Registered User
Posts: 1
Joined: Sun Jan 21, 2007 3:31 am

Post by Attack of the Squirrels »

Ok, I am a member of a board that is having a horrible time with spam posts. I have brought this MOD to the attention of our board admin, and I have a few questions about it (Some might be stupid. I'm not to smart about this type of thing).

I saw that this allows certain members to be allowed to post the spam words, and disallows others. Does itallow based on number of posts the user has made, at the admin's discression, etc?

It notices spam words in urls right? So if we wanted to stop all new users from posting urls would we add *http://* to the block list?

Does this offer a way to stop pictures from being posted by new members?
20
Registered User
Posts: 87
Joined: Sun Mar 19, 2006 12:27 pm

Post by 20 »

Yes, you can specify that after a certain number of posts the filter is lifted from members accounts.

Again, correct - by adding *http* & *www* you can stop bots & new members from posting links or pictures. For a complete solution, add *.com , *.co.uk, etc, etc as some members will simply post the domain name without the http or www in order to gain some exposure.
20
Registered User
Posts: 87
Joined: Sun Mar 19, 2006 12:27 pm

Post by 20 »

Is it possible to change the warning message, so in the event the filter is set off I can redirect users to the board rules and guideline page.


I'll rephrase that, I don't want a notice telling users to go to the rules/guidelines page, we can already do that but would rather it redirected automaticly. Is that possible?
riship
Registered User
Posts: 1
Joined: Mon Jan 22, 2007 4:29 pm

Error in Spamwords

Post by riship »

Hi there,

I have loaded the spamwords Mod and when im trying to edit a post and making changes, once the submit button is clicked, the following error is produced.....


Fatal error: Cannot redeclare insert_pm() (previously declared in /homepages/26/d76053734/htdocs/wsc76053743/one2/phpBB2/includes/spamwords.php:46) in /homepages/26/d76053734/htdocs/wsc76053743/one2/phpBB2/includes/spamwords.php on line 46


can anyone help please.

thanks
pvb1
Registered User
Posts: 1
Joined: Wed Jan 24, 2007 3:37 pm

Error message

Post by pvb1 »

I get the same error message. Please help.
Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati »

Hi, I am not able to reproduce the error. Please give me as much information on your Spam Words configuration and on what exactly triggers the error.
Image
akh
Registered User
Posts: 2
Joined: Wed Jan 24, 2007 4:17 pm

Post by akh »

I am also running into this error.

Running phpBB v 2.0.20.

Spam Words is currently running under default configs. After installing the mod, i received the Cannot redeclare insert_pm() error when trying to submit the post.

Question: in certain steps, when instructed to find a certain line of code in the phpBB templates, two results would come up (e.g. if ( $error_msg == '' ) in posting.php). I inserted the mod code after both instances. Was this the correct thing to do? The INSTALL.mod file didn't say anything about multiple instances of code snippets in the phpBB files. This also happens with the "$current_time = time();" line in includes/functions_post.php.

For now, I've commented out the entire insert_pm() function in spamwords.php, and the error goes away.

I hope this helps give you a little clearer picture. Thanks for any help!
Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati »

akh wrote: in certain steps, when instructed to find a certain line of code in the phpBB templates, two results would come up (e.g. if ( $error_msg == '' ) in posting.php). I inserted the mod code after both instances. Was this the correct thing to do?
No, that's the wrong thing to do and explains the error.
Image
akh
Registered User
Posts: 2
Joined: Wed Jan 24, 2007 4:17 pm

Post by akh »

ah, gotcha! so, just after the first instance in each case, correct?
Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati »

Haven't checked that. Make sure you take tabs in the install file into account as well. There may be two instances of the same code with differing leading tabs. Make sure you match up the whole line in this case.
Image
harpman
Registered User
Posts: 35
Joined: Thu Sep 16, 2004 8:30 pm

Post by harpman »

Hi, this looks like a nice Mod and I'm very tempted to install it. I'd like to use it to allow spam through, but alert the Mod or Mods, who can then go in and remove or leave it. In much the way that this guy suggested:
nampa wrote: 1) Allow a feature to send a PM to designated users.
That way all of the Administrators and/or Moderators will receive a PM when there is a new suspected spam. The moderators can then go to the Flagged Posts page and make a decision about the user and the post.


Is it possible to get this result from setting the configuration, say, to "Allow registered users to post spam" (I don't allow posts from guests) and then presumably it will show up in the Flagged Posts list? And can people get a PM or email alert from it?

Sorry if this has already been answered but I think I've read through most of the posts and documentation and I'm still not sure!
[ Do I understand your question? Is it hopeless and forlorn? ]
Six Sigma Teacher
Registered User
Posts: 22
Joined: Thu May 26, 2005 6:48 pm
Contact:

Post by Six Sigma Teacher »

harpman wrote: Is it possible to get this result from setting the configuration, say, to "Allow registered users to post spam" (I don't allow posts from guests) and then presumably it will show up in the Flagged Posts list? And can people get a PM or email alert from it?

Sorry if this has already been answered but I think I've read through most of the posts and documentation and I'm still not sure!


My $0.02 on this is that the MOD, as written, will do part of what you ask. You can allow registered users to post spam words, while guests will be filtered. However if you allow registered users to post, it will not flag their postings, so I think you would set that to "No."

It does not send an alert to an admin or moderator - thank goodness! I would have 100 more e-mails a day! It just hides them so that they do not offend people. The admin can then at their leisure take a look at the posting and approve it if they want to. This is a manual process - there is no "select this box if it is OK to post" where you could mass resolve the postings. For its usual use, this is perfectly fine (I have only ever had one false positive). It can be configured to send a PM to the poster to warn them about the posting. You could customize the message to say something like, "You posted something that the spam filter has caught. It will not appear until it has been reviewed by a moderator."

Another problem is that each occurrence of a word on the spam list will count towards the limit at which the user will be banned automatically. I suppose you could set that number to be really large, but there is no way currently to reset that count within the control panel. I figure there is a way to edit it in MySQL, but that is beyond my knowledge zone.
Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati »

Six Sigma Teacher wrote: Another problem is that each occurrence of a word on the spam list will count towards the limit at which the user will be banned automatically. I suppose you could set that number to be really large, but there is no way currently to reset that count within the control panel. I figure there is a way to edit it in MySQL, but that is beyond my knowledge zone.
Just off the top of my head, I think you can resolve this by doing this:

OPEN includes/spamwords.php

FIND

Code: Select all

					$post_flagged = 1;
AFTER, ADD

Code: Select all

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

Post by Joe Belmaati »

It would be very easy to PM alert an admin:

in includes/spamwords.php

FIND and ADD AFTER both instances.

FIND

Code: Select all

					insert_pm($userdata['user_id'], $spam_config['warn_user_pm_message'], $spam_config['warn_user_pm_subject'], $spam_config['pm_sender']);
AFTER, ADD

Code: Select all

					insert_pm(2, $spam_config['warn_user_pm_message'], $spam_config['warn_user_pm_subject'], $spam_config['pm_sender']);
That will send a PM to the main admin (user_id == 2): Just change 2 if you want it to go somewhere else. Essentially, the admin will receive the same notice that the warned user receives.
Image
Post Reply

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