PDA

View Full Version : Required X Post to Create New Thread


tnguy3n
12-29-2004, 10:00 PM
This mod was idea of HR3rdGen as requested here.

Mod title: Required X Posts to Make New Thread in Y Forum(s)

Description:
What this mod do is to disallows user with XX amount of posts to create New Thread in certain forums that you assigned. Of course, users can still view thread, reply to threads as normal, but not to make new thread until they meet the minimum number of required posts.

File mod: 1

Installation Time: 1 min

-------

OPEN: newthread.php,

FIND:
// check if there is a forum password and if so, ensure the user has it set
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);

BELOW ADD:
// setting for minumum post required to create new thread
$num_minpost_required = 5;
$usergroupid_req_minmpost = array(2,3,4,8,9); // use comma to separate your usergroupid
$forumid_req_minpost = array(2,3,4,5,6); // use comma to separate your forumid

if (in_array($bbuserinfo['usergroupid'], $usergroupid_req_minmpost) AND ($bbuserinfo[posts]<$num_minpost_required) AND in_array($foruminfo['forumid'], $forumid_req_minpost))
{
print_no_permission();
}
// end min post to create new thread


You can more usergroups and forums to those array as you want.

boo.3
12-31-2004, 10:11 PM
great just what i was looking for!!!

installs

boo.3
12-31-2004, 10:16 PM
is there any way just to set this up in 1 forum? insted of all forums?
thanks

boo

tnguy3n
12-31-2004, 10:46 PM
is there any way just to set this up in 1 forum? insted of all forums?
thanks

boo
In forumid_req_minpost array, put 1 forumid instead of multiple ones.

for example, $forumid_req_minpost = array(2);

boo.3
01-01-2005, 04:46 PM
ahh ok thanks i get it ;)

boo.3
01-01-2005, 04:48 PM
uhhh how do u tell what the forumid is?

http://www.b3playground.com/forums

^^^ i want the showroom

tnguy3n
01-04-2005, 05:30 AM
uhhh how do u tell what the forumid is?

http://www.b3playground.com/forums

^^^ i want the showroom
your showroom forumid is 13 .

Rebecca217
03-29-2005, 01:25 AM
Thanks for making this available to everyone. It looks like a great hack!

I do have one question. Will members have to meet the minumum number each time they go to post a new thread, or only the first time? For example, would they have to reach 5 replies and then be able to create threads freely after that... or will they have to make five replies each time they want to post a thread?

Rebecca

tnguy3n
03-29-2005, 02:03 AM
it checks for user's cumulative posts, then users can make as many threads if they meet required XX posts you assigned.

Rebecca217
03-29-2005, 02:29 AM
Is there any way to modify it so the user has to meet the post requirement each time before starting a new thread?

ricker
08-09-2005, 12:53 AM
I love this hack! Is there anyone working on porting it to VB3.5?