XF 1.2 Thread Read cutoff date

AndyB

Well-known member
When we click a thread title it will either take us to the first post or the first unread post. This is dependent on the information stored in the thread_read table.

My question is, what is the cutoff point for the thread_read? I assume there's a cutoff because sometimes we are taken to the first post even though we have read the thread in the past.
 
The thread title functions in 1 of 2 ways:
  1. If the thread is unread, it takes you to the oldest unread post in the thread.
  2. If you have read the thread, the title will take you to the first post of the thread.
Clicking on a thread's start date will take you to the first post of the thread, regardless of thread read status. After 30 days, regardless of whether or not you have read the thread it will be marked as read. This is a default value, if you would like to make this longer or shorter, you can change the setting here:
ACP -> Options -> Threads, Discussions and Conversations -> Read Marking Data Lifetime (Days)
 
So if I understand correctly:

The last time I read a post in a thread is recorded in the thread_read table, but if that date is older than 30 days it will be ignored and I will be taken to the first post even if there are new post which I have not yet read.

Thank you for noting where to change this setting, King Kovifor.

pic001.webp

I assume it's set to 30 days so a cron can prune rows which are over 30 days and this helps keep this table from getting too large. Currently my thread_read table is about 6MB in size. I would assume by changing this to 300 days it will over time grow to about 60MB in size approximately.
 
Yes, in 30 days, this post will be marked as read for anyone who still hasn't read it. If you set it to 365 (for a year), it will track the unread status of this post for every user until today, next year.

The default setting is usually good enough for most forums that I've seen. And yes, it keeps the table size down.
 
Yes, in 30 days, this post will be marked as read for anyone who still hasn't read it. If you set it to 365 (for a year), it will track the unread status of this post for every user until today, next year.

The default setting is usually good enough for most forums that I've seen. And yes, it keeps the table size down.

I brought this question up myself quite a while ago here, and after you posted how it works, I posted that over there for the reference, and someone asked this:

Midnight Star said:
With your explanation of how it works it shouldn't do that. If you've never visited the thread before the oldest unread post should be the OP. It should only take you to the middle if you've gone on it before. That's more annoying when you've clicked on it accidentally or been linked previously to a post later in the thread which would make it think anything previously had been read. Likewise if you've forgotten the thread or had only flicked through it before BUT it should not take you randomly to the middle if it is your first time viewing the thread like you said.

I figured you could answer it -- if you don't mind, of course.
 
Well, this middle of the thread "issue" on first read can happen if you haven't read a thread that's older than the default cut off date. the only way to change how it works is with template modifications and not a per-user basis. Although, I'm sure it could be created as an add-on. A user can always click on the thread start date to get to the beginning of a thread.
 
Last edited:
Top Bottom