[FX] Trending Tags allows forum administrators and moderators to effortlessly spotlight hot topics, breaking events, popular search keywords, and crucial links. Engineered with a XenForo standard Multi-tier Caching architecture, it delivers lightning-fast page loads with 0 database queries during member browsing.
# Or rebuild add-on data:
php cmd.php xf-addon:rebuild FX/TrendingTags
src/addons/FX/TrendingTags/
├── Entity/
│ └── Tag.php # Entity representing xf_fx_trending_tag table with lifecycle cache hooks
├── Pub/Controller/
│ └── Trending.php # Controller handling frontend Edit form and tag saving
├── Repository/
│ └── Tag.php # Repository managing queries and XF Cache / SimpleCache methods
├── Widget/
│ └── TrendingTags.php # Widget handler for trending tags widget
├── _data/
│ ├── options.xml # Configuration options (toggle nav bar & management groups)
│ ├── option_groups.xml # fx_trending_tags option group
│ ├── phrases.xml # Language phrases
│ ├── routes.xml # Route for trending-tags
│ ├── templates.xml # Templates for tag bar, edit form modal & LESS
│ ├── template_modifications.xml # Template modification inserting tag bar into PAGE_CONTAINER
│ └── widget_definitions.xml # Widget definition for fx_trending_tags
├── addon.json # Add-on metadata (v1.0.4)
├── hashes.json # SHA256 file integrity verification
├── Listener.php # Callback listener inserting tags bar under navigation
├── Setup.php # Installer creating xf_fx_trending_tag table & uninstallation cleanup
└── logo.png # Add-on logo
Key Features
1. Full-Width Trending Tags Bar Under Navigation
- Automatically displays an engaging trending keywords bar directly beneath the main navigation bar (PAGE_CONTAINER).
- Modern UI labeled with an energetic flame badge (fa-fire), featuring smooth horizontal scrolling across all viewports (Mobile, Tablet, Desktop).
- Seamless native compatibility with both Light and Dark modes.
2. Dedicated Trending Tags Widget
- Provides Widget Definition ID: fx_trending_tags, ready to place into any widget location across your forum (Portal/Home sidebar, thread lists, thread view, etc.).
- Allows administrators to customize the widget title and FontAwesome icon directly from AdminCP.
3. Direct Frontend Management (Modal Overlay)
- Members with designated permissions will see a quick management gear icon (fa-cog) right next to the tags bar.
- Clicking opens an interactive management popup:
- Add New: Add unlimited tags with title, URL, and display order.
- Edit: Update title, URL, or modify display priority (display_order).
- Delete: Instant one-click deletion of expired tags.
- Auto Sync: Frontend widgets and bars update immediately upon saving without needing AdminCP intervention.
4. High-Performance Multi-tier Caching
- Tier 1: XF Cache Provider (\XF::app()->cache()):
- Automatically caches tag lists in high-performance backends like Redis, Memcached, or APCu if configured on the server.
- Tier 2: XF SimpleCache (\XF::app()->simpleCache()):
- Persists directly inside XenForo's autoload registry.
- Ensures that even on servers without Redis/Memcached, the add-on still achieves 0 database queries across all pages because the tags list is preloaded into RAM on XenForo startup.
- Real-Time Invalidation & Rebuild:
- Powered by Entity Lifecycle Hooks (_postSave, _postDelete) in Entity\Tag: Any time a tag is added, modified, or deleted via the frontend modal, API, or CLI script, cache layers are invalidated and rebuilt instantly.
Configuration & Permissions
1. Options (AdminCP > Options > [FX] Trending Tags)
| Option (Option ID) | Data Type | Default | Description |
|---|---|---|---|
| fx_tt_show_under_nav | Boolean (On/Off) | On | Automatically inserts the trending tags bar under the main navigation bar (before page content). |
| fx_tt_allowed_groups | User Groups (Multi-select) | Empty | User groups permitted to click the edit gear icon and manage trending tags on the frontend. |
2. User Group Permissions
- Permission: [FX] Manage Trending Tags (Group: General permissions).
- Allows granular permission delegation to specific user groups or individual users via XenForo's standard permission system.
Installation & Upgrade
Install via AdminCP:
- Upload the FX/TrendingTags folder to src/addons/FX/TrendingTags/.
- Go to AdminCP > Add-ons, locate [FX] Trending Tags and click Install.
- Go to AdminCP > Options > [FX] Trending Tags to select allowed management groups.
- Log in as an authorized user, visit the homepage, and click the gear icon to add your first trending tags.
Install / Rebuild via Command Line (CLI):
php cmd.php xf-addon:install FX/TrendingTags# Or rebuild add-on data:
php cmd.php xf-addon:rebuild FX/TrendingTags
Add-on Directory Structure
src/addons/FX/TrendingTags/├── Entity/
│ └── Tag.php # Entity representing xf_fx_trending_tag table with lifecycle cache hooks
├── Pub/Controller/
│ └── Trending.php # Controller handling frontend Edit form and tag saving
├── Repository/
│ └── Tag.php # Repository managing queries and XF Cache / SimpleCache methods
├── Widget/
│ └── TrendingTags.php # Widget handler for trending tags widget
├── _data/
│ ├── options.xml # Configuration options (toggle nav bar & management groups)
│ ├── option_groups.xml # fx_trending_tags option group
│ ├── phrases.xml # Language phrases
│ ├── routes.xml # Route for trending-tags
│ ├── templates.xml # Templates for tag bar, edit form modal & LESS
│ ├── template_modifications.xml # Template modification inserting tag bar into PAGE_CONTAINER
│ └── widget_definitions.xml # Widget definition for fx_trending_tags
├── addon.json # Add-on metadata (v1.0.4)
├── hashes.json # SHA256 file integrity verification
├── Listener.php # Callback listener inserting tags bar under navigation
├── Setup.php # Installer creating xf_fx_trending_tag table & uninstallation cleanup
└── logo.png # Add-on logo
License & Credits
- Brand: FX Add-on Suite
- Compatibility: XenForo 2.3.0 or higher
- Source: Exclusively developed for XenForo systems.
Pour consulter le contenu, vous devez : Se connecter ou S'inscrire.
Pièces jointes
