MyBB Community Forums

Full Version: Reputations From Posts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When the setting "Allow Post Reputations" is set to no there is still the display on rep page for it. While not a bug I think it's a wonky execution of a new feature for MyBB. If disabled globally as a setting on the reputation template it should not display.

MyBB can also save a query in reputation.php.

This code should have an if statement with setting check.

	// Figure out how many reps have come from posts / 'general'
	// Posts
	$query = $db->simple_select("reputation", "COUNT(rid) AS rep_posts", "uid = '".$user['uid']."' AND pid > 0");
	$rep_post_count = $db->fetch_field($query, "rep_posts");
	$rep_posts = my_number_format($rep_post_count);

Could easily be:

	// Figure out how many reps have come from posts / 'general'
	// Posts
	if($mybb->settings['postrep'] == 1)
	{
	$query = $db->simple_select("reputation", "COUNT(rid) AS rep_posts", "uid = '".$user['uid']."' AND pid > 0");
	$rep_post_count = $db->fetch_field($query, "rep_posts");
	$rep_posts = my_number_format($rep_post_count);
	}

I'm just putting this out there.
goes along with a lot of items that should be disabled/unused if the settings say to disable or no permissions.