Basically my solution is built on few prerequisites -
- I have only one board and completely dumped forum front page and linking directly to forum.php?c=board&id=1 for all forum interaction
- I have limited number of users (~70), not sure how my solution would work with thousands users and then I guess it would not be the best for sure
- I have limited number of threads, more or less, meaning user can create new topic, but I try to moderate and move related stuff to existing topics, again with thousands or maybe even hundreds of topics, db desing shall probably be different.
For DB part - I've extended cpg_fr_topics with following
- each topic has additional columns `id_x` where x = UID and it holds `last_msg_id` of topic when user last visited topic
- additional row `topic_id` = 0 which holds in `last_msg_id` time of absolute last message and each `id_x` holds time of last visit to forum.php?c=board&id=1
Now, if `id_x` < `last_msg_id` for `topic_id` = 0 then main gallery menu is highlighted so user knows new posts are present in the forums - see forum_highlight.png
Once main menu is clicked, those topics with new post are marked with red icon - see forum_unread.png ... also users is the redirected to the first unread post in the particular topic.
I can post the code as well, but as I mentioned it's quite mess and I made it for my needs, but should be able to go through git and find relevant parts in few days once I have some more time.
cheers