The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I am after a modification that allows admin to set a limit on threads in a specific forum for members.
EG you have a signature forum and members can only create new threads once every 7 days... Thanks! |
|
#2
|
|||
|
|||
|
Untested but try adding the following plugin at the newthread_start hook (how to add a plugin):
Code:
// change X to the forum ID of the signature forum
// change 7 to how many days to prevent new threads
if ($foruminfo['forumid'] == X)
{
$sigforum_check = $db->query_first("SELECT COUNT(1) AS cnt
FROM " . TABLE_PREFIX . "thread
WHERE postuserid = " . $vbulletin->userinfo['userid'] . "
AND forumid = " . $foruminfo['forumid'] . "
AND dateline > " . TIMENOW . " - (86400 * 7)
");
if ($sigforum_check['cnt'])
{
print_no_permission();
}
}
|
|
#3
|
|||
|
|||
|
nope i get an error
thanks though
|
|
#4
|
||||
|
||||
|
If you want help, you might want to post exactly what you put in your plugin/templates and tell us what the error is.
|
|
#5
|
|||
|
|||
|
well i put this in as my code
Quote:
|
|
#6
|
||||
|
||||
|
This doesn't prevent them from posting after their post, this does prevent them from opening another thread.
|
|
#7
|
|||
|
|||
|
ya it didnt prevent that, but i took out the second = sign in the first line and it now works. thanks!!!!
--------------- Added [DATE]1210461601[/DATE] at [TIME]1210461601[/TIME] --------------- How would i set it up so when they do try to create a new thread the error message says 'you have already requested in the last 7 days' |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|