Reputation comments required*
#1
Please can anybody come up with a simple plugin to check if the reputation comment field is empty?
#2
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
[Image: logo.svg.svg]
#3
simply Smile
Hello, Welcome to MyBB Indonesia to get local support
My 'Simple' Unique Plugin here Smile
#4
@effone very much will "Method 1" force everyone to input a comment and there is no way to do it without core edit?
#5
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.
#6
This guide was for MyBB v1.6
I have replied to your thread with guidelines:
https://community.mybb.com/thread-220234...pid1318096
[Image: logo.svg.svg]


Forum Jump:


Users browsing this thread: 1 Guest(s)