D
dmitcha
Hi, I just added Steve Orr's incredible WebChat control to my page (ASP.NET
2.0), but I'm not advanced enough to correctly add the additional code for
filters and identifying the user (I used CreateUserWizard for secure log-in).
1) TEXT FILTER. What is the correct syntax for the Chatter event to filter
words? Here is the sample code Steve kindly supplied in his article:
Protected Sub WebChat1_Chatter(ByRef ChatText As String) _
Handles WebChat1.Chatter
'You can replace bad words...
ChatText = ChatText.Replace("hell", "h***")
'...or spruce things up with emoticons
ChatText = ChatText.Replace("
", _
"<img src='smiley.jpg' title='
' />")
End Sub
I have placed this in the Script section at the top. I, unfortunately, do
not know how to create a syntactically correct single list with many replace
requests, and my compiler keeps kicking up the "Handle..." line as a syntax
error.
2) LIVE COMMENT SUPERVISION. Is there a way to supervise content live to
prevent certain posts from ever posting and to even block users)?
3) USER ID. Where does the provided code snippet go for the UserName
property?
Here is Steve's starter snippet, but it doesn't seem to work inside of the
CC1 code, and if I try to add it as a Protected Sub in the Script, the
compiler says I need a declaration.
4) CHAT ROOM ACCESS TOGGLE. Is there code to allow the Webmaster to open
and close the Chat Room for use?
Thank you very much in advance for any assistance! So sorry for the
incredibly green questions. dma
2.0), but I'm not advanced enough to correctly add the additional code for
filters and identifying the user (I used CreateUserWizard for secure log-in).
1) TEXT FILTER. What is the correct syntax for the Chatter event to filter
words? Here is the sample code Steve kindly supplied in his article:
Protected Sub WebChat1_Chatter(ByRef ChatText As String) _
Handles WebChat1.Chatter
'You can replace bad words...
ChatText = ChatText.Replace("hell", "h***")
'...or spruce things up with emoticons
ChatText = ChatText.Replace("
"<img src='smiley.jpg' title='
End Sub
I have placed this in the Script section at the top. I, unfortunately, do
not know how to create a syntactically correct single list with many replace
requests, and my compiler keeps kicking up the "Handle..." line as a syntax
error.
2) LIVE COMMENT SUPERVISION. Is there a way to supervise content live to
prevent certain posts from ever posting and to even block users)?
3) USER ID. Where does the provided code snippet go for the UserName
property?
Here is Steve's starter snippet, but it doesn't seem to work inside of the
CC1 code, and if I try to add it as a Protected Sub in the Script, the
compiler says I need a declaration.
4) CHAT ROOM ACCESS TOGGLE. Is there code to allow the Webmaster to open
and close the Chat Room for use?
Thank you very much in advance for any assistance! So sorry for the
incredibly green questions. dma