Page 1 of 1

Forum "New Posts Since Last Login" function

Posted: Thu Mar 18, 2004 1:49 pm
by phice
I'm having a hard time breaking down how phpBB, vBulletin, and other message boards actually do their "New Posts!" notification on the front page (or board view).

If you could help me out, that'd be fantastic. (if you need any more information, send me a PM)

Don

Posted: Thu Mar 18, 2004 2:14 pm
by patrikG
For phpbb its a mod from a site call smartor-is-root.com - but it seems that the DNS Namesever entry is invalid, simply can't connect. It was open source, try googling for it.

Posted: Thu Mar 18, 2004 4:42 pm
by phice
I don't mean the last 10 posts or whatever that was.

In example, go to index.php and for each board, it shows an image for each board (either 'new posts' or 'no new posts'). I'm trying to figure out how they do that.

Posted: Thu Mar 18, 2004 5:12 pm
by m3mn0n
I think it's a standard phpBB feature, since they all come with a "View posts since last visit" link on the main page.


This is just a wild guess but, maybe it records the expiration of the session for that user (as a timestamp). And when the forum session is started again, a current timestamp is compared to one within that users logged last session time. Then the db pulls all posts created within that time frame. Just a thought. :wink:

Posted: Thu Mar 18, 2004 5:59 pm
by penguinboy

Posted: Thu Mar 18, 2004 6:01 pm
by d3ad1ysp0rk
I think sami hit it on the nail ;)

Posted: Thu Mar 18, 2004 6:38 pm
by penguinboy
It depends on how you want to mark a topic as read.

Personally I prefer to only mark topics that I have accually viewed;
because I don't always have time to view all posted topics.

Posted: Thu Mar 18, 2004 7:10 pm
by phice
Basically do a SELECT DISTINCT threadid FROM posts WHERE postdate >= usersession_timestamp

But once the person has viewed the posts in a certain forum, the 'New Posts' icon goes away. :?