Interesting bug with the 'new/unread posts' feature

Interesting bug with the 'new/unread posts' feature

General — Page [1]
phoenix_r

2009 May 13 • 905
17 ₧
So you browse your merry little way over to the supes forum, where you are stylishly logged in. You are presented with yellow boxen next to various subforum names informing you that there are new trucks and/or posts in that subforum. So you browse on and read the shit out of those trucks and/or posts. Then you go back to the main forum page and lo and behold, the box is still there! Click one more time on the subforum, confirm that nobody posted anything since you last viewed the subforum, and then go back to the main forum page. At that point the box is gone, as well it should be. Perhaps this flag is being set a bit late, on a poor condition, or some places where it should be checked are being missed. I'm not sure if it only happens when you go to the main page straight from a truck, or if it also happens going from the subforum to the main page. THANKS. m(*u*)m

EDIT: posting this thread reminded me of another aspect of this. The yellow boxen occur even when the only new truck/post was made by you. After my initial post of the above, I went back to the main page of the forum and BAM, yellow box next to 'Requests.' I know I posted, I hardly need a yellow box confirming it. DOUBLE THANKS.
BOO
 
 
 
2010 Oct 8 at 17:22 UTC — Ed. 2010 Oct 8 at 17:25 UTC
Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
2007 Oct 19 • 5486
57,583 ₧
I imagine the forumses don't know that you haven't seen all the posts because the function that checks that is only called at a certain point, or at certain times. For instance, I browse using the back buttons on my mouse, because it's easier. But sometimes the pages don't load properly, something something something. Also sometimes if you spend too long on the post screen the yellow squares disappear.
 
 
 
2010 Oct 8 at 23:02 UTC
Jake?!

2008 Sep 3 • 198
34 ₧
I can verify this has happened to me
?!
 
 
 
2010 Oct 11 at 21:18 UTC
SuperJer
Websiteman

2005 Mar 21 • 6666
Yes, yes. It is borken.

It turns out it is really hard to do this stuff correctly.

Well, correctly and efficiently.

The inefficient way is to store, for every user, the read/not-read status of every single truck/post. Obviously that's a bit too much data to sling around and do lookups on.

So instead it only stores the timestamp of your most recent viewing of each truck and each area since you logged in. If there's posts newer than your last-viewed timestamp in the truck or area, you get the yellow box.

So it needs a lot of work to be smarter.

I can fix the your-own-posts-make-trucks-yellow problem by updating the last-viewed timestamp when you post, but then it will miss if someone slipped in before you.

The areas-are-yellow-until-you-click-them problem is a bitch. I don't want the forams to have to read through all the trucks in the DB to get the right status. I have to come up with something clever.

(I actually didn't know any of this until I just now dug around in my $_SESSION. I wrote all this code many years ago.)
 
 
 
2010 Oct 11 at 21:59 UTC
buq25

2008 Jul 5 • 583
295 ₧
superjer said:
I actually didn't know any of this until I just now dug around in my $_SESSION. I wrote all this code many years ago.

If that wouldn't have been there, I would have feared. A nerd isn't somebody who can program alot, a nerd is somebody who remembers every line of code he has ever done.
Today's post brought to you by the letter: "heck".
 
 
 
2010 Oct 12 at 14:38 UTC
sprinkles

Chrome Whore
2009 Sep 6 • 2547
10 ₧
superjer said:
(I actually didn't know any of this until I just now dug around in my $_SESSION. I wrote all this code many years ago.)

Where is this? Rather what's the name of the php?
 
 
 
2010 Oct 12 at 15:37 UTC
Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
2007 Oct 19 • 5486
57,583 ₧
I'm not sure I understand why only sometimes, if you use the back functionality, the yellow boxen remain.
 
 
 
2010 Oct 13 at 02:29 UTC
sprinkles

Chrome Whore
2009 Sep 6 • 2547
10 ₧
Down Rodeo said:
I'm not sure I understand why only sometimes, if you use the back functionality, the yellow boxen remain.

Doesn't that jus' use your cache?
 
 
 
2010 Oct 13 at 03:24 UTC
Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
2007 Oct 19 • 5486
57,583 ₧
 
 
 
2010 Oct 13 at 23:13 UTC
sprinkles

Chrome Whore
2009 Sep 6 • 2547
10 ₧
Down Rodeo said:
Kind of, but sometimes the forums demand a refresh.

Doesn't that answer your question?
 
 
 
2010 Oct 14 at 01:31 UTC
SuperJer
Websiteman

2005 Mar 21 • 6666
The forums don't care if you refresh the index page. It's probably just your browser.

You have to view a section/area or a truck to get the yellow boxen to change.
 
 
 
2010 Oct 14 at 01:58 UTC
Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
2007 Oct 19 • 5486
57,583 ₧
Ah, so sometimes the browser says "reload this page when press back" and sometimes it doesn't... I see. I think. Bloody Mozilla! You know, I was trying to view some locally-written MathML the other day, and it turns out Firsfox will only do that if it got the file from the interwebs.
 
 
 
2010 Oct 15 at 01:11 UTC
Rockbomb
Dog fucker (but in a good way now)

2009 Nov 14 • 2045
This just in: Mellow's "names" truck is stuck yellow-dotted for me
 
 
 
2010 Nov 9 at 19:08 UTC
melloyellow582
The Original Portmanteau

Brisk.
2005 Mar 22 • 12862
666 ₧
Suck it.
 
 
 
2010 Nov 9 at 19:10 UTC
Rockbomb
Dog fucker (but in a good way now)

2009 Nov 14 • 2045
I'd like to point out that this isn't just an issue with SJ's forums, but forum softwares such as vBulletin and PHPBB also do this.
 
 
 
2010 Nov 24 at 02:22 UTC
the_cloud_system
polly pushy pants

2008 Aug 1 • 3081
-6 ₧
i open them in new tabs as i go through the bullitons, and it does it.
I drink to forget but I always remember.
 
 
 
2010 Nov 24 at 02:51 UTC
Page [1]