View Full Version : set max threads by usergroup in forum
trafix
04-04-2003, 12:10 PM
ok heres the deal...
i have a set of forums that contains many sub forums. I want to set a max amount of overall threads that a member can start depending on their usergroup. Say a member of usergroup 8 (max set at 6) has his six threads in this group of forums then he has to delete one before starting another.
This limit only applies to the selected forums, not the entire board.
Any ideas???
Would somebody give me a hand here??
Logician
04-04-2003, 12:24 PM
If I'm not wrong, the code has been given in this forum (hack requests and probably by me), please give it a shot by searching here.
trafix
04-04-2003, 09:43 PM
hmmm, I searched for posts by you that contained the word "thread", got 7 pages of results (for your own intrest :) ) and found the following which are not quite what i was looking for,
https://vborg.vbsupport.ru/showthread.php?s=&threadid=46423&highlight=thread
https://vborg.vbsupport.ru/showthread.php?s=&threadid=40094&highlight=thread
https://vborg.vbsupport.ru/showthread.php?s=&threadid=40012&highlight=thread
i will keep looking........
Logician
04-05-2003, 06:34 AM
I guess writing one is easier than searching for the old one :D
Here you go (not tested, holler if it does not work and I'll fix it) ;)
trafix
04-05-2003, 07:03 AM
thanks heaps, i hope one day i have the knoledge to help others more often.
I shall install soon and let you know.
trafix
04-05-2003, 09:02 AM
Yep that works :) .......
How do i include the subforums within "Z" ?
example no. 6 is my "category" forum(main parant), and there are 20 subforums underneath it.
What do i have to add to limit a member to only starting 5 threads maximum in either no.6 or any of the sub forums.
The present code will limit the max thread allowed to only "Z"
Thanks
This code doesn't seem to work with Vbulletin 3.x, Logician or anyone else; would you know how to get this working for 3.x ? I would be very grateful for this code...
Logician
04-24-2004, 09:04 PM
This code doesn't seem to work with Vbulletin 3.x, Logician or anyone else; would you know how to get this working for 3.x ? I would be very grateful for this code...
here you go:
Logician, would threads made by a user before I added this code count towards it? Because it seems to let a user post another thread even though they already have one in a certain forum, but after that it kicks in for em.
I'm not sure if this is just a mistake in the code, or if it's because it doesn't count old threads, or does it only work per day?
Logician
04-25-2004, 06:43 PM
yes all threads made by the user is count including the ones before you added the hack code.
Reviving this and sharing. Posted a paid request for an update to this & didn't receive anything that worked, so my other admin and I muddled through it on our own. Fun day.
The following works like a charm on 3.8.0, if you don't want to install a big, bulky overly-configurable hack for something as simple as this. Insert into same position in newthread.php and create same phrase mentioned in the text file above. Remove and add usergroups and forums as necessary from the code:
if (($vbulletin->userinfo['usergroupid']==X OR $vbulletin->userinfo['usergroupid']==X OR $vbulletin->userinfo['usergroupid']==X OR $vbulletin->userinfo['usergroupid']==X) AND $foruminfo['forumid']==Y OR $foruminfo['forumid']==Y OR $foruminfo['forumid']==Y OR $foruminfo['forumid']==Y)
{
$usersidnumber = $vbulletin->userinfo['userid'];
$checkpostfromthread = mysql_fetch_array(mysql_query("SELECT COUNT(threadid) AS numrows FROM " . TABLE_PREFIX . "thread WHERE postuserid='$usersidnumber' AND forumid='$foruminfo[forumid]'"), MYSQL_ASSOC);
if ($checkpostfromthread[numrows]>=Z)
{
eval(standard_error($vbphrase['canpostx']));
}
}
This will only affect newly created threads and not replies. Hope this post is ok with Logician. ;)
vithorius
05-31-2009, 11:27 PM
How about this one?
Throttle Posts/Threads (restrict number of posts/threads by usergroup/forum by time)
https://vborg.vbsupport.ru/showthread.php?t=131014
Yep, that's exactly what I was referring to above... ;)
street tactic
06-09-2009, 05:44 AM
This post definitely needs to be kept alive! Thank you for the mod!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.