PHPackages                             tryhackx/flarum-homepage-blocks - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. tryhackx/flarum-homepage-blocks

ActiveFlarum-extension[Search &amp; Filtering](/categories/search)

tryhackx/flarum-homepage-blocks
===============================

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

2.0.3(1mo ago)011↓100%MITJavaScriptPHP ^8.2

Since Apr 23Pushed todayCompare

[ Source](https://github.com/TryHackX/flarum-homepage-blocks)[ Packagist](https://packagist.org/packages/tryhackx/flarum-homepage-blocks)[ RSS](/packages/tryhackx-flarum-homepage-blocks/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

TryHackX Homepage Blocks
========================

[](#tryhackx-homepage-blocks)

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`](https://github.com/TryHackX/flarum-topic-rating)unlocks rating filters and sorts, [`tryhackx/flarum-magnet-link`](https://github.com/TryHackX/flarum-magnet-link)unlocks magnet click stats and sorts, [`fof/discussion-views`](https://github.com/FriendsOfFlarum/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
-----------

[](#screenshots)

[![Mobile view of the discussion list across multiple TryHackX layout combinations](assets/ALL_MOBILE.png)](assets/ALL_MOBILE.png)

*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](assets/TryHackX_Homepage_Blocks.png)](assets/TryHackX_Homepage_Blocks.png)

*TryHackX Homepage Blocks admin panel — section toggles, theme mode, custom filter labels, random-button JSON, tracker info / announce URLs, internal &amp; 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](assets/ALL_VIA_MAGNETS.png)](assets/ALL_VIA_MAGNETS.png)

*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](assets/ALL_VIA_MAGNETS_v2.png)](assets/ALL_VIA_MAGNETS_v2.png)

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

Support Development
-------------------

[](#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
--------

[](#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** — add link buttons in Section 1 from a simple admin editor (name, URL, colour, open-in-new-tab, reorder) with an optional section heading. Style them freely: give a link a **CSS class** and paste your rules into the **Custom CSS** box (e.g. a glow-on-hover button). URLs and classes are sanitised (no `javascript:` / `data:`).
- **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 — creation date (always available), plus a **Steam-DB-style confidence rating**, average rating, rating count and recently rated *(with `tryhackx/flarum-topic-rating`)*, views *(with `fof/discussion-views`)*, and magnet clicks total / top magnet / recently clicked *(with `tryhackx/flarum-magnet-link`)*. Options whose extension isn't installed are hidden automatically.
    - 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.
- **Spam protection &amp; rate limiting** — protect the random / search / stats endpoints with optional reCAPTCHA v2 / v3 **and/or** a built-in per-IP **points limiter**. Each visitor has a budget that refills over time; when it runs out you choose what happens: require a reCAPTCHA, or **temporarily block the IP** for a configurable duration — block mode needs no reCAPTCHA at all and shows the visitor a friendly countdown. Client IPs are resolved from Flarum core (proxy-aware), so the limit can't be bypassed with a spoofed `X-Forwarded-For` header.
- **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 &amp; English locales** — fully translated UI.

Requirements
------------

[](#requirements)

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

### Recommended companions

[](#recommended-companions)

These aren't strictly required but unlock additional functionality:

- [**fof/discussion-views**](https://github.com/FriendsOfFlarum/discussion-views)— view count statistics and view-based sorting.
- [**tryhackx/flarum-topic-rating**](https://github.com/TryHackX/flarum-topic-rating)— rating-based filtering and sorting (Steam-DB-style, average rating, etc.).
- [**tryhackx/flarum-magnet-link**](https://github.com/TryHackX/flarum-magnet-link)— magnet click statistics (tracker stats block) and topic-scoped magnet-click sorts (clicks total / top magnet / recently clicked).

Installation
------------

[](#installation)

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

Updating
--------

[](#updating)

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

Configuration
-------------

[](#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:

SectionDescription**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**Add / reorder Section 1 link buttons (name, URL, colour, new-tab) and set an optional section title.**Content Settings**Override title and content length limits.**Security (reCAPTCHA)**Optional reCAPTCHA v2 / v3, plus the per-IP points rate limiter. Pick what happens when a visitor runs out of points: *Show reCAPTCHA* or *Temporarily block the IP* (with a configurable block duration).### Random buttons format

[](#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

[](#custom-links)

Manage Section 1 links from the admin editor (name, URL, colour, open-in-new-tab, reorder) plus an optional **links section title**. They are stored as a JSON array of `{label, url, color, external}` objects (shown here for reference):

```
[
  {"label": "Tracker", "url": "https://tracker.example.org/", "color": "#3498db", "external": true},
  {"label": "Home page", "url": "https://example.org/", "color": "#e74c3c", "external": true}
]
```

API endpoints
-------------

[](#api-endpoints)

MethodPathPurpose`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
-----

[](#links)

- [GitHub](https://github.com/TryHackX/flarum-homepage-blocks)
- [Packagist](https://packagist.org/packages/tryhackx/flarum-homepage-blocks)
- [Report Issues](https://github.com/TryHackX/flarum-homepage-blocks/issues)

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE) for details.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance96

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

47d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/21efa76fc04b119116af8bed43651ffee8de017be7318127f6e3996dc29b0974?d=identicon)[TryHackX](/maintainers/TryHackX)

---

Tags

searchvalidationrecaptchawidgetsfilteringblockshomepagestatisticsantispamsortingflarumtrackerflarum-extensiontitle lengthopentrackercontent-length

### Embed Badge

![Health badge](/badges/tryhackx-flarum-homepage-blocks/health.svg)

```
[![Health](https://phpackages.com/badges/tryhackx-flarum-homepage-blocks/health.svg)](https://phpackages.com/packages/tryhackx-flarum-homepage-blocks)
```

###  Alternatives

[flarum-lang/russian

Russian language pack for Flarum.

12127.5k](/packages/flarum-lang-russian)[omaressaouaf/query-builder-criteria

Define reusable query criteria for filtering, sorting, search, field selection, and includes in Laravel Eloquent models

285.3k](/packages/omaressaouaf-query-builder-criteria)[blomstra/search

Replaces Flarum search with one powered by an elastic search server.

125.1k](/packages/blomstra-search)[fof/discussion-language

Specify the language a discussion is written in &amp; sort by language

1032.0k](/packages/fof-discussion-language)[ganuonglachanh/sonic

Allows to search by sonic

201.9k](/packages/ganuonglachanh-sonic)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
