clever-host Posted February 10, 2015 Share Posted February 10, 2015 hello, I have one problem. I try to add this function to client area template, but i don't managed to do. This function is from admin area template: This is function: <div id="replyingadmin"> {if $replyingadmin}<div class="errorbox">{$replyingadmin.name} {$_ADMINLANG.support.viewedandstarted} @ {$replyingadmin.time}</div>{/if} </div> I try to add this function to "clientarea template: viewticket.tpl" but don't work. you can help me, please? 0 Quote Link to comment Share on other sites More sharing options...
Digvijay Posted February 13, 2015 Share Posted February 13, 2015 Hi This is not possible as such .There is no such variables available on viewticket page .You will have create a hook that will extract this info and set the variables accordingly. 0 Quote Link to comment Share on other sites More sharing options...
Digvijay Posted February 13, 2015 Share Posted February 13, 2015 Please find hook code below. You can place this code to a php file and then upload to yourwhmcs/includes/hooks folder. To make your code work you will have to change {$_ADMINLANG.support.viewedandstarted} to {$LANG.support.viewedandstarted} or some other variable and define it in language file accordingly. function checkIfAdminReplied_hook($vars) { if ($vars['filename'] == 'viewticket') { global $smarty; if (isset($vars['replies']) && count($vars['replies']) > 0) { foreach ($vars['descreplies'] as $reply) { if ($reply['admin'] == 1) { $smarty->_tpl_vars['replyingadmin'] = array('name' => $reply['name'], 'time' => $reply['date']); break; } } } // die(); } } add_hook('ClientAreaPage', 99, 'checkIfAdminReplied_hook'); 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.