View Full Version : Limit posts per thread
vonedaddy
08-16-2004, 04:20 PM
Is there a way I can limit the amount of posts in a certain time frame someone can post to a particular thread??? In other words say I want to limit a user names bob to only be able to post in the same thread once every day is that possible??
Can that be possible?
Colin F
08-16-2004, 04:37 PM
Is there a way I can limit the amount of posts in a certain time frame someone can post to a particular thread??? In other words say I want to limit a user names bob to only be able to post in the same thread once every day is that possible??
Can that be possible?
Sure it's possible.
Add a check with something like this in your newreply.php
$lastpost = $DB_site->query_first("SELECT dateline FROM post WHERE threadid = $thread[threadid] AND userid = $bbuserinfo[userid]");
if (vbdate("Ymd", $lastpost[dateline]) == vbdate("Ymd"))
{
eval(print_standard_error('error_posttoday'));
}
you would have to add an errorphrase "error_posttoday".
Also, enclose the whole thing with a check if it's the forum or thread you want.
vonedaddy
08-17-2004, 03:30 AM
I appreciate the help but I dont know if I am good enough with PHP to do this... I would be willing to pay someone to make a hack for me that I can use from my admincp or something.
Colin F
08-17-2004, 04:02 AM
I'll contact you per PM then :)
Gholsie
08-21-2004, 06:07 AM
Is there a way to limit the posts per hour, per thread? I'd like to set up a user so he can only post once per hour per thread instead of an entire day.
Colin F
08-21-2004, 06:29 AM
Add a check like this:
$lastpost = $DB_site->query_first("SELECT dateline FROM post WHERE threadid = $thread[threadid] AND userid = $bbuserinfo[userid]");
if (vbdate("YmdH", $lastpost[dateline]) == vbdate("YmdH"))
{
eval(print_standard_error('error_posttoday'));
}
this wil allow users to post at 10.55 AND at 11.05 though. Just not again till 12.xx
Add a check like this:
$lastpost = $DB_site->query_first("SELECT dateline FROM post WHERE threadid = $thread[threadid] AND userid = $bbuserinfo[userid]");
if (vbdate("YmdH", $lastpost[dateline]) == vbdate("YmdH"))
{
eval(print_standard_error('error_posttoday'));
}
this wil allow users to post at 10.55 AND at 11.05 though. Just not again till 12.xx
Hi, I'm getting
Invalid SQL: SELECT dateline FROM post WHERE threadid = AND userid = 2
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND userid = 2' at line 1when I used your code. It doesn't seem to get the threadid variable from PHP.
Colin F
09-11-2004, 08:44 AM
funny... I guess you don't have table prefixes, do you?
You might try this:
$lastpost = $DB_site->query_first("SELECT dateline FROM post WHERE (threadid = $thread[threadid]) AND (userid = $bbuserinfo[userid])");
blackshadowc4p
09-22-2004, 11:17 AM
I need something a little different. We have a validation period were all posts from a user are validated before going to the board.
We have a Polls forum, and some of the validating users try to scape the period by posting there a lot.
I want to allow just 1 post on the whole Poll forum per day for all users that are on a particular usergroup (in my case Validating Members).
Is this possible? If yes, how?
Thanks.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.