Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Chat program and Snitz
 New Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 3

MaGraham
Senior Member

USA
1297 Posts

Posted - 31 January 2013 :  07:26:35  Show Profile
I am using a different type database now and thought I'd give this another try, and it is working. YEA! Well, I haven't let my members play around with it yet but hopefully there won't be any problems. Although the members love the Ajax Chat features I currently have installed, it continues to freeze at times. And, at times, that's quite often. I feel certain that's a hosting issue causing the problem so I have no control over that! ;( Anyway, I am hoping this will work fine to replace the Ajax Chat.

I now have a question about this. I have looked at the style.css in the includes folder and that has nothing to do with the color of the chat window. So, how do I change to my forum colors and get rid of that lavender color?

Also, although the sound has a checkmark beside it on the chat window, there is no sound. How could I correct that? There must be another area to turn it on. Just checked; sound works fine in IE; it just doesn't work in Firefox.




"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley

Edited by - MaGraham on 31 January 2013 09:03:03
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 31 January 2013 :  08:20:57  Show Profile

Also, I want to place a chat button here and let the alt="Join Live Chat" instead of having the text there. Could someone help me with this line of code?

<font size="1"><a href="javascript:void(0)" onClick="window.open('http://www.YOUR-WEB-ADDRESS-HERE.com/forum/chat/chatroom.asp?txtUsername=<%=KCname%>','Chatwindow2','scrollbars=no,left=50,top=50,width=700,height=460')">Join Live Chat!</a> Who's in Chat?



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 31 January 2013 :  10:56:14  Show Profile

<font size="1"><a href="javascript:void(0)" onClick="window.open('http://www.YOUR-WEB-ADDRESS-HERE.com/forum/chat/chatroom.asp?txtUsername=<%=KCname%>','Chatwindow2','scrollbars=no,left=50,top=50,width=700,height=460')"><img src=<%=strImageURL%>"chat_button.png" alt="Join Live Chat" /></a></font>
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 01 February 2013 :  02:01:58  Show Profile


Okay, this seems cool. I found the settings in chatroom.asp to change almost everything I wanted to change. I also did more smiley emoticons to replace those wimpy ones.

We did some testing since my last post. It keeps booting members but then they were right back in immediately. Does anyone know how to prevent that though?

The sound went off for everyone, too. Is that typical with this?

Over all I am very pleased with the chat room for being such a simple program and Sooooo easy to install! I would like to correct the things I mentioned above though if anyone can help.

Thank you so much for sharing this, LeatherLips! I really appreciate it!!

Thank you as well for the code for that line, Carefree. I had to make a small adjustment but now it works perfect. Too cool! I love my chat button! :)

Oh, is there a means of getting a chat transcript? We have a couple of important chats planned and I would really love to be able to post a chat transcript later.

And, how does banning a member work?

Any help with these issues would be greatly appreciated.

"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 01 February 2013 :  19:53:20  Show Profile

Would anyone know of a fix to make this more compatible with Firefox and Chrome?


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 02 February 2013 :  01:53:42  Show Profile


In functions_users.aps of this chat, if the lines in red are what's causing members to get booted and then instantly right back in, could all of the lines in red be removed? And I know, I probably don't know what I'm talking about!


<%
Const ApplicationUsers = "ChatUsers"

Dim saryActiveUsers
Dim strUsername
Dim blnIsArray
Dim strAdminCommand

'Get the username
strUsername = Session("Username")


Function RemoveUnActive()
'Iterate through the array to remove old entires
For intArrayPass = 1 To UBound(saryActiveUsers, 2)
'Check the last checked date. If user wasnt updated 20 seconds ago then they must be gone
If CDate(saryActiveUsers(5, intArrayPass)) < CDate(CDbl(DateAdd("s", -5, Now()))) Then

'Post message that the user has left
Call PostMessage("", saryActiveUsers(1, intArrayPass) & " has left the room.", 1)

'Swap this array postion with the last in the array
saryActiveUsers(0, intArrayPass) = saryActiveUsers(0, UBound(saryActiveUsers, 2))
saryActiveUsers(1, intArrayPass) = saryActiveUsers(1, UBound(saryActiveUsers, 2))
saryActiveUsers(2, intArrayPass) = saryActiveUsers(2, UBound(saryActiveUsers, 2))
saryActiveUsers(3, intArrayPass) = saryActiveUsers(3, UBound(saryActiveUsers, 2))
saryActiveUsers(4, intArrayPass) = saryActiveUsers(4, UBound(saryActiveUsers, 2))
saryActiveUsers(5, intArrayPass) = saryActiveUsers(5, UBound(saryActiveUsers, 2))
saryActiveUsers(6, intArrayPass) = saryActiveUsers(6, UBound(saryActiveUsers, 2))

'Remove the last array position as it is no-longer needed
ReDim Preserve saryActiveUsers(6, UBound(saryActiveUsers, 2) - 1)

'Exit for loop to prevent errors
Exit For
End If
Next
End Function


Function getIP()
getIP = Request.ServerVariables("REMOTE_ADDR")
End Function

Function Reset()
Dim saryMessages
Dim saryActiveUsers

ReDim saryMessages(5, 0)
ReDim saryActiveUsers(6, 0)

Application.Lock
Application(ApplicationUsers) = saryActiveUsers
Application(ApplicationMsg) = saryMessages
Application.UnLock
End Function

Function LogOut()
Dim intArrayPass

Session.Abandon

saryActiveUsers(5, intArrayPos) = CDbl(DateAdd("s", -30, Now()))

Call RemoveUnActive()

'******************************************
'*** Update application level array ***
'******************************************
Application.Lock 'Lock the application
Application(ApplicationUsers) = saryActiveUsers 'Update the applicaiton
Application.UnLock 'Unlock the application
End Function

Function CheckUsername(strUsername)
CheckUsername = False

Dim intArrayPass
Dim saryActiveUsers

'Get the array
If IsArray(Application(ApplicationUsers)) Then
saryActiveUsers = Application(ApplicationUsers)
Else
ReDim saryActiveUsers(6, 0)
End If

For intArrayPass = 1 TO UBound(saryActiveUsers, 2)
If saryActiveUsers(1, intArrayPass) = strUsername AND saryActiveUsers(3, intArrayPass) <> getIP() Then
CheckUsername = True
Exit For
End If
Next

Application.UnLock
End Function
%>


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 03 February 2013 :  05:18:59  Show Profile

After a couple of days of using the Chatnow, my main concern is how to use the admin options like banning members, etc. I didn't see any instructions regarding that at all. Surely I could find out if printing a chat transcript was possible if I just understood how to access the admin options.

Well, I sure would like to know how to prevent the members from being booted out and then right back in. That happens so much it can make you dizzy when you're trying to read something! LOL At times, it is almost a continuous blinking of lines of text saying a member has left and the line of text saying he/she is back again appearing almost at the same time. . .and then over and over and over again. In trying to just be silly, I changed the line of text that says a member has left the chat room to say that "Member's name" and Elvis have left the building!" in hopes to at least make the members laugh! LOL



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 03 February 2013 :  12:38:46  Show Profile
quote:
Originally posted by MaGraham



In functions_users.aps of this chat, if the lines in red are what's causing members to get booted and then instantly right back in, could all of the lines in red be removed? And I know, I probably don't know what I'm talking about!


No, that will cause another error. What you could do is something like this:


<%
Const ApplicationUsers = "ChatUsers"

Dim saryActiveUsers
Dim strUsername
Dim blnIsArray
Dim strAdminCommand

'Get the username
strUsername = Session("Username")


Function RemoveUnActive()
	'	##	Do Nothing
End Function

Function getIP()
	getIP = Request.ServerVariables("REMOTE_ADDR")
End Function

Function Reset()
	Dim saryMessages
	Dim saryActiveUsers

	ReDim saryMessages(5, 0)
	ReDim saryActiveUsers(6, 0)

	Application.Lock
	Application(ApplicationUsers) = saryActiveUsers
	Application(ApplicationMsg) = saryMessages
	Application.UnLock
End Function

Function LogOut()
	Dim intArrayPass

	Session.Abandon

	saryActiveUsers(5, intArrayPos) = CDbl(DateAdd("s", -30, Now()))

	Call RemoveUnActive()

	'******************************************
	'***   Update application level array	***
	'******************************************
	Application.Lock			'Lock the application
	Application(ApplicationUsers) = saryActiveUsers	'Update the applicaiton
	Application.UnLock			'Unlock the application
End Function

Function CheckUsername(strUsername)
	CheckUsername = False

	Dim intArrayPass
	Dim saryActiveUsers

	'Get the array
	If IsArray(Application(ApplicationUsers)) Then
		saryActiveUsers = Application(ApplicationUsers)
	Else
		ReDim saryActiveUsers(6, 0)
	End If

	For intArrayPass = 1 TO UBound(saryActiveUsers, 2)
		If saryActiveUsers(1, intArrayPass) = strUsername AND saryActiveUsers(3, intArrayPass) <> getIP() Then
			CheckUsername = True
			Exit For
		End If
	Next

	Application.UnLock
End Function
%>
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 03 February 2013 :  16:11:37  Show Profile


OH WOW! This works GREAT, Carefree!

Thank you so much!

Incredible!


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 03 February 2013 :  16:22:47  Show Profile


Oh, I spoke too soon. . .or rather posted too soon.

It's still working but now it's not signing anyone out of chat. (lol)

In the area where it shows what members are in chat, it still lists all of us even though I have been signed out since my last post here and others logged out before I did.



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 03 February 2013 :  20:06:49  Show Profile
quote:
Originally posted by MaGraham



Oh, I spoke too soon. . .or rather posted too soon.

It's still working but now it's not signing anyone out of chat. (lol)

In the area where it shows what members are in chat, it still lists all of us even though I have been signed out since my last post here and others logged out before I did.






No problem - just increase the duration of inactivity instead.


Function RemoveUnActive()
'Iterate through the array to remove old entires
For intArrayPass = 1 To UBound(saryActiveUsers, 2)
'Check the last checked date. If user wasnt updated 20 seconds ago then they must be gone - this was actually set to 5 seconds....
If CDate(saryActiveUsers(5, intArrayPass)) < CDate(CDbl(DateAdd("n", -10, Now()))) Then

'Post message that the user has left
Call PostMessage("", saryActiveUsers(1, intArrayPass) & " has left the room.", 1)

'Swap this array postion with the last in the array
saryActiveUsers(0, intArrayPass) = saryActiveUsers(0, UBound(saryActiveUsers, 2))
saryActiveUsers(1, intArrayPass) = saryActiveUsers(1, UBound(saryActiveUsers, 2))
saryActiveUsers(2, intArrayPass) = saryActiveUsers(2, UBound(saryActiveUsers, 2))
saryActiveUsers(3, intArrayPass) = saryActiveUsers(3, UBound(saryActiveUsers, 2))
saryActiveUsers(4, intArrayPass) = saryActiveUsers(4, UBound(saryActiveUsers, 2))
saryActiveUsers(5, intArrayPass) = saryActiveUsers(5, UBound(saryActiveUsers, 2))
saryActiveUsers(6, intArrayPass) = saryActiveUsers(6, UBound(saryActiveUsers, 2))

'Remove the last array position as it is no-longer needed
ReDim Preserve saryActiveUsers(6, UBound(saryActiveUsers, 2) - 1)

'Exit for loop to prevent errors
Exit For
End If
Next
End Function
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 03 February 2013 :  20:52:08  Show Profile
quote:
Originally posted by Carefree

No problem - just increase the duration of inactivity instead.

Function RemoveUnActive()
'Iterate through the array to remove old entires
For intArrayPass = 1 To UBound(saryActiveUsers, 2)
'Check the last checked date. If user wasnt updated 20 seconds ago then they must be gone
If CDate(saryActiveUsers(5, intArrayPass)) < CDate(CDbl(DateAdd("n", -10, Now()))) Then



Carefree, I actually had that number set to 90000 seconds at one time and nothing changed.

Can you look at this below? The chat room boots the last person out {the person who logged in last} and then they are right back in again and again, etc. Is that what the line in red is telling it to do?



quote:
Originally posted by Carefree

'Post message that the user has left
Call PostMessage("", saryActiveUsers(1, intArrayPass) & " has left the room.", 1)

'Swap this array postion with the last in the array
saryActiveUsers(0, intArrayPass) = saryActiveUsers(0, UBound(saryActiveUsers, 2))
saryActiveUsers(1, intArrayPass) = saryActiveUsers(1, UBound(saryActiveUsers, 2))
saryActiveUsers(2, intArrayPass) = saryActiveUsers(2, UBound(saryActiveUsers, 2))
saryActiveUsers(3, intArrayPass) = saryActiveUsers(3, UBound(saryActiveUsers, 2))
saryActiveUsers(4, intArrayPass) = saryActiveUsers(4, UBound(saryActiveUsers, 2))
saryActiveUsers(5, intArrayPass) = saryActiveUsers(5, UBound(saryActiveUsers, 2))
saryActiveUsers(6, intArrayPass) = saryActiveUsers(6, UBound(saryActiveUsers, 2))

'Remove the last array position as it is no-longer needed
ReDim Preserve saryActiveUsers(6, UBound(saryActiveUsers, 2) - 1)

'Exit for loop to prevent errors
Exit For
End If
Next
End Function



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley

Edited by - MaGraham on 03 February 2013 21:02:31
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 03 February 2013 :  23:50:17  Show Profile
quote:

'Check the last checked date. If user wasnt updated 20 seconds ago then they must be gone
If CDate(saryActiveUsers(5, intArrayPass)) < CDate(CDbl(DateAdd("n", -10, Now()))) Then[/black]


Carefree, I actually had that number set to 90000 seconds at one time and nothing changed.

The bit in red isn't what is important, it's the bit in the dateadd comparison. I set it to 10 minutes idle time before they get booted. Have you tried my change?

quote:
Can you look at this below? The chat room boots the last person out {the person who logged in last} and then they are right back in again and again, etc. Is that what the line in red is telling it to do?[/size=3]



No, that bit takes the data from the array and then resets the array to a smaller size since someone has been booted.
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 04 February 2013 :  00:19:40  Show Profile

I was waiting for your reply.

I will try your latest change now.

I'll post back and let you know the results.

Thank you so much for your time on this, Carefree!

I greatly appreciate you!

"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07