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

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MOD - Online/Active Chatters
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Martha2Mary
Junior Member

New Zealand
250 Posts

Posted - 21 August 2001 :  07:09:47  Show Profile  Visit Martha2Mary's Homepage  Send Martha2Mary an AOL message  Send Martha2Mary an ICQ Message  Send Martha2Mary a Yahoo! Message
Please ensure that you read and take note of the following before implementing this Mod:


1. I have never created a Mod before and am a Newbie to ASP (or any scripting language), so this Mod could no doubt be improved upon by those more knowledgable than I. Feel free to modify, edit, or improve, but please do not feel free to criticize.

2. YOU MUST HAVE THE ACTIVE USERS MOD INSTALLED FOR THIS TO WORK

3. THIS MOD HAS ONLY BEEN TESTED ON SNITZ 3.1 SR4, SO I DO NOT KNOW IF IT WILL WORK ON SNITZ 3.3

4. This Mod assumes that your Chat Room Page is named 'chat.asp' and is located in your Forum directory.

5. This Mod only takes note of Forum Members who are in the Chat Room, not Guests, as my Chat Room is limited to Members Only.


Download: Online Chatters Mod

Okay, now that that is out of the way, I'll let you know what this Mod actually does. I have added a Chat Room to my Forums and wanted to integrate it a little better so that my Forum Members could see if anyone was in the Chat Room without having to enter it themselves. After much trial and error, I finally managed to get something that worked the way I wanted it to, and offer it here for those who might also want to do a similar thing.

In the .zip you will find the following files:

- active_chatters.asp
- inc_chatters.asp
- icon_chat.gif
- icon_chatter.gif

Including active_chatters.asp on your default.asp page will result in:

*If Chat Room Is Empty



*If Chat Room has Member/s in it



Including inc_chatters.asp on your inc_top.asp will result in:

*Only Appears if Member/s in Chat Room



Added/Modified Pages

1. In inc_top.asp Add/Modify the following (in Red):

(Please note that your inc_top.asp will differ from mine, so use this as a guide only)

a)

' WHOS ONLINE SCRIPT
Dim strOnlinePathInfo, strOnlineQueryString, strOnlineLocation
Dim strOnlineUser, strOnlineDate, strOnlineCheckInTime, strOnlineTimedOut
Dim strOnlineUsersCount, strOnlineGuestsCount, strOnlineMembersCount, strOnlineChattersCount
Dim strOnlineGuestUserIP

b)

' TRY AND FIND OUT WHAT PAGE THEY ARE ON
If lcase(Right(strOnlinePathInfo, 9)) = "forum.asp" Then
strOnlineLocation = "<a href=""forum.asp?" & strOnlineQueryString & """>" & Request.QueryString("Forum_Title") & "</a>"
ElseIf lcase(Right(strOnlinePathInfo, 11)) = "default.asp" Then
strOnlineLocation = "<a href=""default.asp"">Home</a>"
ElseIf lcase(Right(strOnlinePathInfo, 9)) = "topic.asp" Then
strOnlineLocation = "Viewing Message ' <a href=""link.asp?TOPIC_ID=" & Request.QueryString("TOPIC_ID") & """>" & Request.QueryString("Topic_Title") & "</a> '"
ElseIf lcase(Right(strOnlinePathInfo, 8)) = "post.asp" Then
If Request.QueryString("method") = "Reply" Then
strOnlineLocation = "Replying To Message ' <a href=""topic.asp?" & strOnlineQueryString & """>" & Request.QueryString("Topic_Title") & "</a> '"
ElseIf Request.QueryString("method") = "Topic" Then
strOnlineLocation = "Posting New Topic in ' <a href=""forum.asp?" & strOnlineQueryString & """>" & Request.QueryString("Forum_Title") & "</a> '"
Else
strOnlineLocation = "Unknown"
End If
ElseIf lcase(Right(strOnlinePathInfo, 10)) = "active.asp" Then
strOnlineLocation = "<a href=""active.asp"">Active Topics</a>"
ElseIf lcase(Right(strOnlinePathInfo, 11)) = "members.asp" Then
strOnlineLocation = "<a href=""members.asp"">Members</a>"
ElseIf lcase(Right(strOnlinePathInfo, 10)) = "search.asp" Then
strOnlineLocation = "<a href=""search.asp"">Search</a>"
ElseIf lcase(Right(strOnlinePathInfo, 7)) = "faq.asp" Then
strOnlineLocation = "<a href=""faq.asp"">FAQ</a>"
ElseIf lcase(Right(strOnlinePathInfo, 15)) = "pop_profile.asp" Then
If Request.QueryString("mode") = "Display" Then
strOnlineLocation = "<a href=""pop_profile.asp?" & strOnlineQueryString & """>Members Profile</a> '"
Else
strOnlineLocation = "Profile"
End If
ElseIf lcase(Right(strOnlinePathInfo, 11)) = "pm_view.asp" Then
strOnlineLocation = "<a href=""pm_view.asp"">Private Message Inbox</a>"
ElseIf lcase(Right(strOnlinePathInfo, 14)) = "pm_options.asp" Then
strOnlineLocation = "<a href=""pm_options.asp"">Private Messages Options</a>"
ElseIf lcase(Right(strOnlinePathInfo, 15)) = "privatesend.asp" Then
strOnlineLocation = "<a href=""privatesend.asp"">Sending Private Message</a>"
ElseIf lcase(Right(strOnlinePathInfo, 16)) = "active_users.asp" Then
strOnlineLocation = "<a href=""active_users.asp"">Active Users</a>"
ElseIf lcase(Right(strOnlinePathInfo, 10)) = "events.asp" Then
strOnlineLocation = "<a href=""events.asp"">Events Calendar</a>"
ElseIf lcase(Right(strOnlinePathInfo, 8)) = "chat.asp" Then
strOnlineLocation = "<a href=""chat.asp"">Chat Entry</a>"
ElseIf lcase(Right(strOnlinePathInfo, 8)) = "chat.asp" Then
strOnlineLocation = "<a href=""chat.asp"">Chat Room</a>"

ElseIf lcase(Right(strOnlinePathInfo, 12)) = "bookmark.asp" Then
strOnlineLocation = "<a href=""bookmark.asp"">Personal Bookmarks</a>"
ElseIf lcase(Right(strOnlinePathInfo, 9)) = "links.asp" Then
strOnlineLocation = "<a href=""links.asp"">Members Links</a>"
ElseIf lcase(Right(strOnlinePathInfo, 13)) = "guestbook.asp" Then
strOnlineLocation = "<a href=""guestbook.asp"">Guestbook</a>"
ElseIf lcase(Right(strOnlinePathInfo, 18)) = "cancel_replies.asp" Then
strOnlineLocation = "<a href=""cancel_replies.asp"">Cancel Email Notifications</a>"
ElseIf lcase(Right(strOnlinePathInfo, 11)) = "purpose.asp" Then
strOnlineLocation = "<a href=""purpose.asp"">Our Purpose</a>"
ElseIf lcase(Right(strOnlinePathInfo, 22)) = "view_announcements.asp" Then
strOnlineLocation = "<a href=""view_announcements.asp"">Announcements</a>"
ElseIf lcase(Right(strOnlinePathInfo, 10)) = "policy.asp" Then
strOnlineLocation = "<a href=""policy.asp"">Policy</a>"
Else
strOnlineLocation = "Unknown Page"
End If

c)

' Get Member count for display on Default.asp
set rsGuests = Server.CreateObject("ADODB.Recordset")
if strDBType = "access" then
strSqL = "SELECT count(UserID) AS [Members] "
else
strSqL = "SELECT count(UserID) AS Members "
end if
strSql = strSql & "FROM " & strTablePrefix & "ONLINE "
strSql = strSql & " WHERE Right(UserID, 5) <> 'Guest' "

Set rsMembers = my_Conn.Execute(strSql)
Members = rsMembers("Members")
strOnlineMembersCount = rsMembers("Members")

' Get Chatter count for display on Default.asp
set rsGuests = Server.CreateObject("ADODB.Recordset")
if strDBType = "access" then
strSqL = "SELECT count(UserID) AS [Chatters] "
else
strSqL = "SELECT count(UserID) AS Chatters "
end if
strSql = strSql & "FROM " & strTablePrefix & "ONLINE "
strSql = strSql & " WHERE " & strMemberTablePrefix & "ONLINE.M_BROWSE = '<a href=""chat.asp"">Chat Room</a>' "

Set rsChatters = my_Conn.Execute(strSql)
Chatters = rsChatters("Chatters")
strOnlineChattersCount = rsChatters("Chatters")

' END WHOS ONLINE SCRIPT


2. In Default.asp, add:

<!--#include file="active_users2b.asp"-->

<!--#include file="active_chatters.asp"-->

<%
if strShowStatistics = "1" then
WriteStatistics
end if
%>


I think that is about it ~ if you have any problems, please do not anticipate me being capable of helping you fix them

Hoping this works for others!

*If Knowledge is Power, and Power Corrupts, what hope is there for Mankind *

Edited by - Martha2Mary on 21 August 2001 07:14:17

dayve
Forum Moderator

USA
5820 Posts

Posted - 21 August 2001 :  11:30:01  Show Profile  Visit dayve's Homepage
great idea, now if only the chat mod was improved. I don't use the chat mod, but if I did, your mod would be a MUST install.

Dayve
Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 21 August 2001 :  15:10:18  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
Hey that looks great!

The trick is to find the right kind of chat application

Every chat room I install has some problem and I have to go find another then that has a problem and so on....

@tomic

Go to Top of Page

Martha2Mary
Junior Member

New Zealand
250 Posts

Posted - 21 August 2001 :  16:43:43  Show Profile  Visit Martha2Mary's Homepage  Send Martha2Mary an AOL message  Send Martha2Mary an ICQ Message  Send Martha2Mary a Yahoo! Message
Thanks Dayve and @tomic ~ I only hope that the code actually works for others as well.

I actually don't use the Chat Mod for my Chat Room, as my Members hated the refreshing of the chat page, so I opted for a Java based one instead and just put the code on an .asp page. I also preferred to be able to offer Member different ways of connecting to the Chat Room so have used one that accesses our own Channel on an IRC Server (tower.fdf.net) and configured the channel so that it doesn't show up in the /list or /whois commands. This way, Members can use mIRC (or something similar) to connect to the Chat Room as well as connect via my Forums with the Java app.

@tomic, what type of Chat app were you looking for - IRC or Non-IRC? And what type of features were you looking for?

*If Knowledge is Power, and Power Corrupts, what hope is there for Mankind *
Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 21 August 2001 :  16:57:34  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
Just a chat that can be used accessed by any browser or OS. ASP refresh chat's suck up server resources waaaaaay too much, ditto for flash chat. I've tried a few java chat room's but the results have varied from browser to browser and OS.

I just want it to work without exhausting server resources. ugh. You'd think it would be easier than it is and I have installed dozens of chat rooms

@tomic

Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 21 August 2001 :  16:59:58  Show Profile  Visit rick7165's Homepage
What's the best Java Chat? I do had a lot of people complain about the refresh on the ASP chats.


Test Site:
http://www.eastpasco.com running on Huw's Code 3.3.09 SQL 2000
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 21 August 2001 :  17:09:27  Show Profile  Visit dayve's Homepage
I use jpilot which is a java portal to an IRC channel that you can register. found it EXTREMELY useful.

http://www.jpilot.com

Dayve
Go to Top of Page

Martha2Mary
Junior Member

New Zealand
250 Posts

Posted - 21 August 2001 :  17:12:13  Show Profile  Visit Martha2Mary's Homepage  Send Martha2Mary an AOL message  Send Martha2Mary an ICQ Message  Send Martha2Mary a Yahoo! Message
If Server Resources are an issue, and it doesn't have to be an IRC java app, then try http://www.multicity.com. They offer a free Chat Room for your site, albeit with an advertisement on the top, but it is a good app, easy to setup etc. If I remember correctly, you can have more than one Room, as well as Private Rooms. Just look for the 'Express Registration' heading on the page, below which will be a drop down box for choosing which app you want (Chat Room).

Hope this helps!

*If Knowledge is Power, and Power Corrupts, what hope is there for Mankind *
Go to Top of Page

Martha2Mary
Junior Member

New Zealand
250 Posts

Posted - 21 August 2001 :  17:24:27  Show Profile  Visit Martha2Mary's Homepage  Send Martha2Mary an AOL message  Send Martha2Mary an ICQ Message  Send Martha2Mary a Yahoo! Message
quote:

I use jpilot which is a java portal to an IRC channel that you can register. found it EXTREMELY useful.

http://www.jpilot.com

Dayve



Dayve, if you put the necessary code to run JPilot onto an .asp page that includes your inc_top, inc_functions & config asp Forum files, you will be able to use the 'mod' I wrote, as I use JPilot too. With the help of @tomic, I was also able to configure it so that it automatically entered the Forum Member Name as the NickName for entering the Chat Room, and then I set the 'DirectStart' value to 'true'. Now, when a Member enters our Chat Room, they don't have to fill out anything (Server, Channel or NickName), and they are connected to the Chat using the NickName that all Members are familiar with. Just in case you are interested in this, here is my chat.asp page, with the modified line in red:


<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_top.asp" -->
<%
if strDBNTUserName = "" then
doNotLoggedInForm
end if
%>

<center>
<p align="center"><img src="wtowchatlogo.jpg" border="0"></p>
<form name="jform">
<div align="center"><table border="0" width="80%">
<tr>
<nobr>
<applet name="jchat" archive="jirc_nss.zip" code="Chat.class" width="570" height="380" align="bottom" vspace="0">
<param name="CABBASE" value="jirc_mss.cab">
<param name="ServerPort" value="6667">
<param name="ListTextColor" value="0,51,102">
<param name="ServerCmdColor" value="192,192,192">
<param name="BorderVsp" value="5">
<param name="NoConfig" value="true">
<param name="AcceptCommands" value="true">
<param name="TotalChannelsAllow" value="4">
<param name="TextColor" value="0,51,102">
<param name="AllowIdentd" value="true">
<param name="AllowPrivateChatWindow" value="true">
<param name="DirectStart" value="true">
<param name="NOS" value="true">
<param name="LogoBgColor" value="255,255,255">
<param name="BorderHsp" value="5">
<param name="IgnoreServerMsg" value="true">
<param name="NickName" value="<%=strDBNTUserName%>">
<param name="BackgroundColor" value="178,182,222">
<param name="ListScreenColor" value="245,237,242">
<param name="NickNameColor" value="-1">
<param name="ServerName1" value="tower.fdf.net">
<param name="ServerName2" value="transverse.fdf.net">
<param name="ServerName3" value="twg.fdf.net">
<param name="ServerName4" value="thealamo.fdf.net">
<param name="ServerName5" value="transbay.fdf.net">
<param name="RealName" value="Forum Member">
<param name="ActionColor" value="152,39,153">
<param name="IgnoreChannelChangeMsg" value="false">
<param name="isLimitedChannel" value="true">
<param name="isLimitedServers" value="true">
<param name="FGColor" value="75,77,151">
<param name="DisplaySoundControl" value="false">
<param name="DisplayAbout" value="false">
<param name="TotalServersAllow" value="5">
<param name="InputScreenColor" value="255,255,255">
<param name="AllowURL" value="true">
<param name="DisplayColorControl" value="true">
<param name="DisplayConfigChannel" value="false">
<param name="DisplayConfigChannelPass" value="false">
<param name="DisplayConfigMisc" value="false">
<param name="DisplayConfigNick" value="true">
<param name="DisplayConfigPort" value="false">
<param name="DisplayConfigRealName" value="false">
<param name="DisplayConfigServer" value="false">
<param name="DisplayConfigServerPass" value="false">
<param name="LogoHeight" value="0">
<param name="FieldNamePrivateChatTitle" value="Private Chat with:">
<param name="FieldNamePrivateClose" value="Close">
<param name="Channel1" value="private">
<param name="ServerErrorColor" value="red">
<param name="TextScreenColor" value="255,255,255">
<param name="TitleForegroundColor" value="255,255,255">
<param name="BorderSpacing" value="4">
<param name="RefreshColorCode" value="false">
<param name="Channel3" value="fdfnet">
<param name="InputTextColor" value="0,0,0">
<param name="TitleBackgroundColor" value="136,140,208">
<param name="AllowSound" value="true">
<param name="IgnoreModeChange" value="true">
<param name="IgnoreMOTD" value="true">
<param name="TextFontName" value="Helvetica">
<param name="TextFontSize" value="12">
<param name="WelcomeMessage" value="Welcome to the Women to Women Peer Support Chat!">
<param name="UserCmdColor" value="178,182,222">
<param name="LogoWidth" value="0">
<param name="Channel2" value="help">
</applet>
</TD></TR>
</TABLE>
</form>
</center>
<!--#INCLUDE FILE="inc_footer.asp" -->


Hope this is of some use to you!

*If Knowledge is Power, and Power Corrupts, what hope is there for Mankind *
Go to Top of Page

Bassman
Junior Member

Netherlands
256 Posts

Posted - 21 August 2001 :  17:50:12  Show Profile  Visit Bassman's Homepage
Hi all,

love the mod Martha , local it works great...gone upload it very some.

The chat box I got is a jpilot, its build in the forum, if you are no member you can`t chat. Members can click on the link and there name will be automatily put in a (Dutch boyscout) IRC server.

http://www.scoutingforum.com/nl


Thanks.

_________________________
The Dutch Scouting Forum
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 21 August 2001 :  18:07:17  Show Profile  Visit dayve's Homepage
Martha2Mary, I never thought of integrating that with JPilot, some of the best ideas are the simple ideas. Thanks a bunch, I will have to try this out later...

Dayve
Go to Top of Page

SalmanKhana
Average Member

USA
961 Posts

Posted - 21 August 2001 :  18:28:03  Show Profile
I am about to buy digichat. I know it is expensive, total of 800 dollars cost. Now I am looking forward to have people register to get into that chat. Any help would be appreciated.

Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 22 August 2001 :  04:34:29  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
Whew, finally got this going and I love it! I think it's really important to have some way of knowing if there are people in a chat room to bring even more in.

The only things I wish were different would be to have the blinking icon blink forever and to combine the sql/recordsets for this and Active Users to speed things up. The code is almost identical so it shouldn't be too tough.

I also have a problem with special characters such as in my @tomic moniker being inserted into the chat entry form. AOL members have had some trouble entering as well. Isn't there some bug involving this chat room and AOL members?

@tomic



Edited by - @tomic on 22 August 2001 04:36:36
Go to Top of Page

outback
Starting Member

14 Posts

Posted - 22 August 2001 :  05:16:14  Show Profile
Martha:

Your a bleeding genious.

I know nothing about IRC and haven' the faintest idea about setting a channel up .. who to see, what to do, to make this all work ..

Its in place .. I took the liberty of testing your setup by not changing anything in the chat.asp you posted .. wonders of wonders there I was in an Irc chat. Problem is I was on your chat channel ..

What do I need to do,change .. to make it work so that it is mine .. all mine . You realize of course that you just cost me 50.00 USD .. that is if you help me set up my own Irc using your chat.asp template .. since I'll have to register jPilot to get rid of that annoying unregestered version message.



Go to Top of Page

Martha2Mary
Junior Member

New Zealand
250 Posts

Posted - 22 August 2001 :  07:45:04  Show Profile  Visit Martha2Mary's Homepage  Send Martha2Mary an AOL message  Send Martha2Mary an ICQ Message  Send Martha2Mary a Yahoo! Message
Hi Outback,

I am pleased to hear that this code was helpful to you, and am more than happy to help get you a channel of your own! I am in New Zealand, so no doubt my timezone is different from yours, but if we could get together either in my Chat Channel (using the code that you already tested which put you in it) or on one of the Instant Messengers (ICQ, Yahoo, MSN, AIM) at a specified time. That way, I can walk you through creating your own channel, and give you Channel Op status, etc. So, if you let me know your timezone, and a range of times that would suit you, I can let you know which one suits me, and we can get together.

I'm about to go to bed, as it is nearly midnight here, so I wont be online for another 8 or so hours ~ just in case you're wondering why I haven't replied........

Hear from you soon!

*If Knowledge is Power, and Power Corrupts, what hope is there for Mankind *
Go to Top of Page

Martha2Mary
Junior Member

New Zealand
250 Posts

Posted - 22 August 2001 :  07:47:49  Show Profile  Visit Martha2Mary's Homepage  Send Martha2Mary an AOL message  Send Martha2Mary an ICQ Message  Send Martha2Mary a Yahoo! Message
Man, sometimes I can be sooooooo thick!!! Here you are with a Nick like 'Outback', and I, a Kiwi, didn't click to what timezone you would be in............ DOH!

*If Knowledge is Power, and Power Corrupts, what hope is there for Mankind *
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.19 seconds. Powered By: Snitz Forums 2000 Version 3.4.07