PDA

View Full Version : Only 10 post max per hour


BigJohnson
11-10-2002, 01:38 PM
I was wondering if someone can help me out. I was wondering if someone can post the code that only 10 people can post replies MAX per hour to only these forum IDS 13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, 59

I was wondering if this could be done without having a crap load of queries. PLease help me out. Thanks.

So when you click the REPLY button a message will come up saying there is a 10 person max per hour feature. Well anyway it can point to a template and I can change what it says.

10 post reply per hour. Thanks.

Xenon
11-10-2002, 01:47 PM
well, you can try this, but i didn't test it, so don't know if it works...

open newreply.php

find this:
$threadid=verifyid("thread",$threadid);

$threadinfo=getthreadinfo($threadid);


below add:
if(in_array($threadinfo[forumid],array(13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, 59 ))) {
$posts=$DB_site->query_first("SELECT COUNT(*) AS replies FROM post LEFT JOIN thread USING (threadid) WHERE post.userid=$bbuserinfo[userid] AND thread.forumid IN (13, 17, 19, 20, 26, 27, 33, 34, 44, 45, 51, 52, 58, 59 ) AND post.dateline > ".(time()-3600));
if($posts[replies]>=10) show_nopermission();


}

BigJohnson
11-10-2002, 07:04 PM
Will test it out and post back to see if it works. Thanks for helping out so much Xenon. Your the greatest.

I have so many little ideas that I would love to impliment into my site and your just omn a role helping me out Xenon.

BigJohnson
11-12-2002, 09:24 AM
It worked buetifully. Thanks.

Xenon
11-12-2002, 04:01 PM
you're welcome :)