View Full Version : Minimum post need to make a thread in a certain forum
elsonar
01-13-2007, 10:43 AM
Hey guys,
I am running 3.6.2 and was wondering if they is a mod that would allow me to say specify that 10 posts were neded to post in an advertising forum?
Any help would be great
Jay
Nathanial Horn
01-13-2007, 05:47 PM
1. Back-up newthread.php and newreply.php (only do newreply if you do not want them to make replies either)
2. in newthread.php find:
if (!$foruminfo['allowposting'] OR $foruminfo['link'] OR !$foruminfo['cancontainthreads'])
{
eval(standard_error(fetch_error('forumclosed')));
}
3. After add:
// check to see if they have enough posts
if ((($vbulletin->userinfo['posts'] < '10') AND ($foruminfo[forumid] == 'xx')) AND (($vbulletin->userinfo['usergroupid'] < '5') OR ($vbulletin->userinfo['usergroupid'] > '6')))
{
eval(standard_error(fetch_error('notenoughposts')) );
}
4. Change xx to the forumid you do not want the posts to be made. Note: admins/gm's excluded from restriction. If you allow guests to posts, they will not be able to as well in the forum you specify.
5. Save.
6. open newreply.php (if you want to stop members with <10 from replying as well)
7. Find:
if (!$threadinfo['open'])
{
if (!can_moderate($threadinfo['forumid'], 'canopenclose'))
{
$vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t=$threadid";
eval(standard_error(fetch_error('threadclosed')));
}
}
8. After, add code from step 3, and save.
9. Create a new error phrase called notenoughposts
10. Add at own risk, ;)
Kirk Y
01-13-2007, 06:52 PM
Or use the User Promotions system, to avoid hacking your vBulletin, lol.
da420
01-13-2007, 06:54 PM
Promotions make a lot more sense if you ask me.
Nathanial Horn
01-13-2007, 07:04 PM
Promotions take resources that are required to execute, and also requires another group to be made and permissions set up for. The code offered above takes next to nothing execution time, no additional queries required, and requires one less group with permissions for every forum set up.
Why set up a promotion for a post count check of less than 10 in one forum? Waste of time.
Kirk Y
01-13-2007, 07:06 PM
Some would consider keeping your vBulletin free of custom code worth it.
josh_B
01-14-2007, 07:29 AM
Promotions dont take that much up, and if you decide you dont want that anymore, is far easier to return to the original setup..
Dismounted
01-14-2007, 07:36 AM
Promotions take resources that are required to execute, and also requires another group to be made and permissions set up for. The code offered above takes next to nothing execution time, no additional queries required, and requires one less group with permissions for every forum set up.
Why set up a promotion for a post count check of less than 10 in one forum? Waste of time.
Because it's more logical than hacking your vBulletin core files. vBulletin DOES have a plugin system, you know (if you don't want promotions).
NeoToxic
01-14-2007, 09:20 AM
I am looking for this too. Is the a product for this if not WHY! not.
elsonar
01-14-2007, 03:29 PM
yeah a product would be great.
Nathanial Horn
01-14-2007, 06:10 PM
I took the time to write that bit of code for you, it does exactly what you requested and very simple to add, if you want it as a product you should have requested it. I do not write products or plugins, I write code for efficiency and speed, so you'll either have to wait for one, or write your own.
You can always use promotions as was stated above.
elsonar
01-14-2007, 07:43 PM
thanks, i'd just like seeing something in the backend when you edit your fourm saying how many posts you n eed to make a thread instead of going into code.
Joe
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.