Re: Cute Messenger Online Status and new message notification

  •  12-20-2010, 8:33 PM

    Re: Cute Messenger Online Status and new message notification

    Hi liquidiq,
     
    1. The code below shows you how to get all online users of CuteMessenger
     
    1. protected override void OnLoad(EventArgs e)  
    2.  {  
    3.      CuteChat.ChatPortal portal = CuteChat.AppSystem.Instance.GetCurrentPortal();  
    4.      lock (portal)  
    5.      {  
    6.          if (portal.IsMessengerStarted)  
    7.          {  
    8.   
    9.              CuteChat.ChatPlaceUser[] users = portal.Messenger.GetAllUsers();  
    10.              foreach (CuteChat.ChatPlaceUser user in users)  
    11.              {  
    12.                  if (user != null)  
    13.                  {   
    14.                  //user is online  
    15.                  //user.DisplayName  
    16.                  }  
    17.   
    18.              }  
    19.   
    20.          }  
    21.      }  
    22.   
    23.      base.OnLoad(e);  
    24.  } 
     2. Add the code below into the page, and than the user status will appear as online after the user login the site(do not need to open CuteMessenger). If he get some messages, he will get a pop up window.
     
    Note: It will work only the page contains the code below, so I suggest you add it into the master page.
     
        <script src="CuteSoft_Client/CuteChat/IntegrationUtility.js.aspx?Chat_StartPartialMessenger=1"></script>
     
    regards,
     
    ken
View Complete Thread