Advanced search  

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

Pages: [1]   Go Down

Author Topic: Comment Spam Question  (Read 6418 times)

0 Members and 1 Guest are viewing this topic.

gtk

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
Comment Spam Question
« on: February 08, 2007, 10:05:26 pm »

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
« Last Edit: March 25, 2007, 09:12:46 pm by GauGau »
Logged

Nibbler

  • Guest
Re: Comment Spam Question
« Reply #1 on: February 08, 2007, 10:51:13 pm »

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

gtk

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
Re: Comment Spam Question
« Reply #2 on: February 08, 2007, 10:56:38 pm »

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

gtk

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
Re: Comment Spam Question
« Reply #3 on: February 09, 2007, 04:25:37 pm »

.
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
Logged

gtk

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
Re: Comment Spam Question
« Reply #4 on: February 09, 2007, 10:46:37 pm »

Is there any reason this would not work ?

Edited DB_INPUT.php
Function: check_comment
Code: [Select]
    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..

Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Comment Spam Question
« Reply #5 on: February 10, 2007, 06:15:00 am »

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.
Logged

gtk

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
Re: Comment Spam Question
« Reply #6 on: February 10, 2007, 04:05:52 pm »

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
Logged

gtk

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
Re: Comment Spam Question
« Reply #7 on: February 12, 2007, 04:19:18 pm »

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.

Logged

xels

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Comment Spam Question
« Reply #8 on: March 16, 2007, 08:01:34 am »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Comment Spam Question
« Reply #9 on: March 16, 2007, 08:47:25 am »

Captcha plugin: http://forum.coppermine-gallery.net/index.php?topic=36319.0
Captcha mod: http://forum.coppermine-gallery.net/index.php?topic=29564.0
Aksimet mod: http://forum.coppermine-gallery.net/index.php?topic=33827.0

All of them can be found easily by searching for "comment spam", so please search before posting in the future instead of hijacking a thread.
Logged

xels

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Comment Spam Question
« Reply #10 on: March 16, 2007, 12:24:16 pm »

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.......
Logged

jtothek3030

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
Re: Comment Spam Question
« Reply #11 on: March 24, 2007, 06:07:59 pm »

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
Logged

jtothek3030

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 31
Re: Comment Spam Question
« Reply #12 on: March 24, 2007, 10:15:49 pm »

ok, so i thought it worked but spammers got by, guess i'll try the capcha plugin again
Logged
Pages: [1]   Go Up
 

Page created in 0.03 seconds with 19 queries.