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: Addition to active_users.asp
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 07 May 2001 :  06:03:37  Show Profile
e3stone,

Thanks for that. Staring at me and I missed it. Makes perfect sense. Shall now get all my pages updated.

quote:

That number is how many characters are taken from the right side of the url name. i.e.
ElseIf lcase(Right(strOnlinePathInfo, 10)) = "active.asp" Then
strOnlineLocation = "<a href=""active.asp"">Active Topics</a>"

active.asp is 10 characters (including the period)

I don't understand why the events and links have 17 and 18, respectfully. That's probably a mistake.

<-- Eric -->


http://insidewaco.com



Regards,

Webmaster @ Classic Motor Cycling
Classic Motor Cycling
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 07 May 2001 :  14:19:12  Show Profile  Visit dayve's Homepage
thanks Eric, I bet that is the problem, gonna go check right now...

Dayve
Go to Top of Page

MAD_PsyClown
Starting Member

Denmark
6 Posts

Posted - 14 May 2001 :  15:06:45  Show Profile  Visit MAD_PsyClown's Homepage  Send MAD_PsyClown an ICQ Message
quote:

I use this
<!--#include file="active_users2.asp"-->

just before

<%if strShowStatistics = "1" then
WriteStatistics
end if
%>
</table>
</td>
</tr>
<tr>

here's a link to the file in case you don't have it

http://www.ugfl.net/test/active_users2.txt

http://www.ugfl.net/forums



Now i wondering, what file should i put the
<!--#include file="active_users2.asp"--> ?

Go to Top of Page

big9erfan
Average Member

540 Posts

Posted - 14 May 2001 :  19:01:28  Show Profile
you place it in inc_top.asp

http://www.ugfl.net/forums
Go to Top of Page

Man[0]War
Starting Member

United Arab Emirates
40 Posts

Posted - 15 May 2001 :  02:32:29  Show Profile  Visit Man[0]War's Homepage  Send Man[0]War an ICQ Message
I get the following :

Microsoft OLE DB Provider for ODBC Drivers error '80040e37'

[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot find the input table or query 'FORUM_ONLINE'. Make sure it exists and that its name is spelled correctly.

/adcotest/zuhair/newsforum/active_users2.asp, line 27


Do I have to run another MOD that creates the appropriate table?


Edited by - Man[0]War on 15 May 2001 02:36:39

Edited by - Man[0]War on 20 May 2001 23:26:37
Go to Top of Page

MAD_PsyClown
Starting Member

Denmark
6 Posts

Posted - 15 May 2001 :  09:27:26  Show Profile  Visit MAD_PsyClown's Homepage  Send MAD_PsyClown an ICQ Message
I can't find:

<%if strShowStatistics = "1" then
WriteStatistics
end if
%>
</table>
</td>
</tr>
<tr>

anywhere in my inc_top.asp, what should i do then?

Go to Top of Page

big9erfan
Average Member

540 Posts

Posted - 15 May 2001 :  10:53:43  Show Profile
Man[0]War,

You already need to be running the active users mod, this is just a modification to that mod.

MAD_PsyClown,

my apologies, it's in default.asp

http://www.ugfl.net/forums
Go to Top of Page

Man[0]War
Starting Member

United Arab Emirates
40 Posts

Posted - 16 May 2001 :  00:03:09  Show Profile  Visit Man[0]War's Homepage  Send Man[0]War an ICQ Message
doh! Thanks big9erfan

Go to Top of Page

Deuce Phrostbyte
Starting Member

USA
8 Posts

Posted - 17 May 2001 :  23:44:41  Show Profile  Send Deuce Phrostbyte an AOL message  Send Deuce Phrostbyte an ICQ Message
Where can i find tha active users mod. I looked and couldnt find it.

"If u dont believe in god, than u callin me a fraud" -Copywrite
Go to Top of Page

Syedur
New Member

USA
93 Posts

Posted - 18 May 2001 :  00:41:38  Show Profile  Visit Syedur's Homepage  Send Syedur an AOL message  Send Syedur an ICQ Message  Send Syedur a Yahoo! Message
Hi guys...
Where can I exactly paste these content?
<%
' 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 tried pasting right above the <script> file in the inc_top.asp but I keep getting errors.
Also tried right before the </head> tag. No luck there either.
Thanks.


Edited by - Syedur on 18 May 2001 00:43:09
Go to Top of Page

big9erfan
Average Member

540 Posts

Posted - 18 May 2001 :  00:46:30  Show Profile
what errors are you getting?


http://www.ugfl.net/forums
Go to Top of Page

Syedur
New Member

USA
93 Posts

Posted - 19 May 2001 :  13:39:00  Show Profile  Visit Syedur's Homepage  Send Syedur an AOL message  Send Syedur an ICQ Message  Send Syedur a Yahoo! Message
Ok...
I have two different forums...
One is in one server (easy to work with)
Another one is in different server (supports mailling system).
So.. I was thinking about modifying the fourm in one server and then move to the other server where it supports the mailling system.
They have the same files...
but just different configuration...
but... the Active Users work on one of and not the other one...
Can you belive that?
Ok... here are two links...
http://e-syed.net/forums (the temporary one which is most modified) - doesn't work.
http://64.23.82.10/e-syednet/forums/ (mail support) - does work.


By the way...
Which file does color/forum configuration contains?
Thanks.


Go to Top of Page

big9erfan
Average Member

540 Posts

Posted - 20 May 2001 :  10:33:04  Show Profile
This is the error I'm getting
quote:

Microsoft JET Database Engine error '80004005'

Could not use ''; file already in use.

/forums/inc_top.asp, line 183



send me the inc_top.asp file you have for the non-working forum and I'll take a look at it.

big9erfan@ugfl.net

http://www.ugfl.net/forums
Go to Top of Page

scottw
Starting Member

USA
3 Posts

Posted - 20 May 2001 :  18:48:10  Show Profile  Visit scottw's Homepage  Send scottw an ICQ Message
quote:

This is the error I'm getting
[quote]
Microsoft JET Database Engine error '80004005'

Could not use ''; file already in use.

/forums/inc_top.asp, line 183



I have received this error numerous times. And everytime it was because of my security settings on the Directory or DB its self. Double check your security settings

Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 21 May 2001 :  00:15:08  Show Profile  Visit dayve's Homepage
quote:

Ok...
I have two different forums...
One is in one server (easy to work with)
Another one is in different server (supports mailling system).
So.. I was thinking about modifying the fourm in one server and then move to the other server where it supports the mailling system.
They have the same files...
but just different configuration...
but... the Active Users work on one of and not the other one...
Can you belive that?
Ok... here are two links...
http://e-syed.net/forums (the temporary one which is most modified) - doesn't work.
http://64.23.82.10/e-syednet/forums/ (mail support) - does work.


By the way...
Which file does color/forum configuration contains?
Thanks.






I am using 2 different forums and had this problem. 2 things you need to do which is really important. First, your cookie type must be strUniqueID

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

Second, In your config.asp file around line 89 or 90, there's a variable called strUniqueID. Make sure your two forums have different UniqueID's. I believe this is the identifier for the cookie file stored on your computer. That might be causing your problems

strUniqueID = "Snitz01" 'change this value if using 2 forums

Both these things fixed my multiple forum issues. I can explain why this happens if ya like...

Dayve
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | 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.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07