Jump to content

Clientarea customisation


clever-host

Recommended Posts

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:

whmcs.png

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?

Link to comment
Share on other sites

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');

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