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

Fixed SMF Importer doesn't transfer PM read-message state

Discussion in 'Resolved Bug Reports' started by jeffwidman, Dec 15, 2014.

  1. jeffwidman

    jeffwidman Active Member

    Just migrated a big board from SMF --> Xenforo and users complained that they can't quickly mark all PM's as read.

    I don't think it's good idea to give them them that functionality--normally rather they have to read all PMs--but I do think the SMF importer could be updated to transfer message state for PM's.

    They manually are marking them read, and it's tolerable--5-10 minutes if they have a ton of PMs--so if this is a pain to implement, then just close...
    rainmotorsports likes this.
  2. rainmotorsports

    rainmotorsports Well-Known Member

    That would be a good thing. Can probably craft a quick SQL query to set all messages past a certain date to be marked as read to help lighten the load for your users though.
  3. jeffwidman

    jeffwidman Active Member

    Yeah, I thought about it, but board has been around since '01 and I know some folks haven't logged in in a while, so I'd prefer to only knock out really old messages.

    I'd like to just write a SQL query that just copies read state between old and new db...

    Anyone know the Xenforo table/columns that track this? Is it just the conversations table or are there multiple tables?
  4. LowWaterMark

    LowWaterMark Member

    It involves multiple tables to fully control read/unread state and position.

    Read or unread state is a flag, 'is_unread' (0 or 1), in the 'xf_conversation_user' table. But, the position of where in the conversion the member has read to is stored as a timestamp, 'last_read_date' field, in the 'xf_conversation_recipient' table.

    If a person has read the whole conversation, the is_unread field should be '0' and the last_read_date value will be the same timestamp as the 'last_message_date' field from the 'xf_conversation_master' table.

    If the conversation is totally unread by the member, then is_unread will be '1' and last_read_date timestamp will be '0'.

    If there are some read and unread messages in a conversation, is_unread will be '1' and last_read_date will be the timestamp of the last message they actually read in the conversation.
    jeffwidman likes this.
  5. Liam W

    Liam W Well-Known Member

    You can quickly mark all conversations as read in XF? Unless you've changed something...

  6. Daniel Hood

    Daniel Hood Well-Known Member

    I assume you mean following these steps:

    - check box
    - select all
    - mark read

    That's fine, only works for the ones on that page though. I have 16 pages of conversations here, imagine if none of them had the "read" information, I'd have to do those steps 16x. There is no "Mark All Read" button or feature.
    jeffwidman likes this.
  7. jeffwidman

    jeffwidman Active Member

    Yeah, it's not a huge deal, and normally a "mark all read" button doesn't make sense to me for PM's, just immediately post migration...
  8. Brogan

    Brogan XenForo Moderator Staff Member

  9. Chris D

    Chris D XenForo Developer Staff Member

    Some changes have been made here to explicitly mark the message as read if it is marked as read in the SMF database.
    jeffwidman likes this.

Share This Page