Helpful Information
 
 
Category: vBulletin 3.0 Beta Releases
Min Post count to start a new thread

I made this for our for-sale section..... thought someone else may want it... it has no user friendly control pannel or anything.... just plain code.


Open your newthread.php file in your forum directory...

find this line:
// ############################### start post thread ###############################

right before it add this:

// check to see if user meets post count requirments

//set the min posts count
$minpostcount = 49;
//enter the forumids of the forums u want a post count limit on. i used 73, 28, and 40.

if ((($forumid == 73) OR ($forumid == 28) OR ($forumid == 40) OR ($forumid == 80)) AND ($bbuserinfo['posts'] < $minpostcount)) {
print_no_permission();
}

This simple hack is extreamly simple, and there is nothing special about it.... but it may help someone who wants to limit access to a forum or 2... to make it work for only 1 forum... use this:

if (($forumid == 73) AND ($bbuserinfo['posts'] < $minpostcount)) {
print_no_permission();
}

73 being the only forumid

or for 2 forums:

if ((($forumid == 73) OR ($forumid == 100)) AND ($bbuserinfo['posts'] < $minpostcount)) {
print_no_permission();
}

73 and 100 being the forum ids...

If you do not know how to get a forum id, just copy and paste a link to your forum.... like this:
http://www.fullsizechevy.com/forums/forumdisplay.php?f=3

the number after the equal sign is the forumid .... which in this case... is 3 :)

i suggest to replace
if ((($forumid == 73) OR ($forumid == 28) OR ($forumid == 40) OR ($forumid = 80)) AND ($bbuserinfo['posts'] < $minpostcount)) {
print_no_permission();
}

with
if (in_array($forumid, array(73, 28, 40, 80)) AND $bbuserinfo['posts'] < $minpostcount)
{
print_no_permission();
}

way easier to read or change :)

i suggest to replace
if ((($forumid == 73) OR ($forumid == 28) OR ($forumid == 40) OR ($forumid = 80)) AND ($bbuserinfo['posts'] < $minpostcount)) {
print_no_permission();
}

with
if (in_array($forumid, array(73, 28, 40, 80)) AND $bbuserinfo['posts'] < $minpostcount)
{
print_no_permission();
}

way easier to read or change :)

Thanks, i am still a php noob :D

I also just realised i put 1 equal sign instead of 2 up there on the third forum, which would have changed the forumid to 80 everytime a new thread was started :o

I would edit your first post, to reflect the fix for that one =, as some users don't read past the first post...

am i just missing something cant you just use the promotions system....

am i just missing something cant you just use the promotions system....
now that you mention it, yes you could.

Still, this might be helpful for users that already have tons of usergroups, which would make an implementation of the promotion system rather hard...

now that you mention it, yes you could.

Still, this might be helpful for users that already have tons of usergroups, which would make an implementation of the promotion system rather hard...


well we allready have a dozen usergroups, and 19,000 members...

I believe this already exists, http://www.vbulletin.org/forum/showthread.php?t=64607

Nice work anyway :)

am i just missing something cant you just use the promotions system....
AFAIK, default Usergroup Permissions doesn't allow for per-forum posting restrictions.










privacy (GDPR)