[AddonsLab] Unread Post Count

xF2 Add-on [AddonsLab] Unread Post Count 1.6.0

No permission to download
The package optimizes the query for fetching unread posts as recommended by @XFA

As we already fetch the nodes in a separate query, no additional query was required.

Thank you!
  • Like
Reactions: BattleKing
This release resolves an issue with the expired cache not being rebuilt on the fly. Now the expired cache is updated immediately when a user visits the board after a long time of inactivity.
  • Like
Reactions: adama
The release implements support for node permissions View threads by others and View thread content. Users not having these permissions for a particular node will not see the posts in that node as unread.

In this release, we have also solved the issue with the unread counter being empty on the first page load due to a missing cache.

The release has breaking changes in its code, so if you are using the product in any way other than the officially suggested callback AL\UnreadPostCount\Callback::getUnreadPostCount, please review your custom code using the service CounterService.
The release implements support for node permissions View threads by others and View thread content. Users not having these permissions for a particular node will not see the posts in that node as unread.

In this release, we have also solved the issue with the unread counter being empty on the first page load due to a missing cache.

The release has breaking changes in its code, so if you are using the product in any way other than the officially suggested callback AL\UnreadPostCount\Callback::getUnreadPostCount, please review your custom code using the service CounterService.
Due to migration to a new caching strategy, a bug was introduced that would not change unread post count badge when the user reads an unread post.

Please note, that the product has an option Unread Post Count Cache (Minutes) in the option group Threads, discussions and conversations which defines how long unread post counts should be cached. If caching is not desired, and you want your users to always immediately see the number of unread posts, just set this option to 0. Caching is highly recommended for large websites, for at least as short as 1 minute, as executing an aggregation query on each page load may increase server load considerably.
  • Like
Reactions: BattleKing
This release fixes a bug that caused the unread post count badge not to be shown immediately after login. The issue was caused by storing cached information in the session which would reset with every logout/login. Now the cache is stored in the registry and is rebuilt only once per user and when the cache expires for the given user.
  • Like
Reactions: BattleKing
The release changes the way unread post count is loaded from the database, delaying the query till the page is fully generated and sent to users. Because of it users will see the out-of-date count for one more page load, but on the next load, they will see the updated data, without any effect on the speed of generation of the data. Just as before, the query does not happen on every page, but only when the cache is out of date.

This will also resolve the cases when MySQL error might be thrown if add-on callback is called while a query is in progress, trigger error
Code:
MySQL fetch error [2014]: Commands out of sync
The release fixes an issue causing many SQL queries when the number of unread posts is rebuilt for the user, particularly reproduced when using Tapatalk, but may affect other cases as well.
Top