zooky Posted February 29, 2016 Share Posted February 29, 2016 Hi All, I would like to try and mask/hide my clients IP addresses from Other Information, Recently Activity and Support tickets. Is something like this possible? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 29, 2016 Share Posted February 29, 2016 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"); 0 Quote Link to comment Share on other sites More sharing options...
zooky Posted March 1, 2016 Author Share Posted March 1, 2016 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! 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted March 1, 2016 Share Posted March 1, 2016 I cannot find this file anywhere. Where exactly do am i looking? /admin/templates/blend/clientssummary.tpl 0 Quote Link to comment Share on other sites More sharing options...
zooky Posted March 1, 2016 Author Share Posted March 1, 2016 Thanks guys, really appreciate your help! All working 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.