This is what I have quickly come up with in editing maddog's default.asp MOD code to show the chat statistics down in the forum statistics.
-------------------------------------------------------------------------------%>-------------------------------
<%
'##########################################################################################
'##########################################################################################
'######################### START MADDOG MOD HERE ##########################################
'##########################################################################################
'##########################################################################################
'Copyright 2005 - Drew Gauderman -
http://www.iportalx.net -
http://www.aspinvision.comDim saryActiveChatUsers
Dim blnAdminInChat
CONST ApplicationUsers = "ChatUsers"
Const strDefaultChatroom = "Arf_Discussion"
blnAdminInChat = False
'Get the array
If IsArray(Application(ApplicationUsers)) Then
saryActiveChatUsers = Application(ApplicationUsers)
Else
ReDim saryActiveChatUsers(9, 0)
End If
'Remove inactive users first
If UBound(saryActiveChatUsers, 2) <> 0 Then
Application.Lock
'Iterate through the array to remove old entires
For intArrayPass = 1 To UBound(saryActiveChatUsers, 2)
'Check the last checked date. If user wasnt updated 15 seconds ago then they must be gone
If CDate(saryActiveChatUsers(3, intArrayPass)) < CDate(CDbl(DateAdd("s", -60, Now()))) Then
'Swap this array postion with the last in the array
saryActiveChatUsers(0, intArrayPass) = saryActiveChatUsers(0, UBound(saryActiveChatUsers, 2))
saryActiveChatUsers(1, intArrayPass) = saryActiveChatUsers(1, UBound(saryActiveChatUsers, 2))
saryActiveChatUsers(2, intArrayPass) = saryActiveChatUsers(2, UBound(saryActiveChatUsers, 2))
saryActiveChatUsers(3, intArrayPass) = saryActiveChatUsers(3, UBound(saryActiveChatUsers, 2))
saryActiveChatUsers(4, intArrayPass) = saryActiveChatUsers(4, UBound(saryActiveChatUsers, 2))
saryActiveChatUsers(5, intArrayPass) = saryActiveChatUsers(5, UBound(saryActiveChatUsers, 2))
saryActiveChatUsers(6, intArrayPass) = saryActiveChatUsers(6, UBound(saryActiveChatUsers, 2))
saryActiveChatUsers(7, intArrayPass) = saryActiveChatUsers(7, UBound(saryActiveChatUsers, 2))
saryActiveChatUsers(8, intArrayPass) = saryActiveChatUsers(8, UBound(saryActiveChatUsers, 2))
saryActiveChatUsers(9, intArrayPass) = saryActiveChatUsers(9, UBound(saryActiveChatUsers, 2))
'Remove the last array position as it is no-longer needed
ReDim Preserve saryActiveChatUsers(9, UBound(saryActiveChatUsers, 2) - 1)
'Exit for loop to prevent errors
Exit For
End If
Next
Application(ApplicationUsers) = saryActiveChatUsers
Application.UnLock
End If
const strChatTableHeading = "Currently in Instant Chat "
%>
<tr class="tableSubLedger">
<td colspan="2"><%=strChatTableHeading%> - [<%=UBound(saryActiveChatUsers, 2)%>]</td>
</tr>
<tr class="tableRow">
<td width="4%" align="center"><img src="<% = strImagePath%>chat1.gif" alt="Users in Chatroom" border="0"
/></td>
<td width="96%">
<br />
<%
If UBound(saryActiveChatUsers, 2) = 0 Then
Response.Write(vbCrLf & "No one is currently in the chatroom.")
Else
For intArrayPass = 1 To UBound(saryActiveChatUsers, 2)
If saryActiveChatUsers(0, intArrayPass) = True Then blnAdminInChat = True
Response.Write(vbCrLf & saryActiveChatUsers(1, intArrayPass))
If NOT UBound(saryActiveChatUsers, 2) = intArrayPass Then Response.Write(", ")
Next
End If
Response.Write(vbCrLf & " <br><br>")
Response.Write (" <a href=""chat/chatroom.asp?txtUsername=" & strLoggedInUsername &
"&Room=" & strDefaultChatroom & """ target=""_blank""><align=""absmiddle"" border=""0"" alt=""Launch Chat"" />[Launch]</a>")
-------------------------------------------------------------------------------%>-------------------------------
This adds the details below active users in the forum statistics.
It currently works in my development v8.03 forum.