View Full Version : Times Posted Limiter
InsaneContender
05-16-2004, 05:15 PM
I'm looking for a hack that can limit how many posts are posted in a forum for x ammount of hours or such,
Like, we have a semi-spam board. Actually, it is the talkerbot forum :) where people can just chat with him. But, sense post counts aren't enabled in it, people have started to spam it.
So I am looking for something that would regulate how many posts a user can post in that forum. Such as only say 30 posts in that forum a day.
Do you follow?
InsaneContender
05-16-2004, 07:04 PM
bump
Xenon
05-16-2004, 07:06 PM
there's no need to bump a thread within 24h
InsaneContender
05-16-2004, 08:40 PM
Sorry. Won't happen again!
Xenon
05-17-2004, 04:18 PM
hmm, it's not a fine way, but should work:
open newreply.php and find:
// ### CHECK IF ALLOWED TO POST ###
if (!$threadinfo['visible'] OR $threadinfo['isdeleted'])
{
$idname = $vbphrase['thread'];
eval(print_standard_error('invalidid'));
}
and below add:
// ### CHECK IF THIS IS A SPAM FORUM AND JUST ALLOW XX POSTS PER DAY ###
if ($threadinfo['forumid'] == XX)
{
$posts = $DB_site->query_first("
SELECT COUNT(postid) AS spamposts
FROM " . TABLE_PREFIX . "post AS post
INNER JOIN " . TABLE_PREFIX . "thread AS thread USING(threadid)
WHERE post.dateline > " . (TIMENOW - 24 * 3600) . "
AND thread.forumid = XX
");
if ($posts['spamposts'] > 30)
{
eval(print_standard_error('toomuchspam'));
}
}
now all you have to to is to create a new errorphrase called toomuchspam :)
Xenon
05-17-2004, 07:55 PM
you're welcome
InsaneContender
05-17-2004, 10:08 PM
Nice. Could you just tell me what I need to edit please?
Thanks!
Xenon
05-18-2004, 11:48 AM
@ tenbucks: yes you can.
be sure to remove it in the query as well ;)
@InsideContender, well, i did already, all you have to change is the XX into the specific forumid.
InsaneContender
05-20-2004, 03:20 AM
Ok, got it. Wish this could be set in the admin CP. But this works!
Merjawy
08-14-2004, 03:01 AM
Thanks Xenon, love the mod .. but this only works on replying but not new thread !!!
how can I limit new threads please?
thnx
alqafelah
09-24-2004, 03:23 PM
Thanks Xenon, love the mod .. but this only works on replying but not new thread !!!
how can I limit new threads please?
thnx
same question Xenon :)
Has this been made for 3.5.x?
I've tried searching, but couldn't find it.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.