I would like a feature where I can specify the amount of time in minutes and number of URLs that can be submitted from the same site. I see many blogs spamming my site with multiple links to articles on that blog. I would like to contain it so that in 30 minutes one user can only submit 2 or 3 links from same site not more.

Comments

mercmobily’s picture

Hi,

Sorry to ask... This is the typical request that is easy enough to implement but that will end up in the backburner.
Are you able to offer a bounty for it?

Merc.

garamvideos’s picture

Here's my hack, should be pretty simple for you to incorporate

function drigg_url_multiple($url){
  $url2 = parse_url_domain($url);
  $sql = "SELECT count(*) FROM {node}, {drigg_node} where FROM_UNIXTIME(created+1800) > NOW() AND nid = dnid AND url like '%s'";
  $result = db_result(db_query($sql, "%".$url2."%"));
  if(!$result){
    return 0;
  }
  drupal_set_message("DEBUG: count: $result");
  return $result; 

}


function parse_url_domain ($url) {
  $parsed = parse_url($url);
  $hostname = $parsed['host'];
  return $hostname;
} 
mercmobily’s picture

Hi,

I think this patch should be more generic.
For example, the admin should be able to decide:

* How many scoops a user can submit every XXX hours
* How many scoops from the SAME URL a user can submit every XXX hours

Any more options...?

Merc.

garamvideos’s picture

Agreed, one more to add would be how many SAME SITE links are submitted by multiple users.
But all this is low priority for now since I have my immediate need addressed.

Thanks.

mercmobily’s picture

Priority: Normal » Minor
avpaderno’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

I am closing this issue, as Drupal 5 is no longer supported.