send message personalization

Last post 09-29-2009, 5:37 PM by lovelydoo. 0 replies.
Sort Posts: Previous Next
  •  09-29-2009, 5:37 PM 55950

    send message personalization

    hello world

    with the help of Terry (support cutesoft) I have implemented changes (customizations) on the messenger, including:

    intercept the event send message to control a user who is sending the message. If the user is enabled, the message is sent successfully.

    if the user is not enabled, a msgbox pops up alerting the user that can not send message if no first activated a certain thing ..

    So far, so OK, msgbox pops up.

    my problem is that after the user is OK on the msgbox. you must close all conversation windows that may occur, you must close the chat, and you must display a web page within the site. (page chosen by me.)

    As you can see from the example I miss just to finish everything but I need urgent help.
     

    Public Overloads Overrides Function PreProcessCTSMessage(ByVal conn As CuteChat.ChatConnection, ByVal msgid As String, ByVal args As String(), ByVal nvc As System.Collections.Specialized.NameValueCollection) As Boolean

            'TODO:detect the user property here:

            Dim x As New utente

            Dim identity As CuteChat.ChatIdentity = CuteChat.ChatWebUtility.GetLogonIdentity()

            Dim iduser As Integer = x.get_iduser(identity.DisplayName)

            If x.pending_sms(iduser) = True Then

                If msgid = CuteChat.ChatMetaData.ClientMsg_USER_MESSAGE Then

                    Me.Manager.PushSTCMessage(conn, CuteChat.ChatMetaData.ServerMsg_SYS_ALERT_MESSAGE, Nothing, "ciao per poter continuare a usare la chat, devi avere attivato il tuo account. clicca  OK, per l'attivazione gratuita")

     

    **** after press “ok” ****

     

    **** close chat ****

     

    **** response redirect (URL) ***

     

     

     

                    Return True

                End If

            End If

            Return MyBase.PreProcessCTSMessage(conn, msgid, args, nvc)

    End Function

View as RSS news feed in XML