Persisent topic marking has been something that’s often been requested across various forums. Until now, most systems relied on cookies to mimic a reliable system. To a point, this is fine but the usual problems with cookies plague the system; unreliable storage, easy corruption and them not being shared across computers.
IPB 2.0.0 introduced a semi-DB method where topics that you’ve read were added to a database but this didn’t do anything for forum markers which still relied on a mixture of cookies and your last visit date (which itself is problematic).
IPB 2.1 has a system where both the read topics and forum marker information is stored in the database.
Now, before you run for the hills shouting "bloat, inefficient, it’ll make IPB too slow!" - you might want to understand how the system works.
The system is based around Remco’s wonderful system for the Invision Blog software. It’s hard to convert the code into English, so I won’t bother. Suffice to say that it doesn’t take up much more resources than IPB 2.0.0s system and in fact, it’s probably a touch more efficient. Infrequently it needs to determine how many topics are unread in the forum and it runs a COUNT(*) query on the topics table. This is all indexed so full table scans, temporary tables and filesorts are all avoided. It doesn’t do this on every page view and I estimate that it will only do it for 10% of the topics you’ll read. It avoids the need to query the database for topics you’ve read which avoids a rather nasty ‘range’ query. I’ve also removed the filesort operation when in the forum view, so overall IPB 2.1 should be more efficient than IPB 2.0.3 even with this new marking system.
This system also means that you don’t have to view a forum first to get your unread topics synchronised. If there was only one new post/topic in the forum and you went straight to it from the board index and went back to the board index, the forum marker will be marked as read.
Naturally, for those who wish to squeeze every ounce of performance out of their board, this system can be switched off and it’ll go back to using cookies.
In other news, a less exciting use of Ajax has been implemented in the ACP. It’s rather basic at the moment, but it’s a nice little touch to avoid large page refreshes. I’ve included a little movie of this feature in action. I might make the final implementation much more fancy with each row written with a cross or other icon and convert it to a tick when it’s complete.
I think that there’s a fair bit of bandwidth to be saved using this method. Oh, and to that crazy guy over on the vB forums who is determined to prove that anything with Ajax in it is massively bloated and likely to crash your browser. Wise up, dude. It’s just a few lines of javascript, it’s not loading a java sized program into your memory.
I’ve also added a little movie of IPB 2.1’s wonderful new inline editing and moderation. It just doesn’t get easier than this to manage your forums.
ACP Ajax refresh (Quicktime .mov file, 1mb)
In-line moderation and editing (Quicktime .mov file, 4.8mb)
Working in the ACP (Quicktime .mov file, 5.1mb)
Recent Comments