newgenservices
05-05-11, 11:11 AM
1) Backup \templates\portal\clientareadomains.tpl (or the same file under any other template you use) and Open the file in notepad or any code editor you use
2) Add the following code before line #1
{php}
$clientarea_domainlist = $this->_tpl_vars['domains'];
for($domi=0;$domi<count($clientarea_domainlist);$domi++){
$clientarea_domainlist[$domi]['nextduedate'] = str_replace("/","-",$clientarea_domainlist[$domi]['nextduedate']);
$domainexpiryts = strtotime($clientarea_domainlist[$domi]['nextduedate']);
$before30daysts = time()- (30 * 24 * 60 * 60);
if( ( ($clientarea_domainlist[$domi]['status'] == "expired") && ($domainexpiryts>$before30daysts) ) || ($clientarea_domainlist[$domi]['status'] == "cancelled") ){
unset($clientarea_domainlist[$domi]);
}
}
sort($clientarea_domainlist); $this->_tpl_vars['domains'] = $clientarea_domainlist; $this->_tpl_vars['numproducts'] = count($clientarea_domainlist);
{/php}
3) Save the file and overwrite existing \templates\portal\clientareadomains.tpl on your server.
If you are using WHMCS 4.4.2 and portal template, you can as well download the attached clientareadomains.tpl.zip in this post, extract and overwrite it. DO NOT overwrite with attached if you are using a different or custom template.
This will hide all expired domains over 30 days or canceled domains from your clientarea domains list.
2) Add the following code before line #1
{php}
$clientarea_domainlist = $this->_tpl_vars['domains'];
for($domi=0;$domi<count($clientarea_domainlist);$domi++){
$clientarea_domainlist[$domi]['nextduedate'] = str_replace("/","-",$clientarea_domainlist[$domi]['nextduedate']);
$domainexpiryts = strtotime($clientarea_domainlist[$domi]['nextduedate']);
$before30daysts = time()- (30 * 24 * 60 * 60);
if( ( ($clientarea_domainlist[$domi]['status'] == "expired") && ($domainexpiryts>$before30daysts) ) || ($clientarea_domainlist[$domi]['status'] == "cancelled") ){
unset($clientarea_domainlist[$domi]);
}
}
sort($clientarea_domainlist); $this->_tpl_vars['domains'] = $clientarea_domainlist; $this->_tpl_vars['numproducts'] = count($clientarea_domainlist);
{/php}
3) Save the file and overwrite existing \templates\portal\clientareadomains.tpl on your server.
If you are using WHMCS 4.4.2 and portal template, you can as well download the attached clientareadomains.tpl.zip in this post, extract and overwrite it. DO NOT overwrite with attached if you are using a different or custom template.
This will hide all expired domains over 30 days or canceled domains from your clientarea domains list.