本文整理汇总了PHP中erLhcoreClassChat::getChatMessages方法的典型用法代码示例。如果您正苦于以下问题:PHP erLhcoreClassChat::getChatMessages方法的具体用法?PHP erLhcoreClassChat::getChatMessages怎么用?PHP erLhcoreClassChat::getChatMessages使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类erLhcoreClassChat
的用法示例。
在下文中一共展示了erLhcoreClassChat::getChatMessages方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: echo
?>
<div id="messages" >
<div class="msgBlock" <?php
if (erLhcoreClassModelChatConfig::fetch('mheight')->current_value > 0) {
?>
style="height:<?php
echo (int) erLhcoreClassModelChatConfig::fetch('mheight')->current_value;
?>
px"<?php
}
?>
id="messagesBlock"><?php
$lastMessageID = 0;
$lastOperatorChanged = false;
$lastOperatorId = false;
foreach (erLhcoreClassChat::getChatMessages($chat_id) as $msg) {
if ($lastOperatorId !== false && $lastOperatorId != $msg['user_id']) {
$lastOperatorChanged = true;
} else {
$lastOperatorChanged = false;
}
$lastOperatorId = $msg['user_id'];
?>
<?php
include erLhcoreClassDesign::designtpl('lhchat/lists/user_msg_row.tpl.php');
?>
<?php
$lastMessageID = $msg['id'];
}
示例2:
<a title="<?php
echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/chat', 'Show/Hide right column');
?>
" href="#" class="icon-right-circled collapse-right" onclick="lhinst.processCollapse('<?php
echo $chat->id;
?>
')"></a>
<div class="message-block pb10">
<div class="msgBlock msgBlock-admin" id="messagesBlock-<?php
echo $chat->id;
?>
">
<?php
$LastMessageID = 0;
$messages = erLhcoreClassChat::getChatMessages($chat->id);
?>
<?php
include erLhcoreClassDesign::designtpl('lhchat/syncadmin.tpl.php');
?>
<?php
if (isset($msg)) {
$LastMessageID = $msg['id'];
}
?>
<?php
if ($chat->user_status == 1) {
?>
<?php
include erLhcoreClassDesign::designtpl('lhchat/userleftchat.tpl.php');