- XF 兼容性
- 2.3.x
- 2.2.x
- Summary
- Thread Notice is a high-performance add-on for XenForo that enables administrators and moderators to pin important threads into an interactive Notice Slider, providing a clean interface with customizable labels, category badges, and pagination controls, while maintaining native styling and seamlessly integrating with the platform.
Thread Notice is a high-performance add-on for XenForo that enables administrators and moderators to pin important threads into an interactive Notice Slider, providing a clean interface with customizable labels, category badges, and pagination controls, while maintaining native styling and integrating with the platform
- A clean "Pin to Notice Slider" / "Unpin from Notice Slider" action link is integrated directly into the thread's More options (...) dropdown menu.
- Seamless AJAX switching with data-xf-click="switch": toggles the link label and state instantly with a confirmation toast message without page reloads.
- Uses a dedicated database table (xf_fx_thread_notice) and an indexed column on xf_thread.
- Looks and feels like a native XenForo Notice block/slider with a modern aesthetic:
- Notice Badge: Customizable label (📌 Notice, Featured, Hot, News...).
- Forum Category & Thread Author: Displays the category badge alongside the thread author's avatar.
- Thread Title: Clickable link pointing directly to the discussion.
- Clean Content Snippet: BBCode-stripped multi-line excerpt preview.
- "View Thread" CTA button for quick access.
- When 2 or more threads are pinned, it transforms into an interactive carousel:
- Smooth slide rotation with configurable intervals.
- Previous (<) and Next (>) arrow controls.
- Dot pagination indicators showing active and total slides.
- Pause on mouse hover & resume on mouse leave.
- Full mobile touch swipe support.
- Dismiss button (×) allowing members and visitors to hide the notice for their current browsing session.
| Setting | Type | Default | Description |
|---|---|---|---|
| Enable Notice Slider fx_thread_notice_enable | Boolean | Enabled | Toggle the notice slider globally across the forum. |
| Display Location fx_thread_notice_location | Radio | All pages | Choose between displaying on All pages or Forum list only. |
| Autoplay Slides fx_thread_notice_autoplay | Boolean | Enabled | Automatically rotate pinned thread slides in the carousel. |
| Slide Interval fx_thread_notice_interval | Number | 5s | Configurable rotation interval between 2 and 60 seconds. |
| Allow Dismiss fx_thread_notice_dismissible | Boolean | Enabled | Displays a close button (×) for users to dismiss the notice. |
| Notice Badge Text fx_thread_notice_badge_text | Text | Notice | Customizable label shown on the badge (e.g. Notice, News, Important). |
| Color Style fx_thread_notice_style | Select | Primary | Choose from Primary, Accent, Subtle, or Dark (fully styled for light and dark themes). |
- Zero Extra Queries: When no threads are pinned, zero extra queries run on normal page loads thanks to caching in XenForo SimpleCache.
- View Permission Enforced: Automatically checks filterViewable() so users never see notices for threads located in nodes they lack permission to view.
- Granular Moderator Permission: Dedicated permission flag Pin / unpin thread to notice slider (fxPinThreadNotice) under Forum Moderator Permissions.
- XenForo: 2.2.0 or higher (fully compatible with XenForo 2.3.x).
- PHP: 8.0.0 or higher (PHP 8.0 - 8.3+).
- Database: MySQL 5.7+ / MariaDB 10.3+.
- Go to Admin CP > Add-ons.
- Click Install / upgrade from archive.
- Select the FX-ThreadNotice-1.0.0.zip package and click Upload.
- Confirm and follow the installation prompt.
- Upload the FX/ThreadNotice directory to your XenForo server at:
<web_root>/src/addons/FX/ThreadNotice - Navigate to Admin CP > Add-ons and click Install under [FX] Thread Notice.
php cmd.php xf:addon-install FX/ThreadNotice