Author |
Topic |
Classicmotorcycling
Development Team Leader
Australia
2084 Posts |
Posted - 07 May 2001 : 06:03:37
|
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 |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 07 May 2001 : 14:19:12
|
thanks Eric, I bet that is the problem, gonna go check right now...
Dayve |
|
|
MAD_PsyClown
Starting Member
Denmark
6 Posts |
Posted - 14 May 2001 : 15:06:45
|
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"--> ?
|
|
|
big9erfan
Average Member
540 Posts |
|
Man[0]War
Starting Member
United Arab Emirates
40 Posts |
Posted - 15 May 2001 : 02:32:29
|
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 |
|
|
MAD_PsyClown
Starting Member
Denmark
6 Posts |
Posted - 15 May 2001 : 09:27:26
|
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?
|
|
|
big9erfan
Average Member
540 Posts |
Posted - 15 May 2001 : 10:53:43
|
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 |
|
|
Man[0]War
Starting Member
United Arab Emirates
40 Posts |
Posted - 16 May 2001 : 00:03:09
|
doh! Thanks big9erfan
|
|
|
Deuce Phrostbyte
Starting Member
USA
8 Posts |
Posted - 17 May 2001 : 23:44:41
|
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 |
|
|
Syedur
New Member
USA
93 Posts |
Posted - 18 May 2001 : 00:41:38
|
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 |
|
|
big9erfan
Average Member
540 Posts |
|
Syedur
New Member
USA
93 Posts |
Posted - 19 May 2001 : 13:39:00
|
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.
|
|
|
big9erfan
Average Member
540 Posts |
Posted - 20 May 2001 : 10:33:04
|
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 |
|
|
scottw
Starting Member
USA
3 Posts |
Posted - 20 May 2001 : 18:48:10
|
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
|
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 21 May 2001 : 00:15:08
|
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 |
|
|
Topic |
|