I'm curious how does SMF handle unread topics? Does it store in the database? Where in the database? Does it use timestamps? I've spent an hour looking through SMF tables trying to figure it out. I was trying to set something up on my phone with a small android application.
I can't figure it out. I've tried searching but I've only ran into results talking about people not having their Show unread posts not working.
{$prefix}_log_topics is used to mark which topics are read. IDK how it works when marking whole subforums or everything read, but it's not done here.
I guess that is the only way to do it but it seems heavy on the server. So everything stored here is read? Or unread?
It's read. When you open a topic, it adds an entry in there. e.g. When you edit the last post in the topic, SMF will mark that post for everybody else as unread by updating that entry so it looks like the topic is unread (the message ID is set to one less than the last message in the topic). I know that part because that's what I had to code myself back then so editing the last post in a topic would bump it.