MyBB Community Forums

Full Version: how to setup forum restriction on post bases
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
hi all

i want to know how can i stop a user having post less then the limit like i want to stop user to access particular section who have less than 20 posts?

how to stop a user to post just after his post again.


i have some section that are not helpful if a guest of member with less 20 post will enter and download stuff from there, its like leeching.

how can i stop them ? how can i put restriction about posts?

i also want to know restriction like member having less than 10 post shouldn't be able to use PM

members having post count less than 20 shouldn't be able to add attachments etc.

thanks in advanceSmile

Regards
thanks a lot bro, you are always helpful, i have read it already and going to add those changes Smile

Thousands of :Red Roses: for you @ Christian
That's old code, Christian! Will it still work? All-expert, are you using 1.2?

and here is a plug in to restrict pm usage http://mods.mybboard.com/view.php?did=359

and you'll just have to make the separate groups and take away the ability for a particular group to add attachments in ACP.
judel Wrote:That's old code, Christian! Will it still work?

Why wouldn't it? Smile
Why wouldn't it? Well, gee, since just about every other mod won't work from 1.1.x to 1.2??? Maybe? LMAO! Wink
judel Wrote:Why wouldn't it? Well, gee, since just about every other mod won't work from 1.1.x to 1.2??? Maybe? LMAO! Wink

Well, that's plugins for ya. This however is a simple DB query, which makes use of DB fields/functions that haven't been changed or removed. So I see no reason why it shouldn't work.
Updated to MyBB 1.2 standards.
All credit goes to Michael.

Insert into global.php
## 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 && $mybb->user['usergroup'] == $gid1)
{
	// Update usergroup
	$update_query = array(
		'usergroup' => $gid2,
		'displaygroup' => $gid2
	);
	$db->update_query(TABLE_PREFIX."users", $update_query, "uid='".$mybb->user['uid']."'");
}
## Update Usergroup ##
One thing to keep in mind though, all-expert. If you use this modification to have your members automatically upgraded, they can spam your forum 20 times to be upgraded! So it will be pretty easy for someone to see stuff you don't want them to! If you just create the different groups with different levels and then upgrade them yourself, you have much more control on what your members have access to! Just FYI! Big Grin
The maker of this modification could go one step further and check that the user has been registered for X days, if the admin allows such Smile
Pages: 1 2