View Full Version : Per User Thread Limit (Per Forum)
Jman423
07-05-2011, 01:40 PM
I've searched and found a few explanations that came close, but not quite what I am looking for.
How could I go about restricting a member to posting a single thread in a certain forum? The system would have to check to see if they have posted a thread in that same forum, and prevent them from creating another one.
It's probably more complicated than I would expect, but I figured I'd ask. I was hoping to find a MOD that would handle this, but the ones I found only limited the number of threads in a forum per usergroup instead of per user.
-Thank you
borbole
07-05-2011, 02:00 PM
I've searched and found a few explanations that came close, but not quite what I am looking for.
How could I go about restricting a member to posting a single thread in a certain forum? The system would have to check to see if they have posted a thread in that same forum, and prevent them from creating another one.
It's probably more complicated than I would expect, but I figured I'd ask. I was hoping to find a MOD that would handle this, but the ones I found only limited the number of threads in a forum per usergroup instead of per user.
-Thank you
The only way to achive this would be with a custom mod. Try to request it at the request forums, at the paid one if you ware willing to pay to have this done for you or at the unpaid one if you want this for free.
You could just do something like this in a plugin using hook newthread_start:
if ($vbulletin->db->query_first("SELECT threadid FROM " . TABLE_PREFIX . "thread
WHERE postuserid = " . $vbulletin->userinfo['userid'] . "
AND forumid = " . $foruminfo['forumid'] . "
AND visible = 1 LIMIT 1"))
{
eval(standard_error("Forum Rules allow one thread per user"));
}
or if you'd rather create a phrase for the error message:
eval(standard_error(fetch_error(phrase_name)));
BTW, in general borbole's right, in many cases a mod wouldn't be this small so you wouldn't be likely to get an answer here unless someone knew of an existing mod.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.