Author |
Topic  |
|
spg
Starting Member
26 Posts |
Posted - 15 November 2002 : 19:32:06
|
I have had some users in my forum ask for a First Unread Post feature. What they want is a link where instead of taking them to the last post in a topic, they can go to the first post in the topic that they haven't read. vBulliten has a similar feature to this.
Now I am an ASP programmer, but I'm not familiar enough with the code of Snitz to be able to add a feature like this. What would I have to go through to program a feature like this? |
~Spencer Owner-Editor of TabletPCBuzz.com Microsoft MVP - Tablet PC |
|
Gremlin
General Help Moderator
    
New Zealand
7528 Posts |
Posted - 15 November 2002 : 19:37:54
|
There is a similar feature called "Jump to Last Post" already built into version 3.4 of Snitz Forums this automatically links to the last post of each thread. What version are you currently running ? |
Kiwihosting.Net - The Forum Hosting Specialists
|
Edited by - Gremlin on 15 November 2002 19:38:45 |
 |
|
spg
Starting Member
26 Posts |
Posted - 16 November 2002 : 22:00:55
|
Yeah, I know it is similar. I am running the latest version (3.4.03). What they want though is slightly different. Instead of just the jump to the last post in the topic, they want to jump to the first post in the topic that they haven't read yet.
So for example say that I posted here, left the site and came back 5 hours later. In that time 10 people responded to my post. Now, what they want is a link that will take them to the first post that was posted after I left. Make sense? |
~Spencer Owner-Editor of TabletPCBuzz.com Microsoft MVP - Tablet PC |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 16 November 2002 : 22:40:41
|
Yeah, I guess it does make sense. One thing you'll need to do that is the value of the last visit date by the user, kept in the M_LASTHEREDATE field in the FORUM_MEMBERS table. What I would do is create the link so that invokes topic.asp with a special querystring value, say, mode=FirstUnread, and when the mode has that value, when querying for the replies, just query for the very first one after the last visit date (which also includes time), and get its ID (admit, FirstUnreadReplyID). Then just redirect the user to the very same topic, like this: topic.asp?TOPIC_ID=SameTopicIDAs Before#FirstUnreadReplyID.
Beware that this will only produce true results, if the users click the Mark All Read Topics just before leaving the forum. Otherwise the last visit date will keep the start time of their last visit to the forum, leaving all the posts made since as "unread" posts, even if they have been read by the user. Snitz does not take note of the read posts, it just uses the last visit date. To avoid this "annoyance" I always click the Mark All Read button in active.asp before leaving the forum. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
James
Average Member
  
USA
539 Posts |
|
spg
Starting Member
26 Posts |
Posted - 25 November 2002 : 16:37:11
|
Thanks for the information ruirib. I think I have it working now. Really fairly simple to code once you know how snitz stores the information. Thanks again. |
~Spencer Owner-Editor of TabletPCBuzz.com Microsoft MVP - Tablet PC |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
|
Topic  |
|