Jump to content

Hide/Mask Clients IP from Support Tickets & Admin Panel


zooky

Recommended Posts

you can use the code below to remove it from Support Tickets - just change {$reply.message} in viewticket.tpl to...

 

{$reply.message|replace:'----------------------------':''|regex_replace:'/IP Address: \b(??:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\b$/':''}

if it doesn't work for you, there is an alternative bit of code in the thread below, but the above code should work fine.

 

http://forum.whmcs.com/showthread.php?81286-How-to-remove-IP-Adress-from-ticket&p=346922#post346922

 

for Other Information, you could use similar regex code in clientsummary.tpl, but if you just wanted to show the client's last login date (and remove IP Address and Host) then you could change {$lastlogin} to...

 

{$lastlogin|truncate:25:"":true}

for Recent Activity, I assume that you're talking about the "Recent Client Activity" widget - these can be edited and are in the modules/widgets folder - you just need to edit client_activity.php and change it to...

 

<?php

if (!defined("WHMCS"))
   die("This file cannot be accessed directly");

function widget_client_activity($vars) {
   global $_ADMINLANG;

   $title = $_ADMINLANG['home']['recentclientactivity'];

   $content = '<table class="table table-condensed">
<tr bgcolor="#efefef" style="text-align:center;font-weight:bold;"><td>'.$_ADMINLANG['fields']['client'].'</td><td>'.$_ADMINLANG['system']['lastaccess'].'</td></tr>';

   $id = '';
   $result = select_query("tblclients","id,firstname,lastname,ip,lastlogin","","lastlogin","DESC","0,5");
   while ($data = mysql_fetch_array($result)) {
       $id = $data['id'];
       $content .= '<tr bgcolor="#ffffff" style="text-align:center;"><td><a href="clientssummary.php?userid='.$id.'">'.$data["firstname"].' '.$data["lastname"].'</a></td><td>'.fromMySQLDate($data["lastlogin"],true).'</td></tr>';
   }
   if (!$id) $content .= '<tr bgcolor="#ffffff" style="text-align:center;"><td colspan="3">'.$_ADMINLANG['global']['norecordsfound'].'</td></tr>';

   $content .= '</table>';

   return array('title'=>$title,'content'=>$content);

}

add_hook("AdminHomeWidgets",1,"widget_client_activity");

Link to comment
Share on other sites

you can use the code below to remove it from Support Tickets - just change {$reply.message} in viewticket.tpl to...

 

Worked, thank you sir!

 

for Other Information, you could use similar regex code in clientsummary.tpl, but if you just wanted to show the client's last login date (and remove IP Address and Host) then you could change {$lastlogin} to...

 

I cannot find this file anywhere. Where exactly do am i looking?

 

for Recent Activity, I assume that you're talking about the "Recent Client Activity" widget - these can be edited and are in the modules/widgets folder - you just need to edit client_activity.php and change it to...

 

Worked!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated