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: MOD Implementation
 Member and Mods cannot see Archive
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

cladon
Junior Member

Belgium
110 Posts

Posted - 07 January 2004 :  17:57:08  Show Profile
I think Huwr mean where the subroutine is located it is in inc_func_common.asp

and it looks like


Sub ActiveUserTracker()
  'Ls3k- Declare and assign variables.
  Dim strUserIP, strScriptName, strQueryString, strUserAgent, strCurrentTime, strTimedOut

  strUserIP = Request.ServerVariables("REMOTE_ADDR")
  strScriptName = Mid(Request.ServerVariables("SCRIPT_NAME"), InstrRev(Request.ServerVariables("SCRIPT_NAME"), "/")+1)
  strQueryString = Request.ServerVariables("QUERY_STRING")
  strUserAgent = Request.ServerVariables("HTTP_USER_AGENT")
  strCurrentTime = DateToStr(strForumTimeAdjust)

  'Ls3k- First Order of business, is this person new?
  if MemberID="-1" then 'If this is a Guest, check by IP
    strSql = "SELECT AU_LASTACTIVETIME FROM " & strTablePrefix & "ACTIVE_USERS WHERE AU_IP = '" & Chkstring(strUserIP, "SQLString") & "' AND MEMBER_ID = -1"
  else 'If this is a Member, check by Member_ID
    strSql = "SELECT AU_LASTACTIVETIME FROM " & strTablePrefix & "ACTIVE_USERS WHERE MEMBER_ID = " & MemberID
  end if
  set rs = my_conn.execute (strSql)
  if rs.EOF or rs.BOF then
    strNewUser = 1
  else
    strNewUser = 0
    strAUTimedOut = DateToStr(DateAdd("n",-strAUTimeout,strForumTimeAdjust))
    if rs("AU_LASTACTIVETIME") < strAUTimedOut then  'Check to see if user has timed out since last active.
      strSql = "DELETE FROM " & strTablePrefix & "ACTIVE_USERS WHERE (MEMBER_ID = " & MemberID & " AND MEMBER_ID <> -1) OR (AU_IP = '" & Chkstring(strUserIP, "SQLString") & "' AND MEMBER_ID = -1)"
      my_conn.execute (strSql)
      strNewUser = 1
    end if
  end if
  rs.close
  set rs = Nothing

  'Ls3k- Second order of business, lets update those already-active users
  if strNewUser = 0 then 'If already-active
    strSql = "UPDATE " & strTablePrefix & "ACTIVE_USERS SET " & _
             "AU_LASTACTIVETIME='" & Chkstring(strCurrentTime, "SQLString") & "'" & _
             ", AU_LASTPAGE='" & Chkstring(strScriptName, "SQLString") & "'" & _
             ", AU_QUERYSTRING='" & Chkstring(strQueryString, "SQLString") & "' "
    if MemberID=-1 then 'If guest, update based on IP
      strSql = strSql & "WHERE AU_IP = '" & Chkstring(strUserIP, "SQLString") & "' " & _
                        "AND MEMBER_ID = " & MemberID
    else 'Update members based on MemberID
      strSql = strSql & "WHERE MEMBER_ID = " & MemberID
    end if
    my_conn.execute (strSql)
  else 'Is a new user, make new record
    strSql = "INSERT INTO " & strTablePrefix & "ACTIVE_USERS (" & _
             "MEMBER_ID, AU_IP, AU_LOGINTIME, AU_LASTACTIVETIME, " & _
             "AU_LASTPAGE, AU_QUERYSTRING, AU_USER_AGENT) VALUES(" & _
             MemberID & ", " & _
             "'" & Chkstring(strUserIP, "SQLString") & "', " & _
             "'" & Chkstring(strCurrentTime, "SQLString") & "', " & _
             "'" & Chkstring(strCurrentTime, "SQLString") & "', " & _
             "'" & Chkstring(strScriptName, "SQLString") & "', " & _
             "'" & Chkstring(strQueryString, "SQLString") & "', " & _
             "'" & Chkstring(strUserAgent, "SQLString") & "')"
    my_conn.execute (strSql)
  end if
end sub

Edited by - cladon on 07 January 2004 17:57:43
Go to Top of Page

btekcan
Junior Member

Turkey
112 Posts

Posted - 07 January 2004 :  18:02:00  Show Profile  Visit btekcan's Homepage
I change inc_active_users.asp but still same,I remove this code

if strUseActiveUsers = "1" then
select case Request.Form("Method_Type")
case "login"
if strLoginStatus = 1 then
AUHandleLoging()
end if
case "logout"
AUHandleLoging()
end select
ActiveUserTracker()
end if

but still same.Convert all original again.
Go to Top of Page

btekcan
Junior Member

Turkey
112 Posts

Posted - 07 January 2004 :  18:16:28  Show Profile  Visit btekcan's Homepage
Aha I find this code in active_users.asp file....


case "topic.asp"
strQuery = fQuery
fTopic_ID = analyzeQuery(strQuery, "TOPIC_ID")
if fTopic_ID = "" then
strPage = fLang(strLangMOD_Ls3kAU_01270)
else
strQuery = fQuery
if lcase(analyzeQuery(strQuery, "ARCHIVE")) = "true" then
strSql = "SELECT FORUM_ID, TOPIC_ID, T_SUBJECT FROM " & strTablePrefix & "A_TOPICS WHERE TOPIC_ID=" & fTopic_ID
else
strSql = "SELECT FORUM_ID, TOPIC_ID, T_SUBJECT FROM " & strTablePrefix & "TOPICS WHERE TOPIC_ID=" & fTopic_ID
end if
' if mlev = 4 then
' Response.Write strsql
' end if
set rst = my_conn.execute(strSql)
if rst.EOF or rst.BOF then
strPage = fLang(strLangMOD_Ls3kAU_01270)
else

Is is probelem ?

Go to Top of Page

btekcan
Junior Member

Turkey
112 Posts

Posted - 08 January 2004 :  06:50:42  Show Profile  Visit btekcan's Homepage
I'm very boring,my users still cannot see archive.Also very important things in my archive :-(
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 08 January 2004 :  06:57:12  Show Profile  Visit HuwR's Homepage
then you need to ask Crash since it is his code.
Go to Top of Page

btekcan
Junior Member

Turkey
112 Posts

Posted - 11 January 2004 :  05:53:42  Show Profile  Visit btekcan's Homepage
crash still not response this problem.

HuwR can I change my code to HuwR code,is it big problem or easy ? Because I need urgenty resolve this problem...
Go to Top of Page

Image
Average Member

Canada
574 Posts

Posted - 11 January 2004 :  20:33:35  Show Profile  Visit Image's Homepage  Send Image an ICQ Message
btekcan try this in inc_header

1.)
'if not Instr(request.servervariables("script_name"),"admin_") > 0 then
	if not Instr(strScriptName,"admin_") > 0 then                                                                         
	%><!--#include file="inc_whoisonline.asp"--><%
 end if


2.)
Do the following modifications on inc_whoisonline.asp
'---------- lets get what page they are on
strOnlinePathInfo = Request.ServerVariables("Path_Info")
strOnlineQueryString = Request.QueryString

	if iOnlineTopicID <> 0 Then    ' ### Bug Fix: it was <> "" but some lines above it was already converted to 0
	'### Bug fix: added the following lines
	   	if Request.QueryString("ARCHIVE") = "true" Then
	   		tempPrefix = "A_"
	   	else
	   		tempPrefix = ""
	   	end if
	 '### Bug fix: added the above lines and modified the following line ("& tempPrefix" added)	   	
		set rst = my_conn.execute("SELECT FORUM_ID,TOPIC_ID, T_SUBJECT FROM " & strTablePrefix & tempPrefix & "TOPICS WHERE TOPIC_ID = " & iOnlineTopicID)
		if not rst.eof then
			iOnlineForumID = rst("FORUM_ID")
			Topic_Subject = rst("T_SUBJECT")
		end if
		rst.close
		set rst = nothing
	end if

'---------- try and find out what page they are on



Also change around line 69


' strOnlineLocation = strOnlineLocation & "<a href=""topic.asp?TOPIC_ID=" & iOnlineTopicID & """>"
strOnlineLocation = strOnlineLocation & Topic_Subject ' ### Bug Fix this line has been unREMmed



Edited by - Image on 12 January 2004 16:28:21
Go to Top of Page

btekcan
Junior Member

Turkey
112 Posts

Posted - 12 January 2004 :  03:33:07  Show Profile  Visit btekcan's Homepage
Thanks Image

I've get this error

Microsoft VBScript compilation error '800a0400'

Expected statement

/satforum/inc_header.asp, line 246

end if
^

Go to Top of Page

Image
Average Member

Canada
574 Posts

Posted - 12 January 2004 :  15:17:08  Show Profile  Visit Image's Homepage  Send Image an ICQ Message
Send me your inc_header.asp and inc_whoisonline.asp
Go to Top of Page

Image
Average Member

Canada
574 Posts

Posted - 12 January 2004 :  16:30:21  Show Profile  Visit Image's Homepage  Send Image an ICQ Message
FIXED
no modification in inc_header.asp
Go to Top of Page

btekcan
Junior Member

Turkey
112 Posts

Posted - 12 January 2004 :  18:17:02  Show Profile  Visit btekcan's Homepage
Not modify a inc_header.asp

'if not Instr(request.servervariables("script_name"),"admin_") > 0 then
if not Instr(strScriptName,"admin_") > 0 then
%><!--#include file="inc_whoisonline.asp"--><%
end if


Only modification in inc_whoisonline.asp,problem is gone....

Realy BIGGGGGG thanks Image,good support.....

Thanks from my 8000 user already.
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous 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.53 seconds. Powered By: Snitz Forums 2000 Version 3.4.07