Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MiniMOD - Update Last Here Date
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

muzishun
Senior Member

United States
1079 Posts

Posted - 17 January 2008 :  11:39:51  Show Profile  Visit muzishun's Homepage  Reply with Quote
Currently, the forum does not update your last here date when you post while logged out. This can cause the last here date and last post dates to be out of sync. This miniMOD fixes that issue (which technically isn't a bug, but to me it's a bit odd).

In post_info.asp, find this code around lines 1847-1853:

case else
Response.Write("Have a nice day!")
end select
Response.write "</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & strReturnURL & """>" & strReturnTxt & "</a></font></p>" & vbNewLine
else
Response.write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There has been a problem!</font></p>" & vbNewLine & _

Make that look like this by adding the code in red:

case else
Response.Write("Have a nice day!")
end select
Response.write "</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & strReturnURL & """>" & strReturnTxt & "</a></font></p>" & vbNewLine
If blnUpdateLastVisited Then
UpdateLastHereDate DateToStr(strForumTimeAdjust),strDBNTUserName
End If

else
Response.write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There has been a problem!</font></p>" & vbNewLine & _

Then find this code around lines 60-67:

if strAuthType = "db" and strDBNTUserName = "" and len(Request.Form("Password")) <> 64 then
strPassword = sha256("" & Request.Form("Password"))
else
strPassword = ChkString(Request.Form("Password"),"SQLString")
end if

if strAuthType = "db" and strDBNTUserName = "" then
strDBNTUserName = Request.Form("UserName")

Make that look like this by adding the code in red:

blnUpdateLastVisited = False
if strAuthType = "db" and strDBNTUserName = "" and len(Request.Form("Password")) <> 64 then
strPassword = sha256("" & Request.Form("Password"))
blnUpdateLastVisited = True
else
strPassword = ChkString(Request.Form("Password"),"SQLString")
end if

if strAuthType = "db" and strDBNTUserName = "" then
strDBNTUserName = Request.Form("UserName")

Basically what this does is adds a boolean value at the beginning that checks if we're hashing a password (this only happens if the user enters their password, meaning they aren't logged in when they post). Then, at the end of the whole process, the forum checks that boolean value, and if it's true, updates the last here date.<

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 17 January 2008 :  12:11:10  Show Profile  Visit HuwR's Homepage  Reply with Quote
it was designed that way for a reason , and if you look at the way the forum deals with "active topics since your last visit" you will understand why


it is kind of like coming to your house and posting a note through your mailbox, does that mean I visited you ? no, it doesn't.<
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 17 January 2008 :  13:16:38  Show Profile  Visit muzishun's Homepage  Reply with Quote
That's a good point, and I know the forum was designed that way on purpose. However, occasionally people will browse/post without logging in, and then the next time they log in, they're shown topics that they have already seen. This gives people the option to remove some of that confusion (albeit adding a little of it's own).

Thinking about your mailbox analogy, I may not even implement this in my own forum, but at least the code is here if someone else down the road decides they want it.<

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 17 January 2008 :  13:27:09  Show Profile  Visit HuwR's Homepage  Reply with Quote
agreed there will always be people who want it to behave a different way.<
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 18 January 2008 :  04:45:16  Show Profile  Reply with Quote
What I've done on a couple of sites that have more to them than forums is add an extra field to the members table that holds the date they were last seen on the site with the forum's lastheredate only being updated if they hit the forums while logged in. Although all those sites require registration so they can't get to post.asp without being logged in, I've still added some code to post_info.asp that will update the date they were last seen on the site if they post when not logged in, just in case the admins ever turn off the registration requirement.

<

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.”
Go to Top of Page

davemaxwell
Access 2000 Support Moderator

USA
3020 Posts

Posted - 18 January 2008 :  07:02:46  Show Profile  Visit davemaxwell's Homepage  Send davemaxwell an AOL message  Send davemaxwell an ICQ Message  Send davemaxwell a Yahoo! Message  Reply with Quote
quote:
Originally posted by muzishun

That's a good point, and I know the forum was designed that way on purpose. However, occasionally people will browse/post without logging in, and then the next time they log in, they're shown topics that they have already seen. This gives people the option to remove some of that confusion (albeit adding a little of it's own).



Makes sense, but then to keep the active topics functionality from breaking for those that are logged in, I'd only apply it to the forum for those users that are not logged in. If the user is logged in, I wouldn't apply this functionality.<

Dave Maxwell
Barbershop Harmony Freak
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 18 January 2008 :  09:17:21  Show Profile  Visit muzishun's Homepage  Reply with Quote
quote:
Originally posted by davemaxwell

quote:
Originally posted by muzishun

That's a good point, and I know the forum was designed that way on purpose. However, occasionally people will browse/post without logging in, and then the next time they log in, they're shown topics that they have already seen. This gives people the option to remove some of that confusion (albeit adding a little of it's own).



Makes sense, but then to keep the active topics functionality from breaking for those that are logged in, I'd only apply it to the forum for those users that are not logged in. If the user is logged in, I wouldn't apply this functionality.


That's what the MOD does. It only updates the lastheredate when the user posts while not logged in.<

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07