MyBB Community Forums

Full Version: Mod CP.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Jerlene Wrote:Anyone know the file(s) to edit?

If you want to disable rights for your moderators to see ip addresses in ModCP, just upload this 2 files in:
yourforum/mod/ dir, over your curent files.

[attachment=8981][attachment=8983]
After you upload this 2 files, they don't see ip addresses in Mod CP.



---
Here it is what I deleted from this 2 files to hide ip addresses:

In mod/modlogs.php

	echo "<td class=\"subheader\" align=\"center\">$lang->ipaddress</td>\n";
echo "<td class=\"$bgcolor\" align=\"center\">$logitem[ipaddress]</td>";

And in mod/users.php
		<li><a href=\"users.php?".SID."&action=findips&uid=$uid\">$lang->ip_addresses</a></li>\n

	if($search['regip'])
	{
		$search['regip'] = $db->escape_string($search['regip']);
		$conditions .= " AND regip LIKE '$search[regip]%'";
	}
	if($search['postip'])
	{
		$search['postip'] = $db->escape_string($search['postip']);
		$query = $db->query("SELECT DISTINCT uid FROM ".TABLE_PREFIX."posts WHERE ipaddress LIKE '$search[postip]%'");
		$uids = ',';
		while($u = $db->fetch_array($query))
		{
			$uids .= $u['uid'] . ',';
		}
		$conditions .= " AND '$uids' LIKE CONCAT('%,',uid,',%')";
	}

		$options['findips'] = $lang->ip_addresses;

			if($searchdisp['regip'] == 'yes')
			{
				echo "<td class=\"$bgcolor\">$user[regip]</td>\n";
			}

		if($searchdisp['regip'] == 'yes')
		{
			echo "<td class=\"subheader\" align=\"center\">$lang->reg_ip</td>\n";
		}

	makeinputcode($lang->and_reg_ip, "search[regip]");
	makeinputcode($lang->and_post_ip, "search[postip]");
	makeyesnocode($lang->display_regip, "searchdisp[regip]", 'no');


This is the simple way to disable rights for your moderators to see ip addresses in ModCP.
Smile
Thanks so much!
There's an option for them to view IP addresses. I'd like to remove that option.
Pages: 1 2