1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Thread Read cutoff date

Discussion in 'XenForo Questions and Support' started by AndyB, Jul 21, 2013.

  1. AndyB

    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.
  2. Amaury

    Amaury Well-Known Member

    I'm interested in knowing how this works myself.

    Sometimes we are taken to the last new post even if we've never read the thread before.
  3. Jeremy

    Jeremy XenForo Moderator Staff Member

    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)
    AndyB and Amaury like this.
  4. AndyB

    AndyB Well-Known Member

    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.


    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.
  5. Jeremy

    Jeremy XenForo Moderator Staff Member

    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.
  6. Amaury

    Amaury Well-Known Member

    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:

    I figured you could answer it -- if you don't mind, of course.
  7. Jeremy

    Jeremy XenForo Moderator Staff Member

    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: Jul 22, 2013
    Amaury likes this.

Share This Page