Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MiniMOD - Update Last Here Date

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
muzishun Posted - 17 January 2008 : 11:39:51
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.<
6   L A T E S T    R E P L I E S    (Newest First)
muzishun Posted - 18 January 2008 : 09:17:21
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.<
davemaxwell Posted - 18 January 2008 : 07:02:46
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.<
Shaggy Posted - 18 January 2008 : 04:45:16
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.

<
HuwR Posted - 17 January 2008 : 13:27:09
agreed there will always be people who want it to behave a different way.<
muzishun Posted - 17 January 2008 : 13:16:38
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.<
HuwR Posted - 17 January 2008 : 12:11:10
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.<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000 Version 3.4.07