MyBB Community Forums

Full Version: Access to a forum which certain amount of post!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way to make that possible that members have to have some amount of post to enter a forum?
You can use usergroups for that purpose: http://community.mybboard.net/showthread.php?tid=6297
So i have to add this code in the global.php?

PHP Code:
## Update Usergroup ##
// Usergroup-ID Group 1 (old group)
$gid1 = "2";

// Usergroup-ID Group 2 (new group)
$gid2 = "4";

// Minimal number of posts
$minposts = "5";

// Update user
if ($mybb->user['postnum'] == $minposts)
{
// Update usergroup
$update_group = $db->query("UPDATE ".TABLE_PREFIX."users SET usergroup = '".$gid2."', displaygroup = '".$gid2."' WHERE uid = '".$mybb->user['uid']."' AND usergroup = '".$gid1."'");
}
## Update Usergroup ## 

And i did not understand this part where do i have to put this code?

Code:
UPDATE mybb_users SET usergroup = 'x', displaygroup = 'x' WHERE postnum >= 'y' AND usergroup = 'z'
You have to run that second part using phpmyadmin........it says so in the other thread
I think i better not do this cause it is abit confusing me. Smile
What I do is just create different user groups and then monitor my member's posts. If they reach a certain level, I manually upgrade them to the next usergroup. That also keeps members from spamming your board to access the next automatic level! Big Grin
DragonLord Wrote:I think i better not do this cause it is abit confusing me. Smile

There a tutorial on how to run a SQL query in phpMyAdmin: here

All it does is promote the existing users who already qualify to be in the "higher" usergroup.