Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Chat Room
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Chat Room

 Post Reply Post Reply Page  <1234 12>
Author
k6irk View Drop Down
Newbie
Newbie


Joined: 26 September 2003
Location: United States
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote k6irk Quote  Post ReplyReply Direct Link To This Post Posted: 28 June 2006 at 4:39pm
It is working now, for some reason I thought I had the room on it, but didn't.
 
Rechecked the code and added, now it works in 8.03
 
Thanks again.
 
Rob
Back to Top
k6irk View Drop Down
Newbie
Newbie


Joined: 26 September 2003
Location: United States
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote k6irk Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2006 at 7:58pm
Now that the chatroom works like a champ, how can we put something at the bottom of the page to launch the chat room and/or see who might be in it?
 
I have the icon on the top to launch the room, but nothing to see if someone was already in it or not.
 
Rob
Back to Top
k6irk View Drop Down
Newbie
Newbie


Joined: 26 September 2003
Location: United States
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote k6irk Quote  Post ReplyReply Direct Link To This Post Posted: 30 June 2006 at 4:23pm
Thanks for the info.
 
I forgot entirely about this code, I use to use it with the 7.x forum.
 
I managed to place the code right after the RSS code so it was near the top of the page instead of the bottom.
 
It works in regards to who is in the chatroom, but there is an error when you try to use the launch button (I have temp removed it).
 
Also, it is all text, the text below is what I am still having problems in the nice boxes (I did put in some Dim statements too)
 
The info below mostly works, just no nice boxes, all text at this time.
 
Response.Write(vbCrLf & " <tr>")
Response.Write(vbCrLf & "  <td bgcolor=""" & strTableTitleColour & """ width=""100%%"" class=""tHeading"" background=""" & strTableTitleBgImage & """>Chatroom</td>")
Response.Write(vbCrLf & " </tr>")
Response.Write(vbCrLf & " <tr>")
Response.Write(vbCrLf & "  <td bgcolor=""" & strTableColour & """ background=""" & strTableBgImage & """ class=""smText"" valign=""top"">")
Response.Write(vbCrLf & "  <b>Users in chatroom (" & UBound(saryActiveChatUsers, 2) & "):</b>")
Response.Write(vbCrLf & "  <br><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>")
If blnAdminInChat Then Response.Write("<blink><b><i>Administrator Online!</b></i></blink><br>")
 
I removed the guest one, I don't want guests in the chatroom
 
If blnGuest Then
 Response.Write(vbCrLf & "  [ <a href=""javascript:openWin('chat/default.asp','ChatRoom','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=590,height=425')"" class=""smLink"">Launch Chatroom</a> ]")
Else

This part (launch chatroom) has a problem and so far I have not figured out why, so for the time being it is disabled

 Response.Write(vbCrLf & "  [ <a href=""javascript:openWin('chat/chatroom.asp?txtUsername=" & strLoggedInUsername & "&Room=" & strDefaultChatroom & "','ChatRoom','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=590,height=425')"" class=""smLink"">Launch Chatroom</a> ]")
End If

Response.Write(vbCrLf & "  </td>")
Response.Write(vbCrLf & " </tr>")
 
Good thing I do have the Chat button in the menu, so that one works, if I can (or someone can) figure out what needs to be changed, I can add it and see if it works ok or not.
 
Rob
 
Back to Top
jckruger View Drop Down
Groupie
Groupie
Avatar

Joined: 18 April 2006
Location: Australia
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote jckruger Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2006 at 4:20am
Maybe you could change the reference from what you have here and remove the java script and make it the same as the menu button:
 
This is what you have now:
 
--------------------------------------------------%>--------------------------------------
Response.Write(vbCrLf & "  [ <a href=""javascript:openWin('chat/chatroom.asp?txtUsername=" & strLoggedInUsername & "&Room=" & strDefaultChatroom & "','ChatRoom','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=590,height=425')"" class=""smLink"">Launch Chatroom</a> ]")
End If
Response.Write(vbCrLf & "  </td>")
Response.Write(vbCrLf & " </tr>")
--------------------------------------------------%>--------------------------------------
 
Change it to something like this:
 
--------------------------------------------------%>--------------------------------------
Response.Write(vbCrLf & "<a href=""chat/chatroom.asp?txtUsername=" & strLoggedInUsername & "&Room=" & strDefaultChatroom & """ target=""_blank"" />Launch Chatroom</a>")
End If
Response.Write(vbCrLf & "  </td>")
Response.Write(vbCrLf & " </tr>")
--------------------------------------------------%>--------------------------------------
 
Remember I have not tested this.
 
When I can I will figure out how to make it look like the statistics
Back to Top
k6irk View Drop Down
Newbie
Newbie


Joined: 26 September 2003
Location: United States
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote k6irk Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2006 at 4:53am
Perfect, that code worked!!!!!!
 
Thank you.  I was trying different things, but miss that one.
 
I'm still not very good at this, so thank you for the help on that!
 
Originally posted by jckruger jckruger wrote:

Maybe you could change the reference from what you have here and remove the java script and make it the same as the menu button:
 
This is what you have now:
 
--------------------------------------------------%>--------------------------------------
Response.Write(vbCrLf & "  [ <a href=""javascript:openWin('chat/chatroom.asp?txtUsername=" & strLoggedInUsername & "&Room=" & strDefaultChatroom & "','ChatRoom','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=590,height=425')"" class=""smLink"">Launch Chatroom</a> ]")
End If
Response.Write(vbCrLf & "  </td>")
Response.Write(vbCrLf & " </tr>")
--------------------------------------------------%>--------------------------------------
 
Change it to something like this:
 
--------------------------------------------------%>--------------------------------------
Response.Write(vbCrLf & "<a href=""chat/chatroom.asp?txtUsername=" & strLoggedInUsername & "&Room=" & strDefaultChatroom & """ target=""_blank"" />Launch Chatroom</a>")
End If
Response.Write(vbCrLf & "  </td>")
Response.Write(vbCrLf & " </tr>")
--------------------------------------------------%>--------------------------------------
 
Remember I have not tested this.
 
When I can I will figure out how to make it look like the statistics
Back to Top
jckruger View Drop Down
Groupie
Groupie
Avatar

Joined: 18 April 2006
Location: Australia
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote jckruger Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2006 at 8:07am
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.com
Dim 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 ("&nbsp;&nbsp;<a href=""chat/chatroom.asp?txtUsername=" & strLoggedInUsername & "&Room=" & strDefaultChatroom & """ target=""_blank""><align=""absmiddle"" border=""0"" alt=""Launch Chat"" />[Launch]</a>")
Response.Write(vbCrLf & "  </td>")
Response.Write(vbCrLf & " </tr>")
'Copyright 2005 - Drew Gauderman - http://www.iportalx.net - http://www.aspinvision.com
'##########################################################################################
'##########################################################################################
'########################### END MADDOG MOD HERE ##########################################
'##########################################################################################
'##########################################################################################
%>
-------------------------------------------------------------------------------%>-------------------------------
 
This adds the details below active users in the forum statistics.
 
It currently works in my development v8.03 forum.
 
Cheers
 
Justin


Edited by jckruger - 02 July 2006 at 8:15am
Back to Top
Imperator View Drop Down
Newbie
Newbie


Joined: 02 October 2004
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote Imperator Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2006 at 4:07pm
Thanks for the responese, guys.
Back to Top
jckruger View Drop Down
Groupie
Groupie
Avatar

Joined: 18 April 2006
Location: Australia
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote jckruger Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2006 at 11:47pm
Did it work for you as I found that when locally connecting to the web page it worked but when connecting remotely to my production box I was getting a problem with the CDate function. Can't remember the exact message as I rolled back the changes to my production box.
 
Is anyone else having problems?
Back to Top
 Post Reply Post Reply Page  <1234 12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.