Comment Spam Question Comment Spam Question
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Comment Spam Question

Started by gtk, February 08, 2007, 10:05:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gtk

Hi. 

I have the Captcha mod on my Coppermine 1.4.10 install, but spam is still getting thru on a regular basis.  I wanted to prevent spam by banning a range of ip addresses like "89.90.91.* " but found in another post that I cannot do that.

So, I would like to know if its possible to do the following:

Put some common "spam" words into the lang_bad_words array in "english.php"

In the function "check_comment" in db_input.php, I would like to set a switch to ignore/not post the comment (or cpg_die) when "check_comment"  finds a banned word in the submitted comment/author text.

In other words, when a user submit's a comment, and that comment has any word in it that is defined in the "lang_bad_words", then just delete/not post the whole comment.

Is this do-able and if so, would it be easy/moderate/difficult ?


Thx

Greg

Nibbler

Search the board for comment spam. captcha and akismet are both good solutions.

gtk

Thx, but I have captcha mod installed as noted in my post..   The problem is a lot of spam is still getting thru :(

gtk

.
Is there a way to search the " $str" variable passed to the function "check_comments" for a word in the array "lang_bad_words" ?   maybe something like "preg_replace" except that it just returns "1" or "0" ?
.


Thanks,


Greg

gtk

Is there any reason this would not work ?

Edited DB_INPUT.php
Function: check_comment

    if ($CONFIG['filter_bad_words']) {
//Start Mod
        foreach($lang_bad_words as $word) {
              if(stristr($str, $word) == TRUE) {
                    cpg_die(CRITICAL_ERROR, $lang_errors['comment_spam'], __FILE__, __LINE__);
              }
        }
//end mod
        $ercp = array();


Seems to work ok on the first few attempts to trick it..

Thanks..


Tranz

Have you tested the captcha? Does the comment get accepted whether or not you enter the right code? It's likely you didn't modify db_input.php correctly, as that's the usual reason captcha doesn't work for people.

gtk

Sorry, I mistated what I had installed  ???   I have the Akismet mod installed, not captcha..    At first, the Akismet mod worked great, and I didnt' seem to have any spam for several months.   Now it has started again (no new mods, no updates).   The spam is always on the same 4 or 5 pictures.   



Greg

gtk

I didnt get any spam over the weekend after making this change..   The only real problem is some words in the lang_bad_words could be part of a legit word/phrase.  If thats the case, its rejected anyway.


xels

Sorry fpr my question, but i searched the bole board an did not find the information where i can download the captcha mod plug in for the coppermin.
Please inform me about the downloadlocation.
many thanks

Joachim Müller


xels

Sorry, i had the same search results with MY search, but i did not see the attatched file in the post.
i'm on my knees infront of you, so please forgive me.......

jtothek3030

hi, not sure if you will see this gtk, but i implemented your db.access solution to stop spam, and it works when i try and put a comment with a banned word, in this case (...).  however, the spammers are still able to get spam through with (...) in the comment.  Any luck stopping spam with this mod, or did you give up and try something else.  capcha doesnt work for me, comments dried up to next to nothing, and couldn't get other solutions to work. 
cheers

jtothek3030

ok, so i thought it worked but spammers got by, guess i'll try the capcha plugin again