Alert Count

Unmaintained Alert Count 1.4

No permission to download
This update adds a new option in [Options -> User Alerts] to set a different automatic polling interval (how often the alerts automatically update) for visitors on mobile devices.

Since mobile visitors are less likely to heavily monitor their browser tabs, you can reduce server load by using a higher automatic polling interval to check less frequently or by disabling it by setting it to zero so it only checks on page load. However, you can set them the same if you want to.

For better detection of mobile devices, this add-on is compatible with (but does not require) the add-on Browser Detection by Cédric Claerhout. If that add-on is not available, it will fallback to XenForo's built-in mobile detection, which may not be as accurate.

(I also updated the screenshot of the options page in the add-on resource overview, because it was very outdated.)
  • Adds an option to choose what format to use for the alert count in the page title including:
    • (3) Name of Page
    • [3] Name of Page
    • *3* Name of Page
    • 3 – Name of Page
    • 3 • Name of Page
  • Script is now minified to a smaller size by keeping the code out of the global namespace.
This update applies a minor compatibility fix that may resolve certain issues for third-party styles or responsive views.

It also adds a new feature which allows you to restrict alert counts to only appear in the page title for users or user groups who have the "Receive alert counts in page title" permission. This is useful if you wish to restrict the alert counts feature as a premium user group perk using User Upgrades.

If you don't need this new feature, the default behavior is to show alerts for everybody anyway, as long as the "override permissions" option is checked in [Options -> User Alerts]. That way the add-on still works "out of the box," and you only need to fiddle with permissions if you DO want to restrict its use to certain users or groups.
This is a compatibility fix which allows Alert Count to work on forums running Defer JS, TaigaChat* (keep reading), and certain other add-ons and styles which the previous version was incompatible with.

Although it is a huge code overhaul, it does not add any new features. So if you are not having compatibility problems, you do not need to bother upgrading, although it shouldn't hurt anything if you do.

Compatibility with add-ons like TaigaChat is not enabled out of the box! You MUST go to [Options -> User Alerts] and enable "aggressive mode" for compatibility with TaigaChat or any other add-on which modifies the page title. Aggressive mode allows Alert Count to aggressively keep exclusive control of the page title so that no other add-ons are allowed to change it.

Aggressive mode is turned off by default because it results in marginally more client-side script execution in order to combat the other add-on, and that extra work isn't necessary if Alert Count is the only add-on that manipulates the page title. So only use aggressive mode if you experience problems with the title updating correctly on some or all pages of your forum.

Let me know if there are any issues in this version.
  • Like
Reactions: dethfire