1 (edited by bedroom 2012-12-11 20:41)

Topic: [Update] Track topics in database 1.0.2

Download here (version 1.0.2)

This is simply a repackaging of my extension, with the manifest file changed to support the latest PunBB version, as everything just worked when I tested it.

TL;DR : When you read a new topic, PunBB marks it as read in a tracking cookie, which is fine if you always visit your forum from the same computer. This extension tracks the topics in the database instead, so you don't see old topics highlighted when you've already read them on another device.

Reposting the blurb that I wrote for the initial release :

(License : WTFPL)

Back in the days of PunBB 1.2, new posts were highlighted until you logged out (or timed out), even when you had read them (unless you used this mod). PunBB 1.3 improved this by keeping track of the posts you read in a tracking cookie, which is simple enough but not suited to my needs.

In the default installation, PunBB is configured with a visit timeout of 10 minutes, which means that you have to read all the new posts right away : if you go take a walk or something for 20 minutes, you'll lose track of everything you hadn't read.

To accomodate my users who like to idle all day long but not miss one post, my PunBB board is set up with o_timeout_visit = 86400 (24 hours). Problem is, some of us log in from different locations during the day (home, office, iPhone) and so posts that we have read are marked as new (because the cookie is different)

With this extension, your read posts are stored in the database (new column "tracked_topics" in the "users" table)

You could say that my extension corrects a self-inflicted problem, and you'd be right, but maybe a PunBB board admin somewhere needs it too, so there it is.

- This extension might hurt your database performance a tiny bit (count 1 more UPDATE query for each topic view by each user)
- Not useful if your o_timeout_visit is lower than 1 or 2 hours, or if each of your users only has one computer
- Just after installing the extension, users currently logged in will see some already read messages reappear as new : this is perfectly normal since the new tracking has to start somewhere ! Everything will be back to normal once the users mark those messages as read.
- You might want to fix your board and get rid of this bug while you're at it (suggested fix inside)


Re: [Update] Track topics in database 1.0.2

Thanks, I was really looking for extension like that because I have many troubles with the current PunBB topics tracking system.

Re: [Update] Track topics in database 1.0.2

Great! Thank you very much. Very usefull.