* @website Link: https://github.com/lianglee/OhYesChat * @Package Ohyes * @subpackage Chat * @author Liang Lee * @copyright All right reserved Liang Lee 2014. * @ide The Code is Generated by Liang Lee php IDE. */ /** * User data * @note: Don't change anything if you don't know what you are doing; * * @return {Object} */ <?php $owner = elgg_get_logged_in_user_entity(); $online = OhYesChat::countOnline($owner); $total_notifications = OhYesChat::countNew(); $new_all = OhYesChat::getNewAll(array('sender')); $active_chat = $_SESSION['ohyes_chat']; foreach ($active_chat as $friend) { $message = OhYesChat::getNew($friend); $icon = elgg_view("icon/default", array('entity' => get_user($friend), 'size' => 'small')); if (OhYesChat::userStatus($friend) == 'online') { $status = 'OhYesChat-Icon-Onine'; } else { $status = 'OhYesChat-Icon-Offline'; } $construct_active[$friend] = array('status' => $status); foreach ($message as $text) { if ($message->view == 0) { $new_messages[] = array('fid' => $friend, 'message' => elgg_view('ohyes/chat/message-item', array('icon' => $icon, 'message' => $text->message)), 'total' => count($message));
<?php /** * OhYesChat * @website Link: https://informatikon.com * @package Informatikon.Elgg * @subpackage Chat * @author $arsalanshah.informatikon * @copyright All right reserved Informatikon Technologies 2014. * @ide The Code is Generated by Liang Lee php IDE. */ $online_users = '<span id="ohyes-chat-count">' . OhYesChat::countOnline(elgg_get_logged_in_user_entity()) . '</span>'; ?> <div class="OhYesChat"> <div class="ChatNotification"> <div class="inner" onClick="OhYesChat.NotifShow(this);"> <div class="OhYesChat-Icon-Notification"></div> <div class="text" id="chat-count-message"></div> </div> <div class="notification-window" style="display:none;"> <div class="OhYesChat-Titles"> <div class="OhYesChat-Inline-Table text"><?php echo elgg_echo('ohyes:chat:notification'); ?> </div> <div class="OhYesChat-Inline-Table options"> <div class="item" onClick="OhYesChat.NotifHide(this, 1);"> X </div></div> </div> <div class="data"> <?php echo elgg_view('ohyes/chat/messages', array('entity' => elgg_get_logged_in_user_entity())); ?>