The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
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?
|
|
#2
|
|||
|
|||
|
Untested but try placing the following right after you include the vB global.php file:
Code:
$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();
}
|
|
#3
|
|||
|
|||
|
I use this https://vborg.vbsupport.ru/showthrea...t=subscription can i use that script at the top of that page?
|
|
#4
|
|||
|
|||
|
Quote:
Code:
require_once('./global.php');
// here
|
|
#5
|
|||
|
|||
|
That worked perfectly! Is there anyway that i can make it say something about needing 5 posts?
|
|
#6
|
||||
|
||||
|
You can create an error phrase, and you the error message handler in vBulletin.
|
|
#7
|
|||
|
|||
|
I'm not so good with that sort of thing (still learning) are you able to give me a few more instructions?
|
![]() |
|
|