User Interface Class for Chat Message Notification in Main Menu.  
 More...
Detailed Description
User Interface Class for Chat Message Notification in Main Menu. 
- Author
- Jan Posselt jposs.nosp@m.elt@.nosp@m.datab.nosp@m.ay.d.nosp@m.e 
- Version
- $Id$ 
Definition at line 31 of file class.ilChatMessageNotifyGUI.php.
Constructor & Destructor Documentation
      
        
          | ilChatMessageNotifyGUI::__construct | ( |  | ) |  | 
      
 
 
Member Function Documentation
      
        
          | ilChatMessageNotifyGUI::getHTML | ( |  | ) |  | 
      
 
Definition at line 46 of file class.ilChatMessageNotifyGUI.php.
References $_SESSION, $ilSetting, $tpl, ilChatServerCommunicator\_getTailMessages(), and ilChatServerCommunicator\_lookupUser().
        {
                global $ilUser, $ilObjDataCache, $ilAccess, 
$ilSetting, $rbacsystem;
                
                include_once 'Modules/Chat/classes/class.ilChatServerCommunicator.php';
                
                $last_message_info = false;
        
                if ($chatinfo !== false)
                {
                        if ($last_msg_info == false)
                        {
                                return "";
                        }
                        else if (
$_SESSION[
"il_notify_last_msg_checksum"] == $last_msg_info->entryId )
 
                        {
                                return "";
                        }
                }
                else
                {
                        return "";
                }
                $last_msg = $last_msg_info->message;
                $_SESSION[
"il_notify_last_msg_checksum"] = $last_msg_info->entryId;
 
                
                $this->tpl->addJavascript('./Modules/Chat/js/ChatMessagesMainMenu.js');
                $tpl = 
new ilTemplate(
'tpl.chat_messages_navigation.html', 
true, 
true,
'Modules/Chat');                          
 
                if((int)$ilSetting->get('chat_sound_status') && (int)$ilUser->getPref('chat_new_message_sound_status'))
                {
                        $tpl->setCurrentBlock(
'beep');
 
                        $tpl->setVariable(
'BEEP_SRC', 
'./Modules/Chat/sounds/receive.mp3');
 
                        $tpl->parseCurrentBlock();
 
                }
                include_once 'Modules/Chat/classes/class.ilChatServerCommunicator.php';
                $tpl->setVariable(
"CHAT_RECENT_POSTINGS", $this->lng->txt(
"chat_recent_postings"));
 
                $tpl->setCurrentBlock(
'msg_item');
 
                $tpl->setVariable(
"TXT_MSG", $last_msg);
 
                $tpl->setVariable(
"TXT_ROOM", $chatinfo->chatTitle);
 
                $tpl->parseCurrentBlock();
 
        }
 
 
Field Documentation
  
  | 
        
          | ilChatMessageNotifyGUI::$lng |  | private | 
 
 
  
  | 
        
          | ilChatMessageNotifyGUI::$tpl |  | private | 
 
 
The documentation for this class was generated from the following file: