cutechat integration horror

Last post 01-19-2005, 1:53 PM by janus. 4 replies.
Sort Posts: Previous Next
  •  01-13-2005, 10:59 AM 3482

    cutechat integration horror

    Hi,
    we try to integrate cutechat to our existing plattform...
    we bought cutechat so there should be some better support than just those standard-answers in the forums and that laughable helpfile included in the package

    We respect your work and its a fact that cutechat is the best chatsoftware for us BUT we have hard problems to bypass the login

    we wrote a new dataprovider which fits for us, and made some workarounds like skipping the registration and so on
    for now we get into the chat but a popup says "Account Information not found" its also not posible to send messages and there are no online users visible

    Could you tell us whats wrong?
    Is there any other authorization methode?
    Does cutechat try to validate the users with the cutechatsample database?

    We would be very grateful for any hints from your side. Of course we read all the forum threads but nothing seems to help...
    It is very important for us that the chat is integrated into our plattform within a few days
    We would appreciate any help from your side especially because we paid a lot of money for it.
    Sincerely, janus@co
  •  01-13-2005, 1:29 PM 3492 in reply to 3482

    Re: cutechat integration horror

     
    We are working on the version 2.0. We will have bettter document in this new version.
     
    We respect your work and its a fact that cutechat is the best chatsoftware for us >> thanks for the nice comments.

    >>we have hard problems to bypass the login

    Please check this thread:

    How can I hook CuteChat with my existing login system?

    http://cutesoft.net/forums/ShowPost.aspx?PostID=1814

    Does cutechat try to validate the users with the cutechatsample database?

    A: No.

    we wrote a new dataprovider which fits for us, and made some workarounds like skipping the registration and so on
    for now we get into the chat but a popup says "Account Information not found" its also not posible to send messages and there are no online users visible

    Please post your provider code here.

    Maybe we can find the problem for you.

    Otherwise we have no clue at all.



     

    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

  •  01-14-2005, 9:54 AM 3501 in reply to 3492

    Re: cutechat integration horror

    Adam,

    thx for your answer...

    the dataproviders coming with cutechat are not useable for us because our portal is not basing on those, we coded an own in c#

    we ere using internal only numbers/ids to verify users, could this make problems?
    Here is the code for our Dataprovider:

     

    using

    CuteChat;

     

    namespace

    SediSys.Portal.Community.WebPL.Chat {

    using System;

    using System.Collections;

    using System.Data;

    using System.Data.SqlClient;

    using SediSys.Portal.Main.BF;

     

    publicclass SediSysSqlDataProvider : CuteChat.SqlServer.SqlDataProvider {

    public SediSysSqlDataProvider(string connstr):base(connstr) {

    }

    publicoverride CuteChat.UserInfoData GetUserInfo(string useruniquename) {

    // 234_hansi

     

    String[] arr = useruniquename.Split('_');

    int id = Convert.ToInt32( arr[0] );

    DataSet ds =

    new User().GetUserByID( id );

    if ( ds.Tables[0].Rows.Count == 0 ) {

    thrownew Exception("ERROR: Couldn't find user with id: " + id );

    }

    DataRow row = ds.Tables[0].Rows[0];

    string username = row["UserName"].ToString();

    int globGroupID = Convert.ToInt32( row["GlobalGroupID"] );

    bool admin = false;

    if ( globGroupID == 1 ) {

    admin =

    true;

    }

    returnnew CuteChat.UserInfoData(useruniquename,username,admin );

    }

    publicoverridestring[] ListUserUniqueName() {

    ArrayList al=

    new ArrayList();

    DataSet ds =

    new User().GetAllUsers();

    //DataRow row = ds.Tables[0].Rows[0];

     

    foreach (DataRow row in ds.Tables[0].Rows) {

    string ids = Convert.ToString( row["ID"] );

    string usern = Convert.ToString( row["UserName"] );

    al.Add( usern + "_" + ids);

    }

    return (string[])al.ToArray(typeof(string));

    }

    publicoverridebool IsUserNickNameExists(string nickname) {

    // FIXME: implement once we know how they handle this

     

    returnfalse;

    }

    }

    }

     
    thx for trying...

  •  01-14-2005, 10:09 AM 3502 in reply to 3501

    Re: cutechat integration horror

    janus,

    Did you miss the following step?




    Create a class which implements the IUserIdentityAdapter interface and name it SqlServerUserIdentityAdapter.

    public class SqlServerUserIdentityAdapter : IUserIdentityAdapter 
    {
    }
    To provide a complete implementation, we will need to provide overrides for the two methos of the SqlServerUserIdentityAdapter class as followings:

    1. The implementation of the GetCurrentUserUniqueName method

    Description:
    Retrieves the user name of the current user.

    public string GetCurrentUserUniqueName(HttpContext context) { 
        IIdentity iden=context.User.Identity; 
        if(iden==null||!iden.IsAuthenticated) 
           return null; 
        if(iden.Name==null||iden.Name.Length==0) 
           return null; 
        return iden.Name; 
    }

    The implementation of the IsAdministrators method

    Description:
    Check the current user is an administrator or not..

    public bool IsAdministrators(string useruniquename) { 
        using(IDataAccess da=ChatConfig.CreateDataAccess()) { 
           int userid=da.GetUserInternalId(useruniquename); 
           if(userid==0)
               return false; 
           DataRow row=da.SelectUser(userid); 
           if(row==null)
               return false; 
           return Convert.ToBoolean(row["isadmin"]); 
        } 
    }




    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

  •  01-19-2005, 1:53 PM 3580 in reply to 3502

    Re: cutechat integration horror

    Adam,
    thx for this, you were right, that adapter was missing
    for now i try to implement it with a static return, i think this works but when i try to enter a room a popup says "Input string was not in a correct format"
    i return a string called "globaladmin", first i thought "globaladmin_2" doesnt work cause the number but we need numbers after the loginname for uniquenames...
    but it doesn't even work without numbers...
    maybe you have a hint for this too
    thx for trying to help
     
    additional question: you mentioned earlier that you are working on version2, we bought cutechat, will there be any upgrade available or would we have to buy the second version for the full price? when will there be a release?
    janus
View as RSS news feed in XML