MyBB Community Forums

Full Version: Reputation comments required*
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Please can anybody come up with a simple plugin to check if the reputation comment field is empty?
Not checked, but I think this will work.

Open reputation.php and find nearabout line 232:

	if($mybb->input['pid'] == 0)
	{
		$mybb->input['comments'] = trim($mybb->input['comments']); // Trim whitespace to check for length
		if(my_strlen($mybb->input['comments']) < 10)
		{
			$show_back = 1;
			$message = $lang->add_no_comment;
			eval("\$error = \"".$templates->get("reputation_add_error")."\";");
			output_page($error);
			exit;
		}
	}

Trim out the base condition, make it:

		$mybb->input['comments'] = trim($mybb->input['comments']); // Trim whitespace to check for length
		if(my_strlen($mybb->input['comments']) < 10)
		{
			$show_back = 1;
			$message = $lang->add_no_comment;
			eval("\$error = \"".$templates->get("reputation_add_error")."\";");
			output_page($error);
			exit;
		}

I think this will force users to input comments in any situation (from post or direct).

Update:

I've made an option-driven version of it Big Grin
http://demonate.com/thread-1419.html
simply Smile
@effone very much will "Method 1" force everyone to input a comment and there is no way to do it without core edit?
Hello MyBB users:

I tried this tutorial, but run into issues. I posted my concern in the general forum, but since I'm not getting responses, I'll post it here in case I get more visibility.

https://community.mybb.com/thread-220234...pid1317015

I would appreciate some assistance with this.
This guide was for MyBB v1.6
I have replied to your thread with guidelines:
https://community.mybb.com/thread-220234...pid1318096