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

unread topics logic

Discussion in 'XenForo Development Discussions' started by Marc, Jun 11, 2011.

  1. Marc

    Marc Well-Known Member

    Hi guys,
    Trying to help out a user who would like to put unread topics from a specific forum in another area of his forum. Have been looking through the tables to see how I could get this, and have come up with the following:

    SELECT * FROM `xf_thread` T
    LEFT JOIN xf_thread_read TR ON TR.thread_ID = T.thread_id AND
    > TR.thread_read_date
    WHERE T.node_id = 22 AND TR.User_ID = 1
    Which I thought would give me all the topics I had not read withing a specific forum. In this case the forum with node_id of 22. Now Im guessing I am missing something here, possibly a table. As if I click to mark the whole forum as read, this does not reduce my query to 0 which is what I expected. Please could someone enlighten me as to what I am doing wrong?
  2. Marc

    Marc Well-Known Member

    Ooooo shiny functions xenforo_Model_Thread=>getUnreadThreadIds($userId,array $fetchOptions = array())
  3. ragtek

    ragtek Guest

Share This Page