UBB.Dev
Posted By: PhotoPost Read Unread? - 07/12/2003 1:34 AM
Anyone coded something to display unread messages (versis past X days)?
Posted By: dimopoulos Re: Read Unread? - 07/12/2003 12:16 PM
I don't think so but it would be a great modification.
Posted By: omegatron Re: Read Unread? - 07/12/2003 1:38 PM
I went searching but see nothing like this Michael.
Posted By: cstaber Re: Read Unread? - 07/14/2003 1:14 AM
I was *JUST* about to ask for this...
How do you add a link where it searches and grabs all unread/new posts...then displays them by date...would be extreemly useful!
[]https://www.ubbdev.com/threads/php/uploads/panels/9999-2174.png[/]
Posted By: JoshPet Re: Read Unread? - 07/14/2003 1:35 AM
I know it hasn't been done. We had a similar discussion about it - but there are some issue with trying to do it I belive. Here is the related thread.

I don't fully understand how the last post thing works. I know Rick has said that it's not really tracked on a per post basis. Thus it's actually the postlist.php page that marks the post read. That's why sometimes viewing the forum marks all the post in it read. He said it'd be too intense on large forums to track each post.
Although sometimes this appears to behave like it's individually being tracked. So......

Often viewing a post from the "last post by" link does not mark it read - because you bypass the postlist page. So if you had a page to display all the unread posts.... reading them from there probably wouldn't mark them read, as you're skipping the forums postlist page.

But it would be very cool if someone could make it work. I just don't think with the current architecture it would work correctly.
Posted By: cstaber Re: Read Unread? - 07/14/2003 3:57 AM
SO why not grab the date/time info in U_LastOn and then search for all posts AFTER that...of course it wouldn't be accurate up to the second as I don't think U_LastOn is updated every second...but it'de be pretty close!
Posted By: JoshPet Re: Read Unread? - 07/14/2003 6:21 AM
I think U_LastOn is updated with each page load as part of the send_header function. So if you visit the site - it should get updated. It won't necessarily be the last time you were there - I think it'd be closer to the current time.

That other thread is all about "new since last visit" and how that's not really possible given how LastOn is handled.

Plus, like I said - I don't think reading them from there would necessarily mark them as read - so then you'd go to the main index and they'd all still be marked as unread. It might be quirky if you are bypassign the mechnism to mark the posts read.

Although it's not a perfect system now. I know that using the last post link often does not mark the post read. But if you are reading a post and click a link to a post in another forum.... often the whole forum will get marked as read.

So if this were tracked on a per post basis - it woudl be doable. But I dont' think threads tracks it like that. It would be much too slow on large sites.

I don't know how it could be done, but I think it would have to play off the w3t_Last table which I *think* typically keeps track of the last thread you've read in each forum and go from there.

Maybe Rick can enlighten us with more details of how this post tracking works.... or if he can figure it out.... include it in 6.4.
Posted By: cstaber Re: Read Unread? - 07/14/2003 11:17 AM
yeahhh 6.4
Posted By: PhotoPost Re: Read Unread? - 07/14/2003 3:15 PM
[]I don't know how it could be done, but I think it would have to play off the w3t_Last table which I *think* typically keeps track of the last thread you've read in each forum and go from there. [/]

I guess I'd have to research that because it doesn't seem right. If I read a message and go back to the index, it does properly show that one message as having been read and the other unreads remain highlighted. It I recall, there is a TempRead variable which is being used, although I'm not sure how. So, there is some level of tracking going on at the message level, I'm just not sure how.
Posted By: Astaran Re: Read Unread? - 07/14/2003 3:19 PM
Congrats, you'll dig into the most complex part of threads.

If I remember correctly the postings should be marked on a "per page" base in showflat.php.
In showthreaded, only the actual posting is marked as read.
Posted By: JoshPet Re: Read Unread? - 07/14/2003 5:47 PM
My head always hurts when I look at the new post tracking part.
Posted By: PhotoPost Re: Read Unread? - 07/14/2003 8:25 PM
I fear helping as I might end up in the Hero's list with my mug plastered on this site. :lol:
Posted By: JoshPet Re: Read Unread? - 07/14/2003 8:47 PM
he he
Yup - you do this one and we'll make you a graemlin.
Posted By: Rick Re: Read Unread? - 07/14/2003 11:20 PM
So does mine

That is definitely the most complex part of .threads. I hate adding any feature where I have to alter any portion of the post tracking!
© UBB.Developers