Flashchat enhancement - Posted (2400 Views)
Junior Member
Zenfor
Posts: 372
372
It would be great if there was a way to show on the forum who is currently in a chat room.

Something like:

The following are currently in the chat room:

user1, user2, user3,

Is this possible?
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Advanced Member
Carefree
Posts: 4224
4224
To show who's in the chat room, here's what you need to do. The names are displayed with links to their profiles (using admin/moderator colors as appropriate). This only shows room 1. If you want to show people in other rooms, I can write that for you.

"inc_header.asp"
Code:

Find the original flashchat modification (appx 500):

if mLev > 0 and strDBNTUserName <> "" then
Session("ChatName")=strDBNTUserName
Session("MemberID")=MemberID
Response.Write " |" & vbNewline & _
" <a href=""flashchat/login_html.asp""><acronym title=""Chat with other users..."">Chat</acronym></a>" & vbNewline
end if

Replace those with these:

' ## FlashChat Below
If ((mLev > 0) AND (strDBNTUserName > "")) Then
vRoomNo = 1
vUserArray = Application("ChatUsers" & vRoomNo)
vUserCount = Application("UserCount" & vRoomNo)
Session("ChatName")=strDBNTUserName
Session("MemberID")=MemberID
Response.Write " |" & vbNewline & _
" <a href=""flashchat/login_html.asp""" & dWStatus("Flashchat") & " tabindex=""-1"" target=""_blank""><acronym title=""Flashchat"">Flashchat</acronym></a><br />Members in Chat: ("
For vUser = 0 To vUserCount - 1
fname=vUserArray(vUser)
strSql="SELECT MEMBER_ID, M_NAME FROM " & strMemberTablePrefix & "MEMBERS WHERE M_NAME='" & fname & "'"
Set rs=my_Conn.Execute(strSql)
If not rs.EOF Then
intMID=rs("MEMBER_ID")
rs.Close
End If
Set rs=Nothing
Response.Write ProfileLink(fname,intMID)
If vUser < vUserCount-1 Then Response.Write ", "
Next
Response.Write ")"
End If
' ## FlashChat Above


Look for the following line (appx 202):

mLev = cLng(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"),-1))

Below that, insert these:

' ## Flashchat Below
%>
<!-- #INCLUDE VIRTUAL="flashchat/inifiles.asp" -->
<%
' ## Flashchat Above
Posted
Average Member
Maxime
Posts: 521
521
He must miss the Carefree code because the link is not clickable, see picture.
Cordially,
Maxime

Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)
Posted
Junior Member
Zenfor
Posts: 372
372
I'm getting errors. ===============================

Microsoft VBScript compilation error '800a0410'

Invalid 'for' loop control variable

/forum/inc_header.asp, line 632

For vUser = 0 To vUserCount - 1

========================================

Active Server Pages error 'ASP 0126'

Include file not found

/forum/inc_header.asp, line 203

The include file 'flashchat/inifiles.asp' was not found.
Posted
Junior Member
Zenfor
Posts: 372
372
Originally posted by Maxime
He must miss the Carefree code because the link is not clickable, see picture.
I don't see that:
Posted
Advanced Member
Carefree
Posts: 4224
4224
Originally posted by Zenfor
I'm getting errors. ===============================

Microsoft VBScript compilation error '800a0410'

Invalid 'for' loop control variable

/forum/inc_header.asp, line 632

For vUser = 0 To vUserCount - 1

========================================

Active Server Pages error 'ASP 0126'

Include file not found

/forum/inc_header.asp, line 203

The include file 'flashchat/inifiles.asp' was not found.

The first error is caused by the second error. If you did not name your flashchat directory "flashchat" as a virtual directory beneath your forum, that's the cause. You will have to modify the link to point to the flashchat directory.
Posted
Advanced Member
Carefree
Posts: 4224
4224
Originally posted by Maxime
He must miss the Carefree code because the link is not clickable, see picture.
This is what it should look like (with the new kick function instructions):

Posted
Advanced Member
Carefree
Posts: 4224
4224
Originally posted by Zenfor I don't see that:

Post a link to your "inc_header.asp" in .txt format and I'll take a look.
Posted
Junior Member
Zenfor
Posts: 372
372
Originally posted by Carefree The first error is caused by the second error. If you did not name your flashchat directory "flashchat" as a virtual directory beneath your forum, that's the cause. You will have to modify the link to point to the flashchat directory.
I do have the flashchat directory under my forum directory:

Posted
Junior Member
Zenfor
Posts: 372
372
Originally posted by Zenfor I don't see that:

Post a link to your "inc_header.asp" in .txt format and I'll take a look. I replaced it with my last good version. I'll have to do it again. How do I make a directory a virtual directory?
Posted
Advanced Member
Carefree
Posts: 4224
4224
You don't have the changes incorporated into your "inc_header.asp" file. If you post a link to a .txt copy, I'll make them for you.
You Must enter a message