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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Current Version (Old)
 Whos on the board?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Joshua
Starting Member

31 Posts

Posted - 20 April 2001 :  16:50:34  Show Profile
i see a lot of forums and at the bottom they say who is logged in, how can i do this?

thanks,
Joshua

Joshua
Starting Member

31 Posts

Posted - 20 April 2001 :  17:14:47  Show Profile
also is it possible to make the AIM/ICQ/yahoo thing compatible with MSN messanger? and if so, how?


thanks,
Joshua

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 20 April 2001 :  17:42:35  Show Profile
For the Who's Online code: http://forum.snitz.com/forum/link.asp?TOPIC_ID=3041

On MSN Messenger, try doing a search for MSN Messenger from the Search link at the top right. I remember it was discussed, but since MSN Messenger doesn't have web-based status indicators (other than within MSN Messenger itself, or via Hotmail) or a way to send an IM without having MSN Messenger open, it's a little different than the other 3.
Go to Top of Page

Joshua
Starting Member

31 Posts

Posted - 20 April 2001 :  18:00:17  Show Profile
hey richard thanks for a responce, but im still unclear; Im not sure if i stated what i was wanting right, and if i did i guess i just didnt understand how to acomplish it (im from Tennessee (USA) so that should explain why im so slow )Anyways i am wanting all my visitors to see who is currently browsing the boards.

thanks,
Joshua aka your daily annoyance

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 20 April 2001 :  21:22:46  Show Profile
download this and install it: http://www.dsilvera.com/forum/mods/active_users.zip

then download this: http://www1.domaindlx.com/dssdbs/files/active_users_addons2.zip
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 20 April 2001 :  21:32:44  Show Profile
Instructions for adding the Add-Ons:

This first one is for if you liked the way the Who's Online Mod displayed the Members name and was like a Category of the Forum.

Just insert the Include code like this:

		end if
rs.MoveNext
loop
end if
%>
<!--#include file="active_users2.asp"-->
<%

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



If you have the minimize category mod installed and you want the Who's Online part to be collapsible as well substitute active_users2b.asp as the include file above.


If you would instead like the Active Users displayed as the last line in your statistics section.

Just insert the Include code like this:

		rs.MoveNext
loop
end if
if strShowStatistics = "1" then
WriteStatistics
%>
<!--#include file="active_users3.asp"-->
<%

end if
%>
</table>
</td>
Go to Top of Page

Joshua
Starting Member

31 Posts

Posted - 22 April 2001 :  17:38:31  Show Profile
Thank you for a responce Richard, i downloadede and uploaded those files, then i read the readme file and thought i did what it asked, but afterwards i tried to view and i got some error, so i reuploaded the original top_inc.asp and Default.asp, so it works again, but can you tell me exactly where i need to insert
"<a href="active_users.asp">Active Users</a>: <%=strOnlineMembersCount%> Members and <%=strOnlineGuestsCount%> Guests"

and

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

' ******************************************************
' ADD HERE WHAT YOU WANT THE PREFIX OF YOUR COOKIE TO BE
' it will either be 'strCookieURL' or 'strUniqueID'
strTempCookieType = strCookieURL
' ******************************************************




Function OnlineSQLencode(byVal strPass)
If not isNull(strPass) and strPass <> "" Then
strPass = Replace(strPass, "%", "'%'")
strPass = Replace(strPass, "'", "''")
strPass = Replace(strPass, "|", "'|'")
OnlineSQLencode = strPass
End If
End Function

Function OnlineSQLdecode(byVal strPass)
If not isNull(strPass) and strPass <> "" Then
strPass = Replace(strPass, "'%'", "%")
strPass = Replace(strPass, "''", "'")
strPass = Replace(strPass, "'|'", "|")
OnlineSQLdecode = strPass
End If
End Function


' LETS GET WHAT PAGE THEY ARE ON
strOnlinePathInfo = Request.ServerVariables("Path_Info")
strOnlineQueryString = Request.QueryString

' 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_view.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>"
Else
strOnlineLocation = "Unknown Page"
End If

' FIND OUT IF THEY ARE A GUEST, OR A USER
if Request.Cookies(strTempCookieType & "User")("Name") = "" then
strOnlineUser = "Guest"
else
strOnlineUser = Request.Cookies(strTempCookieType & "User")("Name")
end if

strOnlineUserIP = Request.ServerVariables("REMOTE_ADDR")

' LETS ENCODE THIS INFO
strOnlineUser = OnlineSQLencode(strOnlineUser)
strOnlineLocation = OnlineSQLencode(strOnlineLocation)

' SET WHEN TO TIMEOUT THE USER
' DO THIS IN SECONDS
strOnlineDate = DateToStr(Date)
strOnlineCheckInTime = DateToStr(Now())

strOnlineTimedOut = strOnlineCheckInTime - 660 'time out the user after 11 minutes ( 660 seconds )

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = strConnString
objConn.Open

strSql = "SELECT " & strTablePrefix & "ONLINE.UserID, " & strTablePrefix & "ONLINE.UserIP, " & strTablePrefix & "ONLINE.LastChecked"
strSql = strSql & " FROM " & strTablePrefix & "ONLINE "
strSql = strSql & " WHERE " & strTablePrefix & "ONLINE.UserIP='" & strOnlineUserIP & "' AND " & strTablePrefix & "ONLINE.UserID='" & strOnlineUser & "'"
set rsWho = my_Conn.Execute (strSql)

if rsWho.eof or rsWho.bof then
' THEY ARE A NEW USER SO INSERT THERE USERNAME
on error resume next
Set objRS2 = Server.CreateObject("ADODB.Recordset")
strSQL = "INSERT INTO " & strTablePrefix & "ONLINE (UserID,UserIP,DateCreated,CheckedIn,LastChecked,M_BROWSE) VALUES ('"
strSql = strSQL & strOnlineUser & "','" & strOnlineUserIP & "','" & strOnlineDate & "','" & strOnlineCheckInTime & "','" & strOnlineCheckInTime & "','" & strOnlineLocation & "')"
my_Conn.Execute (strSql)
if err.number <> 0 then response.write err.number & "|" & err.description
else
' THEY ARE A ACTIVE USER
strSql = "SELECT " & strTablePrefix & "ONLINE.UserID, " & strTablePrefix & "ONLINE.UserIP, " & strTablePrefix & "ONLINE.LastChecked"
strSql = strSql & " FROM " & strTablePrefix & "ONLINE "
strSql = strSql & " WHERE " & strTablePrefix & "ONLINE.UserID='" & strOnlineUser & "' AND " & strTablePrefix & "ONLINE.UserIP = '" & strOnlineUserIP & "'"
set rsLastChecked = my_Conn.Execute (strSql)

' LETS UPDATE THE TABLE SO IT SHOWS THERE LAST ACTIVE VISIT
strSql = "UPDATE " & strTablePrefix & "ONLINE SET M_BROWSE='" & strOnlineLocation & "' , LastChecked='" & strOnlineCheckInTime & "' WHERE UserID='" & strOnlineUser & "' AND " & strTablePrefix & "ONLINE.UserIP='" & strOnlineUserIP & "'"
my_Conn.Execute (strSql)
end if

' LETS DELETE ALL INACTIVE USERS
SQL = "DELETE FROM " & strTablePrefix & "ONLINE WHERE LastChecked < '" & strOnlineTimedOut & "'"
objConn.Execute SQL

set rsOnline = Server.CreateObject("ADODB.Recordset")

if strDBType = "access" then
strSqL = "SELECT count(UserID) AS [onlinecount] "
else
strSqL = "SELECT count(UserID) onlinecount "
end if

strSql = strSql & "FROM " & strTablePrefix & "ONLINE "
Set rsOnline = my_Conn.Execute(strSql)
onlinecount = rsOnline("onlinecount")
strOnlineUsersCount = rsOnline("onlinecount")

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

Set rsGuests = my_Conn.Execute(strSql)
Guests = rsGuests("Guests")
strOnlineGuestsCount = rsGuests("Guests")


' 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) 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")

' END WHOS ONLINE SCRIPT
%>

i guess i messed it up :)

thank you,
Joshua



Go to Top of Page

Joshua
Starting Member

31 Posts

Posted - 24 April 2001 :  16:39:07  Show Profile
bumpity bump bump

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 24 April 2001 :  17:02:29  Show Profile
What's the error you are getting?

Go to Top of Page

DarlingBri
Junior Member

United Kingdom
378 Posts

Posted - 07 May 2001 :  17:09:12  Show Profile  Visit DarlingBri's Homepage
I'm getting an error message:

quote:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'count(UserID) onlinecount'.

/forums/inc_top.asp, line 224



Anyone know what I'm doing wrong?

I had inserted the code required at Line 81 of inc_top if it makes a difference...

"Bother," said Pooh, as Piglet was assimilated by the Borg.

Edited by - DarlingBri on 07 May 2001 17:10:50
Go to Top of Page

DarlingBri
Junior Member

United Kingdom
378 Posts

Posted - 07 May 2001 :  18:35:51  Show Profile  Visit DarlingBri's Homepage
Ugh, never mind.

Wrong thread, and a stupid error on my part.

Sorry :o)

"Bother," said Pooh, as Piglet was assimilated by the Borg.
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.33 seconds. Powered By: Snitz Forums 2000 Version 3.4.07