The "Go to first new post" button (such as in User CP) and the "View First Unread" link at the top of each page in a thread page have somewhat confusing (but not completely unfathomable) behavior. I've spent some time over the past few days trying to grok it all, and I believe I have fathomed the depths well enough to explain what is being observed.
- User CP:
Always the first post in the thread since your last visit to ScubaBoard, regardless of how many times you view the thread during your current visit.
.
- View First Unread on any page of a thread other than the page containing the first unread post since you last read the thread:
On any page other than the current page, the View First Unread link will operate like the "Go to first new post" button on User CP, i.e. go to the first post since your last visit to ScubaBoard.
.
- View First Unread on the page of a thread in which is the first unread post since you last read the thread:
If there is a new post since the last time you read the thread in the current session, and if that post is on the current page, the View First Unread link on that page will go to the first unread post in the thread.
For example, on page 1 of the MiFlex Hot Deal, if I click the View First Unread link, I'll be sent to post 49 (which is the first post since I was on ScubaBoard last night). If, on the other hand, I click the View First Unread link on the last page, I'll be sent instead to post 57 (which is new since the last time I checked the thread a few minutes ago).
For the purposes of the User-CP-behavior links, the "first new post" or "first unread" is defined as "the first post in the thread since your last visit". Visits (sessions, if you will) are delineated by periods of inactivity. If you have long uninterrupted sessions (i.e. you're browsing many threads all morning until you finally walk away at lunch), the User-CP-behavior will keep bringing you back to the first post since the time the session prior to your current session ended, regardless of the fact that you may have previously read that post. (Again, if you click to the proper page and use that page's "View First Unread" link, you'll go to the first unread post since you last viewed the thread, regardless of whether that was the current session.)
For the current-page "View First Unread", the system likely uses the contents of the "bbthread_lastview" cookie (although without a copy of vB, I can't verify). For the User CP and non-current-page new post/first unread behavior, the contents of the "bblastvisit" cookie are used instead.
So, in summary, the noted odd behavior is caused by vB curiously defining what constitutes new/unread posts. The system uses two different, conflicting definitions. The simple definition (used except on the current page of a given thread) is certainly easier to program, but the proper definition must certainly exist in code, given that it is indeed used on threads' current pages.
One more concrete example:
Right now, [thread=224151]Nearly drowned in the pool... But it was fun...[/thread] just had a new post (during my current session). The thread link shows up bold in User CP, with a "Go to first new post" button (the double-down arrow one). That button has the URL "http://www.scubaboard.com/forums/new-divers-those-considering-diving/224151-nearly-drowned-pool-but-fun-new-post.html" and sends me to
post 42 by jbd.
If I don't click that, instead just clicking to the last page of the thread (which, for me, is the only page -- I do 50/page), there is a same-looking button with "View First Unread" at the top of the thread box. That button and text link has the URL "http://www.scubaboard.com/forums/new-divers-those-considering-diving/224151-nearly-drowned-pool-but-fun.html#post3432514", which sends me directly to
post 44 by reddiver970, as it is a URL to an anchor on the currently-loaded page.
(Everybody got that?
)