only show users that have been added

Last post 09-08-2010, 4:14 PM by soyemil. 4 replies.
Sort Posts: Previous Next
  •  08-30-2010, 10:48 AM 63728

    only show users that have been added

    I am dealing with over 1000 users and to load them all into the messenger causes it to crash.  Is there a way I can limit the number of users shown in the messenger to only show friends that have been manually added to the list instead of everyone?
  •  08-30-2010, 9:26 PM 63741 in reply to 63728

    Re: only show users that have been added

    Hi soyemil.
     
    Do you integrate CuteChatAndMessenger with DotNetNuke or Community Server? If so, please tell me which one you are using, I will show you how to achieve it. Please send the information to Kenneth@CuteSoft.net
     
    Regards,
     
    ken
  •  09-07-2010, 12:41 PM 63869 in reply to 63741

    Re: only show users that have been added

    DNN Professional Edition 5.5.0
  •  09-07-2010, 8:22 PM 63873 in reply to 63869

    Re: only show users that have been added

    Hi soyemil,
     
    1. Open file "App_Code\DNNChatProvider.vb"
     
    2. Find section below and delete it
     
    1. Public Class MyDataManager   
    2.   
    3.      Inherits CuteChat.AppDataManager   
    4.   
    5.      Public Sub New(ByVal portal As CuteChat.AppPortal)   
    6.   
    7.          MyBase.New(portal)   
    8.   
    9.      End Sub  
    10.   
    11.      Public Overrides Sub AddContact(ByVal identity As CuteChat.ChatIdentity, ByVal userid As String)   
    12.   
    13.      End Sub  
    14.   
    15.      Public Overrides Sub RemoveContact(ByVal identity As CuteChat.ChatIdentity, ByVal userid As String)   
    16.   
    17.      End Sub  
    18.   
    19.      Public Overrides Function GetContacts(ByVal identity As CuteChat.ChatIdentity) As CuteChat.IChatUserInfo()   
    20.   
    21.          Dim portalid As Integer = 0   
    22.   
    23.          Dim list As ArrayList = DotNetNuke.Entities.Users.UserController.GetUsers(portalid)   
    24.   
    25.          Dim res As New ArrayList   
    26.   
    27.          Dim provider As CuteChat.ChatProvider = CuteChat.ChatProvider.Instance   
    28.   
    29.          Dim myname As String = provider.FromUserId(identity.UniqueId)   
    30.   
    31.          For Each info As DotNetNuke.Entities.Users.UserInfo In list   
    32.   
    33.     If Not String.Equals(info.Username, myname, StringComparison.OrdinalIgnoreCase) Then  
    34.   
    35.         res.Add(Me.GetUserInfo(provider.ToUserId(info.Username)))   
    36.   
    37.     End If  
    38.   
    39.          Next  
    40.   
    41.          Return res.ToArray(GetType(CuteChat.IChatUserInfo))   
    42.   
    43.      End Function  
    44.   
    45.  End Class  
    46.   
    47.   
    48.   
    49.  Public Overrides Function CreateDataManagerInstance(ByVal portal As CuteChat.AppPortal) As CuteChat.AppDataManager   
    50.   
    51.      Return New MyDataManager(portal)   
    52.   
    53.  End Function  

    Regards,
     
    ken
  •  09-08-2010, 4:14 PM 63899 in reply to 63873

    Re: only show users that have been added

    worked like a charm.  Thank you very much.
View as RSS news feed in XML