Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
Pages: 1
Hello!
I want to change the Chat link of design but It does not work properly
How can I do this?
opened_chats_js.tpl.php
Orginal Code:
[== PHP ==]
$chatsOpen = CSCacheAPC::getMem()->getArray('lhc_open_chats');
if (!empty($chatsOpen)){
$chats = erLhcoreClassChat::getList(array('filterin' => array('id' => $chatsOpen)));
// Delete any old chat if it exists
$deleteKeys = array_diff($chatsOpen, array_keys($chats));
foreach ($deleteKeys as $chat_id) {
CSCacheAPC::getMem()->removeFromArray('lhc_open_chats', $chat_id);
}
foreach ($chats as $chat ){
if (erLhcoreClassChat::hasAccessToRead($chat)){
echo "lhinst.startChat('$chat->id',$('#tabs'),'".erLhcoreClassDesign::shrt($chat->nick,10,'...',30,ENT_QUOTES)."');";
} else {
CSCacheAPC::getMem()->removeFromArray('lhc_open_chats', $chat->id);
}
}
}
changed:
[== PHP ==]
$chatsOpen = CSCacheAPC::getMem()->getArray('lhc_open_chats');
if (!empty($chatsOpen)){
$chats = erLhcoreClassChat::getList(array('filterin' => array('id' => $chatsOpen)));
// Delete any old chat if it exists
$deleteKeys = array_diff($chatsOpen, array_keys($chats));
foreach ($deleteKeys as $chat_id) {
CSCacheAPC::getMem()->removeFromArray('lhc_open_chats', $chat_id);
}
foreach ($chats as $chat ){
if (erLhcoreClassChat::hasAccessToRead($chat)){
echo "lhinst.startChat('$chat->id',$('#tabs'),'<a class='button red' ".erLhcoreClassDesign::shrt($chat->nick,10,'...',30,ENT_QUOTES)." </a> ');"; /* THIS LINE */
} else {
CSCacheAPC::getMem()->removeFromArray('lhc_open_chats', $chat->id);
}
}
}
Where am I doing wrong?
Thank you!
Offline
It won't work I can only say that. The thing you passed always must be a text. Try do not change a code but instead style it with css.
Offline
Pages: 1