Forum question

This forum is a place to talk about AGDI games and projects.

Moderators: adeyke, VampD3, eriqchang, Angelus3K

Post Reply
Message
Author
greensenshi
Knight Status
Posts: 218
Joined: Mon Jan 29, 2007 12:22 am

Forum question

#1 Post by greensenshi » Tue Mar 18, 2008 9:17 pm

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?

MusicallyInspired
The Master of All Things Musical
Posts: 4030
Joined: Tue Aug 20, 2002 8:57 pm
Location: Manitoba, Canada

#2 Post by MusicallyInspired » Tue Mar 18, 2008 9:38 pm

Yes, that is annoying.

Pidgeot
Defense Minister Status
Posts: 736
Joined: Tue Sep 17, 2002 2:54 pm
Location: Kolding, Denmark
Contact:

#3 Post by Pidgeot » Wed Mar 19, 2008 6:47 pm

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

greensenshi
Knight Status
Posts: 218
Joined: Mon Jan 29, 2007 12:22 am

#4 Post by greensenshi » Wed Mar 19, 2008 6:55 pm

So it's the code, and not something the admins control.  Okay, thanks for the responses.  

*agrees with Pidgeot*

User avatar
Gronagor
Saurus Salesman
Posts: 3881
Joined: Tue Sep 03, 2002 3:18 pm
Location: South Africa (Bloemfontein)

#5 Post by Gronagor » Wed Mar 19, 2008 9:24 pm

I'm pretty curious how phpBB3 managed to find a solution for this problem. It seemed like an impossible task to me.

Brainiac
Royal Vizier Status
Posts: 2055
Joined: Thu Mar 18, 2004 6:20 am
Location: Somewhere in Ohio...
Contact:

Other fish already

#6 Post by Brainiac » Wed Mar 19, 2008 10:13 pm

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!

Anonymous Game Creator 2
The Prince of Shapeir
Posts: 8887
Joined: Tue May 08, 2001 4:12 am
Location: Phobos
Contact:

#7 Post by Anonymous Game Creator 2 » Thu Mar 20, 2008 2:12 am

You know trout is a fresh water fish, don't you? (Well, unless you're referring to the Coral Trout).

Brainiac
Royal Vizier Status
Posts: 2055
Joined: Thu Mar 18, 2004 6:20 am
Location: Somewhere in Ohio...
Contact:

Realization

#8 Post by Brainiac » Thu Mar 20, 2008 5:12 am

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

Pidgeot
Defense Minister Status
Posts: 736
Joined: Tue Sep 17, 2002 2:54 pm
Location: Kolding, Denmark
Contact:

#9 Post by Pidgeot » Thu Mar 20, 2008 12:53 pm

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.

User avatar
Gronagor
Saurus Salesman
Posts: 3881
Joined: Tue Sep 03, 2002 3:18 pm
Location: South Africa (Bloemfontein)

#10 Post by Gronagor » Thu Mar 20, 2008 7:00 pm

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.)

Pidgeot
Defense Minister Status
Posts: 736
Joined: Tue Sep 17, 2002 2:54 pm
Location: Kolding, Denmark
Contact:

#11 Post by Pidgeot » Thu Mar 20, 2008 9:17 pm

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.

User avatar
Gronagor
Saurus Salesman
Posts: 3881
Joined: Tue Sep 03, 2002 3:18 pm
Location: South Africa (Bloemfontein)

#12 Post by Gronagor » Fri Mar 21, 2008 11:09 am

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.

MK
Peasant Status
Posts: 40
Joined: Thu Mar 13, 2008 8:21 am

#13 Post by MK » Sat Mar 22, 2008 3:54 am

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.

Post Reply