Page 1 of 1

Forum question

Posted: Tue Mar 18, 2008 9:17 pm
by greensenshi
If I log in, and see new posts, but don't have time to read them all, when I log back in later in the day, those posts are no longer listed as new, even though I never clicked on them.  Is there a way to change this?

Posted: Tue Mar 18, 2008 9:38 pm
by MusicallyInspired
Yes, that is annoying.

Posted: Wed Mar 19, 2008 6:47 pm
by Pidgeot
Sadly, phpBB2 is designed like that. phpBB3 has fixed this, but I can't say when AGDI have planned an upgrade (if they've planned one at all).

Personally, I believe whoever thought of that idea should be dragged into a dark alley and slapped with a large trout. :p

Posted: Wed Mar 19, 2008 6:55 pm
by greensenshi
So it's the code, and not something the admins control.  Okay, thanks for the responses.  

*agrees with Pidgeot*

Posted: Wed Mar 19, 2008 9:24 pm
by Gronagor
I'm pretty curious how phpBB3 managed to find a solution for this problem. It seemed like an impossible task to me.

Other fish already

Posted: Wed Mar 19, 2008 10:13 pm
by Brainiac
Pidgeot wrote:Personally, I believe whoever thought of that idea should be dragged into a dark alley and slapped with a large trout. :p
Not the trout again - there are LITERALLY other fish in the sea, people!

Posted: Thu Mar 20, 2008 2:12 am
by Anonymous Game Creator 2
You know trout is a fresh water fish, don't you? (Well, unless you're referring to the Coral Trout).

Realization

Posted: Thu Mar 20, 2008 5:12 am
by Brainiac
Anonymous Game Creator 2 wrote:You know trout is a fresh water fish, don't you?
You know I'm paraphrasing an old proverb, don't you? :p

Posted: Thu Mar 20, 2008 12:53 pm
by Pidgeot
Gronagor wrote:I'm pretty curious how phpBB3 managed to find a solution for this problem. It seemed like an impossible task to me.
It's a very simple thing: Instead of just storing a timestamp and saying "all posts made after that timestamp are unread, the rest are read", you just store the post IDs that have been read on a per-user basis (or the last post ID per thread - I don't know the exact model they chose).

It takes more database space, yes, but it's way more user-friendly.

Posted: Thu Mar 20, 2008 7:00 pm
by Gronagor
The point is, they didn't do that from the start because of the space it takes.

Imagine if every page viewed by every member on this forum were stored... that would be an enormous amount of data. I don't think that's what they've done.

(they didn't just use a 'timestamp' previously as you mentioned... then the 'new' sign would have dissapeared for all the other new posts once you've viewed the first one. They already used a 'server-side cookie' in this case.)

Posted: Thu Mar 20, 2008 9:17 pm
by Pidgeot
I simplified my explanation of the phpBB2 system a bit for those who aren't familiar with web development, but to clarify...

phpBB2 stores a timestamp for each user in the corresponding database table. This timestamp is updated whenever the user access a page.

When the user starts a new session, phpBB reads out the value and stores it as a session variable. It flags all posts made after that timestamp as unread, and has an internal management (again, stored in the session) of what you read during the session (so it can unmark the posts as you read them).

I'm not familiar enough with the phpBB code to know exactly how they handle it in phpBB3, but as far as I can tell, they have two tables for tracking this; one for the entire forum, and one for individual topics. That way, if a user marks everything as read, it'll only take up one row per forum (approximately 16 bytes/row). How it manages things beyond that, I can't say.

Also note that the old method is still available in phpBB3, if you're REALLY concerned about the space taken.

Posted: Fri Mar 21, 2008 11:09 am
by Gronagor
Cool.  Good to know then.

They probably made it so that the table gets 'purged' of older 'unviewed flags' after a certain number of days (which is probably selected by the forum-admin as well). Interesting.

Posted: Sat Mar 22, 2008 3:54 am
by MK
Pidgeot wrote:
Gronagor wrote:I'm pretty curious how phpBB3 managed to find a solution for this problem. It seemed like an impossible task to me.
It's a very simple thing: Instead of just storing a timestamp and saying "all posts made after that timestamp are unread, the rest are read", you just store the post IDs that have been read on a per-user basis (or the last post ID per thread - I don't know the exact model they chose).

It takes more database space, yes, but it's way more user-friendly.
Its a little more complex then that because those posts that are marked read, are indicated as read. So what you get is oldest unread post (per thread) - read post (per thread). Also there is a compromise to keep the overall size down. Anything older then three months will be marked as read the next time someone logs in. Its also saved as a BLOB which has the effect of compressing the string into a much smaller space. Running it on a few sites, the performance of phpbb3 is acutely better in my experiences on the same hardware. That I believe has to do more with a much better storage structure, so there is less complex calls to the database. From my experiences on this site, you could run phpbb3 with no problems.