Integrating cutechat and messenger with our own communication Portal

Last post 02-03-2009, 10:31 PM by cutechat. 3 replies.
Sort Posts: Previous Next
  •  01-29-2009, 12:14 PM 48201

    Integrating cutechat and messenger with our own communication Portal

    Hi
     
      We are developing a communication portal which contains a registration, internal mail system so and so .And we are using the cutechat and messenger also . So i integrated this chat with my website and now as we are having an internal mail system we have an addressbook and we have given a functionality in addressbook to add the users into contacts .So i need these users who have been added into the contacts to be populated within the cute messenger contacts and need to show who is online/offline. Is this possible?
    Or is it possible to add a new entry in cuitechat4_user table having the buildin contacts which shows the entry as
    "arr,S-2=12=User:shalini;,11=User:george;" can i add data into this table but what is the format of this?
     
    Thanks in advanve 
    Please help!!!!
     
    With regards
    MIdhun Sunny
  •  01-30-2009, 5:46 PM 48243 in reply to 48201

    Re: Integrating cutechat and messenger with our own communication Portal

    Did you find a way to do this?  We are trying to do exactly the same thing but have not found a solution.
     
    We just want to pre-populate everyone's contact list with every other login and remove the ability for users to add contacts.
     
    Any help on this or if anyone has done this would be really appreciated. Thx
  •  02-03-2009, 10:47 AM 48299 in reply to 48201

    Re: Integrating cutechat and messenger with our own communication Portal

    MIdhun,
     
     
    And check the integration code of this project.
     
    It shows you how to add contact and how to remove contact.
     
                public override void AddContact(ChatIdentity identity, string userid)
                {
                    lock (this.Portal)
                    {
                        ChatProvider provider = ChatProvider.GetInstance(this.Portal);
                        string username = provider.FromUserId(identity.UniqueId);
                        CommunityServer.Components.User user = CommunityServer.Users.GetUser(0, username, false, true);
                        if (user == null) return;
                        string targetname = provider.FromUserId(userid);
                        CommunityServer.Components.User target = CommunityServer.Users.GetUser(0, targetname, false, true);
                        if (target == null) return;
                        CommunityServer.Components.Friendships.InsertFriendship(user.UserID, target.UserID, "added by messenger", CommunityServer.Components.FriendshipState.Approved);
                        this.OnContactAdded(identity, userid);
                    }
                }
                public override void RemoveContact(ChatIdentity identity, string userid)
                {
                    lock (this.Portal)
                    {
                        ChatProvider provider = ChatProvider.GetInstance(this.Portal);
                        string username = provider.FromUserId(identity.UniqueId);
                        CommunityServer.Components.User user = CommunityServer.Users.GetUser(0, username, false, true);
                        if (user == null) return;
                        string targetname = provider.FromUserId(userid);
                        CommunityServer.Components.User target = CommunityServer.Users.GetUser(0, targetname, false, true);
                        if (target == null) return;
                        CommunityServer.Components.Friendship friend=CommunityServer.Components.Friendships.GetFriendship(user.UserID, target.UserID, false);
                        if (friend == null) return;
                        CommunityServer.Components.Friendships.DeleteFriendship(friend);
                        this.OnContactRemoved(identity, userid);
                    }
                }

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  02-03-2009, 10:31 PM 48339 in reply to 48299

    Re: Integrating cutechat and messenger with our own communication Portal

    Hi,
     
    Here is the code example:
     
    You need override the public override AppDataManager CreateDataManagerInstance(AppPortal portal)
    and implement these methods:
    public override IChatUserInfo[] GetContacts(ChatIdentity identity)
    public override void AddContact(ChatIdentity identity, string userid)
    public override void RemoveContact(ChatIdentity identity, string userid)
     
     
     
    Regards,
    Terry
View as RSS news feed in XML