PHP Bulletin Board Home
News About Home
Features of phpBB Test drive phpBB Downloads Support for phpBB The phpBB Community Styles for customising phpBB 3rd party modifications to phpBB

Support Home | Knowledge Base Home | Submit Article | Search Articles | Browse Articles
 How to make IPs visible to admins only 
Description: Make it so that moderators cannot see I.P. adresses.
Author: EldarionII
Date: Tue Jul 27, 2004 7:31 pm
Type: HowTo
Keywords: moderator, admin, IP, adress, mod
Category: MODifications
Some people have certain situations where they cannot let the moderators see I.P. adresses, so I will tell you how to make this possible.

Open veiwtopic.php

Find:
Code:
      if ( $is_auth['auth_mod'] )
   {
      $temp_url = "modcp.$phpEx?mode=ip&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&" . POST_TOPIC_URL . "=" . $topic_id . "&sid=" . $userdata['session_id'];
      $ip_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_ip'] . '" alt="' . $lang['View_IP'] . '" title="' . $lang['View_IP'] . '" border="0" /></a>';
      $ip = '<a href="' . $temp_url . '">' . $lang['View_IP'] . '</a>';
   
      $temp_url = "posting.$phpEx?mode=delete&amp;" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&amp;sid=" . $userdata['session_id'];
      $delpost_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete_post'] . '" title="' . $lang['Delete_post'] . '" border="0" /></a>';
      $delpost = '<a href="' . $temp_url . '">' . $lang['Delete_post'] . '</a>';
   }

And replace it with:
Code:
      if ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] )
   {
      $temp_url = "modcp.$phpEx?mode=ip&amp;" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&amp;" . POST_TOPIC_URL . "=" . $topic_id . "&amp;sid=" . $userdata['session_id'];
      $ip_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_ip'] . '" alt="' . $lang['View_IP'] . '" title="' . $lang['View_IP'] . '" border="0" /></a>';
      $ip = '<a href="' . $temp_url . '">' . $lang['View_IP'] . '</a>';
   }

   if ( $is_auth['auth_mod'] )
   {
      $temp_url = "posting.$phpEx?mode=delete&amp;" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&amp;sid=" . $userdata['session_id'];
      $delpost_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete_post'] . '" title="' . $lang['Delete_post'] . '" border="0" /></a>';
      $delpost = '<a href="' . $temp_url . '">' . $lang['Delete_post'] . '</a>';
   }


Save & close all files.

Username: Password:
News | Features | Demo | Downloads | Support | Community | Styles | Mods | Links | Merchandise | About | Home
 © Copyright 2002 The phpBB Group.