MyBB Community Forums

Full Version: No new thread unless one is approved
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
No new thread unless one is approved

I have a forum

All the new threads should be Approved by the Moderator. 

But many members are posting multiple threads , as they cant see their threads which they posted.

Which need approval. 

Here my request is 

Unless the thread is approved , the member should not be allowed to post another new thread. 

is there any plugin for this or any code change. 

Thank you.
if you did not found for free , I can create a plugin for you non-free with your custom features
My dear admin team

pls address this .
I don't think there is a plugin for this.

Regards.
You can peharps just set the registered group to need thread approval (Moderate new threads / posts) and create another group (Registered and allowed) without approval. Then use the promotion system to promote "registered" to "Registered and allowed" after X threads.
		$plugins->add_hook('datahandler_post_validate_thread', 'foo_datahandler_post_validate_thread');
		function datahandler_post_validate_thread(\PostDataHandler $data_handler): \PostDataHandler
		{
			$thread_data = &$data_handler->data;

			$forum_id = (int)$thread_data['fid'];

			$user_id = (int)$thread_data['uid'];

			global $db;

			$query = $db->simple_select(
				'threads',
				'tid',
				"fid='{$forum_id}' AND uid='{$user_id}' AND visible='0'"
			);

			if($db->num_rows($query)) {
				$data_handler->set_error("You already have unapproved content in this forum. Please wait for it to be approved before posting another.");
			}

			return $data_handler;
		}

Use something like Hooks:
https://github.com/OUGC-Network/MyBB-Hooks

Regards.
(2025-10-18, 05:19 AM)xxcorrosionxx Wrote: [ -> ]What's wrong with using this?
https://community.mybb.com/mods.php?acti...w&pid=1498

Do you even know what was he requested for ? This plugin doing nothing like that
My aplogies, i didnt dive deeper into that plugin. I just did a sumple search lol
My code above may be functional, and is probably all the code necessary for a plugin for this idea.

Feel free to use that code or do whatever you want with it, with no credit.

Maybe somebody can do a plugin with forum and group permissions...hope is free too.

Regards.
Pages: 1 2