ST4R Posted February 21, 2016 Share Posted February 21, 2016 Hi there. According to this topic I've replaced {$reply.message} with this: {$reply.message|replace:'----------------------------':''|regex_replace:'/IP Address: (\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))$/':''} But the problem didn't solve. - - - Updated - - - this topic http://forum.whmcs.com/showthread.php?81286-How-to-remove-IP-Adress-from-ticket 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 21, 2016 Share Posted February 21, 2016 that code still works for me - where are you trying to use it? 0 Quote Link to comment Share on other sites More sharing options...
ST4R Posted February 23, 2016 Author Share Posted February 23, 2016 I replaced it with {$reply.message} in viewticket.tpl file. 0 Quote Link to comment Share on other sites More sharing options...
ST4R Posted February 24, 2016 Author Share Posted February 24, 2016 Guys, the problem isn't gone. please help me 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 24, 2016 Share Posted February 24, 2016 the above code works for me in both admin and client templates. is it not replacing "IP Address:", the IP address number or both ? if it's not replacing the IP number, what is the IP address ? 0 Quote Link to comment Share on other sites More sharing options...
Rémi Posted May 9, 2023 Share Posted May 9, 2023 Hello @ST4R, Did you manage to solve this problem? I'm trying to hide IP address but I can't solve this 😕 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted May 13, 2023 Share Posted May 13, 2023 (edited) I believe this solution no longer works for modern WHMCS since ipaddress is no longer part of {$reply.message}. To remove IP address you have to set it equal to false via ClientAreaPage hook point by overriding the value from bot $vars['ascreplies'] and $vars['descreplies'] as follows: add_hook('ClientAreaPage', 1, function($vars) { if ($vars['templatefile'] == 'viewticket') { $output = []; foreach ($vars['ascreplies'] as $index => $replies) { foreach ($replies as $k => $v) { if ($k == 'ipaddress') { $v = false; } $output['ascreplies'][$index][$k] = $v; } } foreach ($vars['descreplies'] as $index => $replies) { foreach ($replies as $k => $v) { if ($k == 'ipaddress') { $v = false; } $output['descreplies'][$index][$k] = $v; } } return $output; } }); In case I need to update something I uploaded the script on Github since this community doesn't let me edit posts after a certain amount of time. Edited May 13, 2023 by Kian 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted May 13, 2023 Share Posted May 13, 2023 @Kian is there any reason not to just nullify the IP address in tbltickets instead? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted May 13, 2023 Share Posted May 13, 2023 IP address is attached to every message of the ticket therefore you have to remove it from every element of the array. 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.