Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
692 views
in Q2A Core by

To avoid spam I need to control postings, votings etc. using >Admin >Spam controls.

What I need, though, is the option to limit per day.

Who is with me?

2 Answers

+2 votes
by
I am with you. In order to control spamming, limits should be applied on per day basis.
by
"should be applied on per day basis." or "per hour" ... let's have both options :)
by
I agree too. Should have a dropdown where it says "per hour" so you can set each one to either hour or day (or maybe week/month).

Rate limit for asking questions: [  20] per IP per [  hour]
Rate limit for asking questions: [  20] per user per [  day]
+2 votes
by

It's a reasonable idea. For now you can hack this pretty easily - just replace the two instances of 3600 in qa-app-limits.php with 86400. That will make the criterion on a daily basis.

by
Well, this will put ALL limits on a daily basis.

Actually, it should be day-or-hour-choice per limit. E.g. I need to set only votes on daily basis.
by
Can I just change the period within the case-block again? Like that:

case QA_LIMIT_VOTES:
    $period=(int)(qa_opt('db_time')/86400); // new
    $userlimit=qa_opt('max_rate_user_votes');
    $iplimit=qa_opt('max_rate_ip_votes');
    break;

Would that work?
by
Tried that, it does not seem to work...
by
You would need to make the matching change in qa_limits_increment() specifically for ($action== QA_LIMIT_VOTES) - that might work.
by
Will try this soon and report back.
...