tryhackx/flarum-homepage-blocks

Customizable homepage blocks for TryHackX - random movies, tracker stats, advanced filters

Maintainers

Package info

github.com/TryHackX/flarum-homepage-blocks

Language:JavaScript

Type:flarum-extension

pkg:composer/tryhackx/flarum-homepage-blocks

Statistics

Installs: 11

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

2.0.4 2026-05-30 21:18 UTC

This package is auto-updated.

Last update: 2026-05-30 21:27:26 UTC


README

A Flarum extension that adds powerful customisable homepage blocks: random-discussion buttons, tracker information panels, dual statistics (internal database + external OpenTracker), advanced discussion filters, custom links, content-validation overrides, and a reCAPTCHA-protected stats API.

Designed to plug cleanly into a tracker-style Flarum forum. Works hand in hand with the rest of the TryHackX extension family — tryhackx/flarum-topic-rating unlocks rating filters and sorts, tryhackx/flarum-magnet-link unlocks magnet click stats and sort, fof/discussion-views unlocks view counters / view-based sort.

Note: Recent updates target the 2.x line only. The 1.x branch (Flarum 1.8+) is no longer actively developed — it stays available for legacy installs but won't receive new features.

Screenshots

Mobile view of the discussion list across multiple TryHackX layout combinations

Mobile view — discussion list rendered with different combinations of TryHackX extensions (thumbnails + ratings + views, thumbnails + views, thumbnails only, ratings only, views only, vanilla Flarum).

TryHackX Homepage Blocks admin settings — sections, random buttons, tracker info, statistics, custom links, content limits and reCAPTCHA

TryHackX Homepage Blocks admin panel — section toggles, theme mode, custom filter labels, random-button JSON, tracker info / announce URLs, internal & external (OpenTracker) statistics, custom links JSON, content title / length overrides, reCAPTCHA gating and rate-limit settings.

Desktop discussion list with the full TryHackX stack — thumbnail sliders, star ratings and the magnet button

Desktop discussion list with the full TryHackX stack — thumbnail sliders on the left, star ratings on the right, magnet button next to each topic.

Desktop discussion list — magnet tooltip mid-load on a topic

Desktop discussion list — hover state showing the magnet tooltip loading inline (powered by tryhackx/flarum-magnet-link).

Support Development

If you find this extension useful, consider supporting its development:

  • Monero (XMR): 45hvee4Jv7qeAm6SrBzXb9YVjb8DkHtFtFh7qkDMxS9zYX3NRi1dV27MtSdVC5X8T1YVoiG8XFiJkh4p9UncqWGxHi4tiwk
  • Bitcoin (BTC): bc1qncavcek4kknpvykedxas8kxash9kdng990qed2
  • Ethereum (ETH): 0xa3d38d5Cf202598dd782C611e9F43f342C967cF5

You can also find the donation option in the extension's admin settings panel.

Features

  • Random discussion buttons — JSON-configurable buttons that pick a random discussion from a specific tag ("Random HD movie", "Random TV series", …).
  • Tracker info panel — display BitTorrent tracker announce URLs with copy-to-clipboard support, a custom heading and sub-heading.
  • Dual statistics system — show internal forum stats (from the database) and external OpenTracker stats side by side:
    • Internal stats — torrents, users, magnets, downloads, views, average rating (pulled from the forum database).
    • External stats (OpenTracker) — seeds, peers, completed downloads, uptime, in two modes:
      • Native — direct connection to the OpenTracker XML endpoint (/stats?mode=everything).
      • Proxy — JSON proxy URL for environments where direct access isn't possible.
    • Configurable refresh interval (1–300 s).
  • Custom links bar — JSON-configurable colour-coded link buttons (label, url, color, external).
  • Advanced discussion filters — filter bar for the discussion list with 7 filter types:
    • Title search
    • User search
    • Rating interval (requires tryhackx/flarum-topic-rating)
    • Date interval (Today, 1 day, 1 week, 2 weeks, 1 month, 3 / 6 months, 1 year)
    • Category (tag) selection
    • Sort by (Steam-DB-style rating, average rating, rating count, recently rated, creation date, views, magnet clicks)
    • Sort direction (ascending / descending)
  • Content-validation overrides — override Flarum's built-in title and content length limits without patching core:
    • Title length: 1–200 characters (varchar(200) column max).
    • Content length: 0–16,000,000 characters (mediumtext column max).
    • Each toggle is independent.
  • reCAPTCHA protection — optional reCAPTCHA v2 / v3 protection for the stats API endpoint.
  • Collapsible sections — Section 1 (random buttons + stats) can be collapsed by default to save space.
  • Hide hero banner — optional toggle to hide Flarum's default hero banner.
  • Tag filtering — show only tags that actually have discussions, optionally with discussion counts next to tag names.
  • Polish & English locales — fully translated UI.

Requirements

  • Flarum ^2.0.0-beta.7
  • flarum/tags (required)

Recommended companions

These aren't strictly required but unlock additional functionality:

Installation

composer require tryhackx/flarum-homepage-blocks
php flarum cache:clear

Updating

composer update tryhackx/flarum-homepage-blocks
php flarum cache:clear

Configuration

  1. Navigate to the Administration panel.
  2. Find TryHackX Homepage Blocks in the extensions list and enable it.
  3. Click the extension to access the configuration sections:
Section Description
General Section titles, default-collapsed state, hero banner toggle, tag display options.
Random Movies JSON configuration for random-discussion buttons.
Tracker Info Tracker heading, sub-heading, announce URLs.
Tracker Statistics Toggle internal stats, configure external OpenTracker source (native or proxy mode), refresh interval.
Custom Links JSON configuration for custom link buttons.
Content Settings Override title and content length limits.
Security (reCAPTCHA) Optional reCAPTCHA v2 / v3 protection for the stats API.

Random buttons format

[
  {"label": "Random Ultra HD (2160p)", "tag": "ultra-hd-2160p"},
  {"label": "Random Full HD (1080p)", "tag": "full-hd-1080p"},
  {"label": "Random HD (720p)", "tag": "hd-720p"}
]

Custom links format

[
  {"label": "Template Generator", "url": "/generator", "color": "#e74c3c"},
  {"label": "Template Merger",    "url": "/merger",    "color": "#e74c3c"}
]

API endpoints

Method Path Purpose
GET /api/tryhackx/homepage/random Pick a random discussion from a tag.
GET /api/tryhackx/homepage/stats Forum / tracker statistics. Optionally reCAPTCHA-gated.
GET /api/tryhackx/homepage/points/check User points / rating helper used by the filter bar.

Links

License

MIT License. See LICENSE for details.