| Author |  Topic  | 
              
                | ShaggySupport Moderator
 
      
 
                Ireland6780 Posts
 | 
                    
                      |  Posted - 22 November 2006 :  11:42:27   
 |  
                      | It's a change that needs to be made. 
 
 
 
 |  
                      | 
  Search is your friend “I was having a mildly paranoid day, mostly due to the
 fact that the mad priest lady from over the river had
 taken to nailing weasels to my front door again.”
 |  
                      |  |  | 
              
                | welshmanStarting Member
 
 
 
                United Kingdom6 Posts
 | 
                    
                      |  Posted - 29 November 2006 :  04:15:32   
 |  
                      | Hi again 
 ...and many thanks! We now have happy people in Papua New Guinea and a couple of other places. Your mod clearly did the trick.
 
 Best regards
 
 David
  |  
                      |  |  | 
              
                | ShaggySupport Moderator
 
      
 
                Ireland6780 Posts
 | 
                    
                      |  Posted - 29 November 2006 :  04:35:52   
 |  
                      | You're welcome  
 
 |  
                      | 
  Search is your friend “I was having a mildly paranoid day, mostly due to the
 fact that the mad priest lady from over the river had
 taken to nailing weasels to my front door again.”
 |  
                      |  |  | 
              
                | DavioDevelopment Team Member
 
      
 
                Jamaica12217 Posts
 | 
                    
                      |  Posted - 29 November 2006 :  05:25:18   
 |  
                      | If this a bug, can it be moved to the bug forum please? |  
                      | Support Snitz Forums
 
 |  
                      |  |  | 
              
                | ShaggySupport Moderator
 
      
 
                Ireland6780 Posts
 | 
                    
                      |  Posted - 29 November 2006 :  05:33:36   
 |  
                      | [Link]  
 
 |  
                      | 
  Search is your friend “I was having a mildly paranoid day, mostly due to the
 fact that the mad priest lady from over the river had
 taken to nailing weasels to my front door again.”
 |  
                      |  |  | 
              
                | DavioDevelopment Team Member
 
      
 
                Jamaica12217 Posts
 | 
                    
                      |  Posted - 29 November 2006 :  06:12:43   
 |  
                      | Oh. I knew I read something about this already.  |  
                      | Support Snitz Forums
 
 |  
                      |  |  | 
              
                | campinmom03Junior Member
 
   
 
                USA190 Posts
 | 
                    
                      |  Posted - 12 May 2007 :  07:52:26   
 |  
                      | Hello to all! 
 I take it from all the post that this issue is still a concern to all members. Is this something that should be implemented no matter what DB your (hopefully current version) Snitz Forum is running on?
 
 
 |  
                      | Have a great day!
 Terry
 |  
                      |  |  | 
              
                | ruiribSnitz Forums Admin
 
      
 
                Portugal26364 Posts
 |  | 
              
                | campinmom03Junior Member
 
   
 
                USA190 Posts
 | 
                    
                      |  Posted - 12 May 2007 :  09:54:50   
 |  
                      | Ruirib thank you for the response. I will implement this asap.  
 
 |  
                      | Have a great day!
 Terry
 |  
                      |  |  | 
              
                | campinmom03Junior Member
 
   
 
                USA190 Posts
 | 
                    
                      |  Posted - 12 May 2007 :  15:33:47   
 |  
                      | I think I have implemented this change correctly... no errors are showing. How can one test it to ensure it was done correctly? Are having no errors enough proof?  |  
                      | Have a great day!
 Terry
 |  
                      |  |  | 
              
                | ruiribSnitz Forums Admin
 
      
 
                Portugal26364 Posts
 | 
                    
                      |  Posted - 12 May 2007 :  15:37:45   
 |  
                      | You can look at the IP's in the database. If they are ok, that's halfway done. As long as they keep being stored correctly, you will know the changes were added correctly. |  
                      | 
 Snitz 3.4 Readme | Like the support? Support Snitz too
 |  
                      |  |  | 
              
                | campinmom03Junior Member
 
   
 
                USA190 Posts
 | 
                    
                      |  Posted - 12 May 2007 :  20:03:50   
 |  
                      | In the edit member area? Am I looking at the initial IP's or the last IP? Sorry, not sure where you mean for me to look and or how the IP's should look. 
 
 |  
                      | Have a great day!
 Terry
 |  
                      | Edited by - campinmom03 on 12 May 2007  20:04:38
 |  
                      |  |  | 
              
                | ruiribSnitz Forums Admin
 
      
 
                Portugal26364 Posts
 |  | 
              
                | campinmom03Junior Member
 
   
 
                USA190 Posts
 | 
                    
                      |  Posted - 12 May 2007 :  21:36:19   
 |  
                      | Ok, no problem. I'll look no touch. lol.  Oh, and no errors yet...keeping fingers crossed!  
 Many thanks!
 |  
                      | Have a great day!
 Terry
 |  
                      |  |  | 
              
                | ShaggySupport Moderator
 
      
 
                Ireland6780 Posts
 | 
                    
                      |  Posted - 14 June 2007 :  04:49:14   
 |  
                      | An additional change needs to made to the two files to handle IP addresses that may include the port number in them (e.g., 123.456.789.012:345) and I've also made a few minor tweaks to the previous chnages (replacing mid with left). 
 To implement these changes, find the UpdateLastHereDate function on line 575 of inc_func_common.asp and replace the entire function with the following:
 function UpdateLastHereDate(fTime,UserName)
	UserIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
	If UserIPAddress = "" or Left(UserIPAddress, 7) = "unknown" Then
		UserIPAddress = Request.ServerVariables("REMOTE_ADDR")
	ElseIf InStr(UserIPAddress, ",") > 0 Then
		UserIPAddress = Left(UserIPAddress, InStr(UserIPAddress, ",")-1)
	ElseIf InStr(UserIPAddress, ";") > 0 Then
		UserIPAddress = Left(UserIPAddress, InStr(UserIPAddress, ";")-1)
	End If
	If InStr(UserIPAddress, ":") > 0 then
		UserIPAddress = Left(UserIPAddress, InStr(UserIPAddress, ":")-1)
	End If
	'## Forum_SQL - Do DB Update
	strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
	strSql = strSql & " SET M_LASTHEREDATE = '" & fTime & "'"
	strSql = strSql & ",    M_LAST_IP = '" & UserIPAddress & "'"
	strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(UserName, "SQLString") & "' "
	my_conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end functionThen find the following on lines 807 and 991 of post_info.asp and on line 409 of register.asp:UserIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if UserIPAddress = "" then
	UserIPAddress = Request.ServerVariables("REMOTE_ADDR")
end ifAnd replace it with the following:UserIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if UserIPAddress = "" or Left(UserIPAddress, 7) = "unknown" then
	UserIPAddress = Request.ServerVariables("REMOTE_ADDR")
elseif InStr(UserIPAddress, ",") > 0 then
	UserIPAddress = Left(UserIPAddress, InStr(UserIPAddress, ",")-1)
elseif InStr(UserIPAddress, ";") > 0 then
	UserIPAddress= Left(UserIPAddress, InStr(UserIPAddress, ";")-1)
end if
if InStr(UserIPAddress, ":") > 0 then
	UserIPAddress = Left(UserIPAddress, InStr(UserIPAddress, ":")-1)
end if |  
                      | 
  Search is your friend “I was having a mildly paranoid day, mostly due to the
 fact that the mad priest lady from over the river had
 taken to nailing weasels to my front door again.”
 |  
                      | Edited by - Shaggy on 18 July 2007  04:40:23
 |  
                      |  |  | 
              
                
                |  Topic  |  |