I've noticed some poor accuracy in the little read/new icon to the left of each forum on the homepage. I've seen a 'NEW' message for the assembly forum quite a few times over the past few weeks, only to find there were no new posts there. AFAIK, ususally after visiting the forum, the icon on the homepage tells me I've read everything in the forum, as it should, but in the next few days, it says 'NEW' again when indeed there are no new topics.

Is this a known problem?

Recommended Answers

All 26 Replies

It is possible that the forum got a spam post, which is then deleted, but doesn't remove the read icon.

I did witness that once, but this is happening every day - is Daniweb really spammed that much?
If so, would it be too intensive to recompute the read/new status when a post is deleted?

this is happening every day - is Daniweb really spammed that much?

Yes, but if it's the Assembly forum every day, then I have no explanation.

would it be too intensive to recompute the read/new status when a post is deleted?

I'll let Dani answer that one.

Read/New status is computed in real time. There has to be a logic bug somewhere. Hmm, I'll investigate.

Still looking into the issue. However, I have just gone and removed the "feature" that marked an entire forum read if you viewed the last updated thread in the forum. So no more need to "work backwards" when browsing the list of threads to check out.

OK, I've investigated the algorithm to mark forums read, after not looking at it for over a year. Please bear with me while I try to explain:

  • A thread is marked as read if it has, indeed, been read, or if its forum has been marked read.
  • A forum is marked as read if there haven't been any new posts since you've clicked the 'Mark as Read' link.

Forum read/unread status is unrelated to whether or not there are individual threads within the forum that are marked as new. This would not be a feasable test for us given our current system, as we'd have to loop through all threads one at a time and determine their status, just to determine the status of the overall forum.

We attempted to imitate this behavior as closely as possible by implicitely marking a forum as read when you viewed the last updated thread in the forum. However, we have received negative feedback about doing so, so I just went ahead and reverted that.

OK, I think I came up with a better algorithm :)

After spending all day on this, I decided I can't give up so quick. Trying again.

After spending all day on this, I decided I can't give up so quick. Trying again.

Now that's the spirit! Keep working :D

I just had to do that :)

I think I got it figured out for the most part. Albeit not the most straight forward way :(

Now the clicking of read on the homepage doesn't work properly. If I click a forum in the list on the right and refresh the page, everything is marked new again.

Albeit not the most straight forward way :(

Our mark read algorithm was probably one of the most obtuse in the entire code base (excepting the editor parser which neither of us wrote). I don't imagine any solution would be straightforward. ;)

Now the clicking of read on the homepage doesn't work properly. If I click a forum in the list on the right and refresh the page, everything is marked new again.

I can't reproduce this.

I can't reproduce this.

Yes you can. How did you make it in the first place?

Huh????

You're able to reproduce the bug, Michael? Everything seems to be working fine for me?

You're able to reproduce the bug, Michael? Everything seems to be working fine for me?

Oh no... i was just motivating you to solve pritaeas's problem :D I personally don't see anything weird....

Okay, i tried to replicate pritaeas's problem... nothing happens that would be considered a problem....

Currently I cannot reproduce the same either (not on the same machine), but I do see another problem. See image. All left in the forum list are marked read, yet all in the main list are marked unread.

In that case, i can not replicate the problem...

See image. All left in the forum list are marked read, yet all in the main list are marked unread.

This is by design. It was determined at the time the feature was created that it would be too resource intensive to take marking a forum read into consideration on pages that are outside of a forum, and only individual article-read status will be taken into consideration in such places. However, I did a lot of tweaking to the algorithm yesterday, so I'll revisit this and see if it's more feasable now.

I was able to get it working on non-forum pages with the help of a huge ass SQL query I wrote yesterday.

Non-forum pages? What exactly does that mean?

But either way, it appears to be working. Awesome :)

Non-forum pages? What exactly does that mean?

Forum pages are when you're looking at the thread listing from the C++ forum, or the PHP forum, etc.

Non-forum pages are when you're looking at a thread listing from the homeapge, recently updated articles, or a page not tied to a specific forum.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.