Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3354138
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:14:10+00:00 2026-05-18T02:14:10+00:00

We’ve been having a new type of spam-bot this week at PortableApps.com which posts

  • 0

We’ve been having a new type of spam-bot this week at PortableApps.com which posts at a rate of about 10 comments a minute and doesn’t seem to stop – at least the first hour or so (we’ve always stopped it within that time so far). We’ve had them about a dozen times in the last week – sometimes stopping it at 50 or 60, sometimes up to 250 or 300. We’re working to stop it and other spam bots as much as possible, but at the moment it’s still a real pest.

I was wondering whether in the mean time whether there’s any sort of module to control the frequency a user can post at to e.g. 50 an hour or something like 10 in an hour for new users. That at least would mean that instead of having to clear up 300 comments 50 at a time in admin/content/comment we’d have a smaller number to clear. (A module to add a page to delete all content by a user and block them would also be helpful!)

I believe that there’s a plugin to do this available for WordPress, but can’t find any such thing for Drupal.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T02:14:10+00:00Added an answer on May 18, 2026 at 2:14 am

    For your second question, i would have a look at the code of the User Delete module (click).

    The module also disables the user account and unpublished all nodes/comments from a certain user. By extending the code, you could easily create another possibility to unpublish + delete all nodes/comments from a certain user and blocking the account.

    After the unpublish code in the module, you should just put delete code (in sql if the module is selecting by a sql-query or by using the drupal delete functions).


    Another option would be so make a view (using the view module) only to be viewed by administrators, where you choose a certain user using the filters and then lists his/her posts. Then in the node-contenttype.tpl.php you place a button that calls a function which deletes all nodes/comments and the user.


    First problem (post frequency)

    I’ve been thinking about the comment post limit. If I remember correctly Drupal stores comments in a seperate table and has comment specific functions.

    I’d create a new module and using the comment_nodeapi function i would check in the operation ‘insert’ how much comments the current user has already made within a certain timeframe.

    To check this I would write a custom sql query on the database which takes the count of alle comments made by uid where the post_date is larger then NOW-1hour. If that count is larger then 10 or 15 or whatever post frequency you want then you give a message back to the user. You can retrieve the user id and name by using the global $user variable.

    (example: print $user->name;)

    You have to check on your own for the sql query but here’s some code when you have the amount:

    <?php
    function comment_nodeapi(&$node, $op, $arg = 0) {
      switch ($op) {
    
        case 'insert':
          //PLACE HERE THE SQL TO GET THE COUNT
          if($count > 15){
              $repeat = FALSE;
              $type = 'status'
              drupal_set_message("You have reached the comment limit for this time.", $type, $repeat);
              break;
          }else{
              db_query('INSERT INTO {node_comment_statistics} (nid, last_comment_timestamp, last_comment_name, last_comment_uid, comment_count) VALUES (%d, %d, NULL, %d, 0)', $node->nid, $node->changed, $node->uid);
              break;
          }
       }
    }
    ?>
    

    (this code has not been tested so no guarantees, but this should put you on the right track)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.