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
 Odd Login Behavior
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

leatherlips
Senior Member

USA
1838 Posts

Posted - 26 March 2006 :  21:29:58  Show Profile  Visit leatherlips's Homepage
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  Show Profile  Send ruirib a Yahoo! Message
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
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 26 March 2006 :  21:55:04  Show Profile  Visit leatherlips's Homepage
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
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 26 March 2006 :  21:56:34  Show Profile  Send ruirib a Yahoo! Message
Sorry, if you want, give a try to the code change I just posted. I think it will fix your problem.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 26 March 2006 :  22:23:56  Show Profile  Visit leatherlips's Homepage
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?
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 26 March 2006 :  23:17:42  Show Profile  Send ruirib a Yahoo! Message
Just replace this part:

If StrComp(Session("CurrentPage"),strRefScriptName)<>0 Then


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 27 March 2006 :  18:13:51  Show Profile  Visit leatherlips's Homepage
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.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 27 March 2006 :  18:22:44  Show Profile  Send ruirib a Yahoo! Message
Are you sure? I will give it a test, too.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 27 March 2006 :  18:58:03  Show Profile  Send ruirib a Yahoo! Message
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
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 27 March 2006 :  19:37:43  Show Profile  Visit leatherlips's Homepage
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).
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 27 March 2006 :  20:03:55  Show Profile  Send ruirib a Yahoo! Message
Yeah, I missed the Then while copying and pasting.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.38 seconds. Powered By: Snitz Forums 2000 Version 3.4.07