I never thought to put it at the top of every page using forum_topic.asp, Nice work
Please show the code placement in forum_topic.asp that you sucessfully added so others can see where you put it.
Just show a few lines above and below so people can see where to put it
MORE:
Also maybe you could dress it up with this code to change. This is the replacement inside Maddog's MOD.
BACKUP YOUR FILE FIRST BEFORE ATTEMPTING CHANGES
--------------------------------------------------------%>--------------------------------------------
<%
If lngLoggedInUserID <> 0 AND lngLoggedInUserID <> 2 Then 'Hides this from anyone not logged in
'##########################################################################################
'##########################################################################################
'######################### START MADDOG MOD HERE ##########################################
'###################### Edited by JCKRUGER 04/07/2006 #####################################
'##########################################################################################
'Copyright 2005 - Drew Gauderman -
http://www.iportalx.net -
http://www.aspinvision.comDim saryActiveChatUsers
Dim blnAdminInChat
CONST ApplicationUsers = "ChatUsers"
Const strDefaultChatroom = "General Chit Chat"
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 Chat "
%>
<table cellspacing="1" cellpadding="3" class="tableBorder" align="center">
<tr class="tableLedger">
<td colspan="2"><%=strChatTableHeading%> - [<%=UBound(saryActiveChatUsers, 2)%>]</td>
</tr>
<tr class="tableRow">
<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(vbCrLf & " [ <a href=""#"" onclick=""javascript:window.open('chat/chatroom.asp?txtUsername=" & strLoggedInUsername & "&Room=" & strDefaultChatroom & "','ChatRoom','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=590,height=500')"">Launch Chat</a> ]")
Response.Write(vbCrLf & " </td>")
Response.Write(vbCrLf & " </tr>")
End If 'Additional End IF for above "If lngLoggedInUserID <> 0 AND lngLoggedInUserID <> 2 Then" Statement
'Copyright 2005 - Drew Gauderman -
http://www.iportalx.net -
http://www.aspinvision.com'##########################################################################################
'##########################################################################################
'########################### END MADDOG MOD HERE ##########################################
'####################### Edited by JCKRUGER 04/07/2006 ####################################
'##########################################################################################
%>
--------------------------------------------------------%>--------------------------------------------
Hopefully it works also in forum_topic.asp
Cheers
Justin
Edited by jckruger - 04 July 2006 at 12:24am