[AH] Discord Widget

[AH] Discord Widget 3.0.3

No permission to download
Sorry for the multiple updates. Stuck at home, with nothing else to do. 🤷‍♂️

This release adds new features:
  1. Adds new option for a scrollable members list.
  2. Adds option to change how many members appear in the online list. Options are between 1 and 100, due to limitations of Discord's JSON API. I do not recommend setting this to more than 15-20, unless you are using the scrollable members list or have the members list collapsed by default
  3. Will now do a better job of filtering out bot users like "a...." or "b..."
  4. JavaScript code is significantly cleaned up and refactored to be more efficient.
Scrollable member list enabled
Screenshot 2025-06-28 at 13-33-50 XenForo.webp

Attachments

  • Screenshot 2025-06-28 at 13-20-25 AH Discord Widget altBoards - Admin control panel.webp
    Screenshot 2025-06-28 at 13-20-25 AH Discord Widget altBoards - Admin control panel.webp
    47.7 KB · Views: 21
This update brings a couple of new features
  1. Option to move online member count to widget title
  2. Option to disable showing how many more users are online "+xyz more..."
  3. Fixed issue where "+xyz more" would get cut off with many users
Screenshot 2025-06-27 at 12-04-59 XenForo.webp
Due to the limitations of Discord's JSON API, they will only show the first 100 members online. So if you have 100 or more members online, it will show the first 20 in the list, and then "+ 80 more" no matter how many more members are online.

Here is an example: This server has almost 30,000 people online, but the online member list will show a maximum of 100.

Screenshot 2025-06-26 at 22-45-59 XenForo.webp

But they do have a presense_count that will show the true number of how many user's are online. I've reworked the logic to go based off the presense_count instead. Here is what that looks like.
Screenshot 2025-06-26 at 22-41-24 XenForo.webp
XENFORO 2.3 ONLY

This add-on has been completely rewritten from JQuery to Javascript in order to be XF 2.3 compatible. It also redesigned to be more appealing and blend into your existing style.

Please note this add-on only functions through Discord's JSON API. Whatever is listed on that API, is what will show.

The JSON API ONLY supports voice and text channels. No threads, no categories, no stages.
Screenshot 2025-06-26 at 14-54-37 XenForo.webp
Screenshot 2025-06-26 at 14-59-55 XenForo.webp
This release doesn't do much except a couple of things. The last release included some files I was testing on my development site by accident. This update removes them. I apologize about.

  • Changed the add-on file path from ahDiscordWidget to AH\DiscordWidget to keep in line with my other add-ons. You may delete ahDiscordWidget after updating.
  • Changed the add-on icon to Font Awesome 5.
This new release requires XenForo 2.1.x.
  • Like
Reactions: Gator
This update fixes an XSS vulnurability that allows the user to put HTML elements in their statuses which will display on your site. Any elements such as <div>, <img>, <script>, etc will be removed.

If you're using this add-on, please update at the earliest convenience.
This release only changes the way the javascript is handled on the page. You don't necessarily need to upgrade, but it is recommended.

Please follow the standard add-on upgrading procedure.

The license terms for this add-on has changed. If you run a commercially active XenForo installation, you must purchase a license to use this add-on. More information is available at the bottom of the overview page.
This release adds one new feature.
  • Option to position the join button in the title of the widget to help save vertical space.
Please follow the standard add-on upgrading procedure.

Attachments

  • Screenshot (24).webp
    Screenshot (24).webp
    7.6 KB · Views: 138
  • Screenshot (25).webp
    Screenshot (25).webp
    8.4 KB · Views: 88
This release adds a couple new features/changes
  • Added a new style property for the Join Server button. The .button class is already automatically applied so it looks like all your other buttons, but if you want to differentiate it from all the other buttons, this new style property is available.
  • Added a new "View Discord Widget" permission as requested by @Ignite.
  • Added a new template modification so the JS script is called at the bottom of the page.
  • Changed the height rule of the All Users List to max-height so that if you have very few users on, there won't be a significant amount of space after the last user. This was a misthought in the last release.
Please follow the standard add-on upgrading procedure.
Back
Top Bottom