MyBB Community Forums

Full Version: Moderator Permission
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I would like some groups of moderators to be unable to view the admin's ip.
Can someone help with this? :-s
I've coded a plugin for a client which do exactly like this. If you want to purchase, drop me a PM.
I was sure you would say that. Sorry, I'm looking for a free plugin.
Find in /inc/functions_post.php
	if($mybb->settings['logip'] != "no")
		{
			if($mybb->settings['logip'] == "show")
			{
				eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_show")."\";");
			}
			else if($mybb->settings['logip'] == "hide" && is_moderator($fid, "canviewips"))
			{
				eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_hiden")."\";");
			}
			else
			{
				$post['iplogged'] = "";
			}
		}
		else
		{
			$post['iplogged'] = "";
		}

Replace with
if($mybb->settings['logip'] != "no")
		{
			if($mybb->settings['logip'] == "show" && $post['displaygroup']!=4)
			{
				eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_show")."\";");
			}
			else if($mybb->settings['logip'] == "hide" && is_moderator($fid, "canviewips") && $post['displaygroup']!=4)
			{
				eval("\$post['iplogged'] = \"".$templates->get("postbit_iplogged_hiden")."\";");
			}
			else
			{
				$post['iplogged'] = "";
			}
		}
That should work. On version 1.6.3 it is around line 529.