Author |
Topic  |
|
leatherlips
Senior Member
   
USA
1838 Posts |
Posted - 26 March 2006 : 21:29:58
|
I've noticed an odd behavior in my forum regarding the log in process.
If I am simply browsing the forum without logging in and then go to the default.asp page to login, I am taken back to the last topic I viewed. Should't it take me back to the default.asp page?
I've only noticed this happening after I installed the Referer MOD. Is this a glitch in that MOD or is it something else entirely? |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 26 March 2006 : 21:47:49
|
Yes, it's a consequence of the mod.
If you want to try to avoid it, change line#75, inc_header.asp, so that it looks like this:
If (StrComp(Session("CurrentPage"),strRefScriptName)<>0) or ( ((InStr(Session("CurrentPage"),"default.asp")=0) and (InStr(strRefScriptName,"default.asp")=0)) ) Then
Let me know if it fixes it. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
Posted - 26 March 2006 : 21:55:04
|
Thanks for the quick response. I guess I'll live with it as it isn't that terrible of a glitch. It's better than having some of my users not being able to properly use the forum due to thier firewalls.
I'll try your edit and let you know what happens. |
Edited by - leatherlips on 26 March 2006 21:56:58 |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
leatherlips
Senior Member
   
USA
1838 Posts |
Posted - 26 March 2006 : 22:23:56
|
I'm sorry, but I'm not exactly sure where to put your code at.
Here is the code for the Referer MOD:
'############### Referer Mod ############# strRefScriptName = "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("PATH_INFO") 'added by me
If Len(Request.QueryString) > 0 Then strRefScriptName = strRefScriptName & "?" & Request.ServerVariables("QUERY_STRING") End If
If StrComp(Session("CurrentPage"),strRefScriptName)<>0 Then If (InStr(Session("CurrentPage"),"post_info.asp")=0) and (InStr(Session("CurrentPage"),"post.asp")=0) Then Session("LastPage") = Session("CurrentPage") End if Session("CurrentPage") = chkString(strRefScriptName, "refer") End If strReferer = Session("LastPage")
If (InStr(strReferer,"register.asp")<>0) Then strReferer = "default.asp" End If '##########################################
Which line is the place to insert your code? I'm just a copy and paste kind of guy... I'm guessing its the part in bold? |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
leatherlips
Senior Member
   
USA
1838 Posts |
Posted - 27 March 2006 : 18:13:51
|
Ruirib,
I changed the code as you suggested, but it still does not fix the bug. I'll guess I'll just have to live with it. Thank you for your time. |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 27 March 2006 : 18:58:03
|
Sorry, my code had a mistake. This one works:
If (StrComp(Session("CurrentPage"),strRefScriptName)<>0) or ( ((InStr(Session("CurrentPage"),"default.asp")<>0) and (InStr(strRefScriptName,"default.asp")<>0)) )
Anyway, if you login from another page you will experience a similar situation, so I don't think there is a big advantage in changing this... |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
Posted - 27 March 2006 : 19:37:43
|
Thank you. That one worked. However, the Then was needed at the end. I like this because now whatever page they are on at the time they decide to login will be the page they come back to.
As long as this still works for the users who are behind the firewall then this MOD is working like I like it. (I have no way to test for those users). |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
|
Topic  |
|