MyBB Community Forums
Reputation comments required* - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Requests (https://community.mybb.com/forum-65.html)
+---- Thread: Reputation comments required* (/thread-150751.html)



Reputation comments required* - marcus123 - 2014-02-05

Please can anybody come up with a simple plugin to check if the reputation comment field is empty?


RE: Reputation comments required* - effone - 2014-02-05

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


RE: Reputation comments required* - FBI - 2014-02-09

simply Smile


RE: Reputation comments required* - marcus123 - 2014-02-09

@effone very much will "Method 1" force everyone to input a comment and there is no way to do it without core edit?


RE: Reputation comments required* - albano - 2018-11-03

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-post-1317015.html#pid1317015

I would appreciate some assistance with this.


RE: Reputation comments required* - effone - 2018-11-03

This guide was for MyBB v1.6
I have replied to your thread with guidelines:
https://community.mybb.com/thread-220234-post-1318096.html#pid1318096