Author |
Topic |
leatherlips
Senior Member
USA
1838 Posts |
Posted - 30 March 2006 : 19:32:32
|
I am having a small problem with this MOD. Some of my members are not being updated in the MOD. For example, it will say they last visited 3 days ago even though they posted today. What could be causing this? I had one of my members that this affects delete his cookies and log back in, but it still says he last visited 3 days ago. |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 31 March 2006 : 07:14:34
|
Are they logging in? Or just entering their username and password on post.asp when posting?
|
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.” |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 31 March 2006 : 10:44:58
|
quote: Are they logging in? Or just entering their username and password on post.asp when posting?
That's probably it. I had the same problem with one of the people over at Warsong Records. He just kept entering his info in on post.asp when he posted - since he never logged in, it never updated his profile. (I spoke with him and he never noticed the big login boxes.... sigh)
Maybe this is something to consider for future releases? If somebody posts without logging in it still updates the last time they were here? |
|
|
leatherlips
Senior Member
USA
1838 Posts |
Posted - 31 March 2006 : 11:36:03
|
Good call. That's most likely the issue. I'll email the member to confirm it.
Is there a way to configue Snitz so that if a user logs in to post that they will be officially logged in? I've been to some other forums that behave this way. I think this would be a good thing for Snitz to be able to do. |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 31 March 2006 : 16:43:00
|
I wouldn't think that it would be all that hard to do... |
|
|
Nertz
Junior Member
Canada
341 Posts |
Posted - 31 March 2006 : 17:27:13
|
quote: Originally posted by leatherlips
Is there a way to configue Snitz so that if a user logs in to post that they will be officially logged in? I've been to some other forums that behave this way. I think this would be a good thing for Snitz to be able to do.
leatherlips, this is how I did it... redirects the user to login.asp and then returns to post.asp with the user logged in.
Find these lines in post.asp
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_subscription.asp"-->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<!--#INCLUDE FILE="inc_func_posting.asp"-->
<%
Beneath them add this block of code
'#### [Require Login to Post - NJP addon] ##############################################
if mLev = 0 then
Err_Msg = "<li>You must be logged in before you can post to the forums." & _
" <ul><li>If you are a registered member and already have a valid userID and password, please wait 10 seconds to be re-directed to the login page.</li>" & _
" <li>Otherwise click on the register link below to obtain your very own UserID and Password. Registration is Free.</li></ul></li>" & vbNewLine
Response.Write "<p align=""center"" style=""margin-top:20px; margin-bottom:15px;""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There Is A Problem!</font></p>" & vbNewLine & _
"<table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <br /><a href=""policy.asp""" & dWStatus("Register to post to our forum...") & " tabindex=""-1""><acronym title=""Register to post to our forum..."">Register</acronym></a><br />" & vbNewline & _
" <br /><a href=""JavaScript:history.go(-1)"">Cancel and Return to Previous Page</a><br />" & vbNewline & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table><br /><br />" & vbNewLine
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
if Request.QueryString <> "" then
Response.Write "<meta http-equiv=""Refresh"" content=""8; URL=login.asp?target=" & lcase(scriptname(ubound(scriptname))) & "?" & Request.QueryString & """>" & vbNewLine
else
Response.Write "<meta http-equiv=""Refresh"" content=""8; URL=login.asp?target=" & lcase(scriptname(ubound(scriptname))) & """>" & vbNewLine
end if
WriteFooter
Response.End
end if
'#### [/Require Login to Post - NJP addon] ##############################################
You will also need a little fix to login.asp found here
cheers, Nat |
Sadly, most Family Court Judges wrongfully reward opportunistic gold diggers that use our children unjustly as "instruments" of power.
www.fathers-4-justice-canada.ca |
|
|
leatherlips
Senior Member
USA
1838 Posts |
Posted - 31 March 2006 : 18:15:18
|
Thank you! That works great! One question, how can I increase the amount of time before it is redireced? Also, is it possible to add a link to the login page at the bottom like the Register and Cancel links? |
|
|
squad23
Starting Member
Netherlands
40 Posts |
Posted - 31 March 2006 : 18:44:27
|
Response.Write "<meta http-equiv=""Refresh"" content=""8; Changing content will increase the amount of time |
|
|
Nertz
Junior Member
Canada
341 Posts |
Posted - 31 March 2006 : 20:52:15
|
You're welcome |
Sadly, most Family Court Judges wrongfully reward opportunistic gold diggers that use our children unjustly as "instruments" of power.
www.fathers-4-justice-canada.ca |
|
|
leatherlips
Senior Member
USA
1838 Posts |
Posted - 31 March 2006 : 22:26:18
|
I tried to add the link to the login page myself, but I am getting an error message. Here is what I added:
" <br /><a href=""login.asp""" & dWStatus("Click here to Login to the forum") & " tabindex=""-1""><acronym title=""Click here to login to the forum"">Click here to Login</acronym></a><br />" & vbNewline & _
I added this just above :
" <br /><a href=""policy.asp""" & dWStatus("Register to post to our forum...") & " tabindex=""-1""><acronym title=""Register to post to our forum..."">Click here to Register</acronym></a><br />" & vbNewline & _
When I click on the Click here to Login link, I get the following error:
Microsoft VBScript runtime error '800a0009'
Subscript out of range: '[number: 1]'
/forum/login.asp, line 90
What part of what I added is wrong? Thanks.
I suspect it has something to do with this change I made in the login.asp page:
WriteFooter Response.End end if else tmpTarget = trim(chkString(request.ServerVariables("Query_String"),"SQLString")) strTarget = (split(tmpTarget,"target=",-1,1))(1) end if
I added this change as suggested above before I decided to add the login link. |
Edited by - leatherlips on 31 March 2006 22:49:08 |
|
|
Nertz
Junior Member
Canada
341 Posts |
Posted - 01 April 2006 : 08:47:48
|
Leatherlips, I don't think the problem is what you added, the error message points to a problem with login.asp. I just checked on mine, and sure enough I must have missed something. Bear with me, I'll figure it out.
|
Sadly, most Family Court Judges wrongfully reward opportunistic gold diggers that use our children unjustly as "instruments" of power.
www.fathers-4-justice-canada.ca |
|
|
Nertz
Junior Member
Canada
341 Posts |
Posted - 01 April 2006 : 09:29:51
|
Leatherlips, the problem is indeed in the modifications in login.asp. Back when I did that, I was so into passing multiple query string values to the target that I forgot to take into account what would happen if there wasn't any. Anyways, this is what you need to do: Replace these two lines (approx line 89-90 according to your error posted)
tmpTarget = trim(chkString(request.ServerVariables("Query_String"),"SQLString"))
strTarget = (split(tmpTarget,"target=",-1,1))(1)
With this...
tmpTarget = trim(chkString(request.ServerVariables("Query_String"),"SQLString"))
if inStr(tmpTarget,"target=") then
strTarget = (split(tmpTarget,"target=",-1,1))(1)
else
strTarget = ""
end if
Let me know how that worked, so I can edit/update the login.asp post.
cheers, Nat |
Sadly, most Family Court Judges wrongfully reward opportunistic gold diggers that use our children unjustly as "instruments" of power.
www.fathers-4-justice-canada.ca |
|
|
leatherlips
Senior Member
USA
1838 Posts |
Posted - 01 April 2006 : 09:42:37
|
Nertz,
That fixed the problem. I guess the only thing that would make it even better would be to have the added login link have the user go to the login page and then be redirected to their post like it does automatically if it redirects itself. |
|
|
Nertz
Junior Member
Canada
341 Posts |
Posted - 01 April 2006 : 10:06:21
|
I don't know why you needed to add the extra link, but that link you added has no forum/post information and therefore don't know where to redirect. The original mod would if the user is not logged in and attempts to post a new topic or reply, redirect to login.asp after 8 secs, and after he logs in will be redirected back to post.asp in the correct forum/reply. You could shorten or lengthen the 8 sec., my audience are slow readers and didn't want to miss anything on the error message.
The original login.asp could not handle multiple query string parameters to target post.asp, so that's what the changes to login.asp were for. |
Sadly, most Family Court Judges wrongfully reward opportunistic gold diggers that use our children unjustly as "instruments" of power.
www.fathers-4-justice-canada.ca |
|
|
leatherlips
Senior Member
USA
1838 Posts |
Posted - 01 April 2006 : 11:22:11
|
The reason I wanted to add the login link was because I'd like to give the users another option to login without having to wait for the redirect.
My thinking is, the first time they encountered the error message, they would want to be able to read it all. For me, 8 seconds isn't enough time so I changed it to 15 seconds.
On a later visit, if they encountered the error message, they wouldn't necessarily need or want to read it again because they would have already become familiar with it. Therefore, they may not want to wait 15 seconds. The login link would allow them to just "click and go".
I like what you have done and am using it on my site. I just think for the reason I stated above, that the additional login link would enhance it that much more.
Quote: that link you added has no forum/post information and therefore don't know where to redirect
Is there a way to make the link behave so it can redirect with the forum/post information? |
Edited by - leatherlips on 01 April 2006 11:29:33 |
|
|
Nertz
Junior Member
Canada
341 Posts |
Posted - 01 April 2006 : 11:45:42
|
Ah yes, I see what you want, good idea! Short circuit the wait time. I think that can be done, but I can't today... if you can wait a day or so, otherwise someone else step in here.
Nat |
Sadly, most Family Court Judges wrongfully reward opportunistic gold diggers that use our children unjustly as "instruments" of power.
www.fathers-4-justice-canada.ca |
|
|
Topic |
|