View Full Version : Number of posts before access of page
I have a page on my vb which i don't want people to be able to access unless they have made 5 posts in the previous 24 hours, does anyone know of a way to do this?
calorie
05-09-2008, 03:55 AM
Untested but try placing the following right after you include the vB global.php file:
$fivepost_check = $db->query_first("SELECT COUNT(1) AS cnt
FROM " . TABLE_PREFIX . "post
WHERE userid = " . $vbulletin->userinfo['userid'] . "
AND dateline > " . TIMENOW . " - 86400
");
if ($fivepost_check['cnt'] < 5)
{
print_no_permission();
}
I use this https://vborg.vbsupport.ru/showthread.php?t=62164&highlight=subscription can i use that script at the top of that page?
calorie
05-09-2008, 04:41 AM
Untested but try placing the following right after you include the vB global.php file:
require_once('./global.php');
// here
Don't see why not, just do the bold part and give it a try.
That worked perfectly! Is there anyway that i can make it say something about needing 5 posts?
Dismounted
05-09-2008, 10:40 AM
You can create an error phrase, and you the error message handler in vBulletin.
I'm not so good with that sort of thing (still learning) are you able to give me a few more instructions?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.