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


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


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.


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?
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.

Liam W

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


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.


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

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.