PHPackages                             ernestdefoe/flarum-showcase - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ernestdefoe/flarum-showcase

ActiveFlarum-extension[Utility &amp; Helpers](/categories/utility)

ernestdefoe/flarum-showcase
===========================

Promote Extensions/Themes-tagged discussions to feature cards above the forum index.

2.0.2(2w ago)04↓100%MITTypeScriptPHP ^8.3CI passing

Since May 22Pushed 2w agoCompare

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

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

Flarum Showcase
===============

[](#flarum-showcase)

[![Floxum](https://camo.githubusercontent.com/b678414c4403ac510c0d3f7b9a09b4399ee701fff5d591fc9b748fd152d9e385/68747470733a2f2f666c6f78756d2e636f6d2f657874656e73696f6e2f65726e6573746465666f652f666c6172756d2d73686f77636173652f62616467652f6e616d65)](https://floxum.com/extension/ernestdefoe/flarum-showcase)[![Version](https://camo.githubusercontent.com/038b0ccb6679abbe8dbeda0e4b08552c2ef7d4e77a06c1dbc4d3bcb39c226eee/68747470733a2f2f666c6f78756d2e636f6d2f657874656e73696f6e2f65726e6573746465666f652f666c6172756d2d73686f77636173652f62616467652f686967686573742d76657273696f6e)](https://floxum.com/extension/ernestdefoe/flarum-showcase)[![Downloads](https://camo.githubusercontent.com/51734c6b30a83efdcd3173a41f6149ec0fcba72a241d48c500e6b775cf0455a9/68747470733a2f2f666c6f78756d2e636f6d2f657874656e73696f6e2f65726e6573746465666f652f666c6172756d2d73686f77636173652f62616467652f646f776e6c6f616473)](https://floxum.com/extension/ernestdefoe/flarum-showcase)[![Review](https://camo.githubusercontent.com/dcce339692e0b8f35d41d7bb1b84833526086ba56a89c22003d6c065734677ef/68747470733a2f2f666c6f78756d2e636f6d2f657874656e73696f6e2f65726e6573746465666f652f666c6172756d2d73686f77636173652f62616467652f726576696577)](https://floxum.com/extension/ernestdefoe/flarum-showcase)[![License](https://camo.githubusercontent.com/a9865afeee340a9d3668eb78c7cc23dfe3cdee12a801b056636f4c5343b6b878/68747470733a2f2f666c6f78756d2e636f6d2f657874656e73696f6e2f65726e6573746465666f652f666c6172756d2d73686f77636173652f62616467652f6c6963656e7365)](https://floxum.com/extension/ernestdefoe/flarum-showcase)

A tag-driven feature rail for the Flarum 2 forum index. Pick a set of primary tags and a set of secondary tags in the admin panel — any discussion that carries one from each appears as a card above the discussion list, with the cover image pulled from the linked GitHub repository's social-preview when the opening post embeds a [`gh-readme`](https://github.com/ernestdefoe/gh-readme) shortcode.

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)[![Flarum](https://camo.githubusercontent.com/685486b52fcf58814852c830ccf7d3873e94c32a77ef67b19bbe1958651d2fe9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f466c6172756d2d253545322e302d6f72616e67652e737667)](https://camo.githubusercontent.com/685486b52fcf58814852c830ccf7d3873e94c32a77ef67b19bbe1958651d2fe9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f466c6172756d2d253545322e302d6f72616e67652e737667)[![PHP](https://camo.githubusercontent.com/3ed0aba78d953e7a0393ff62845b98b4401a24d21135a2f872023ae25ce19fb3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e332d3737376262342e737667)](https://camo.githubusercontent.com/3ed0aba78d953e7a0393ff62845b98b4401a24d21135a2f872023ae25ce19fb3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e332d3737376262342e737667)[![TypeScript](https://camo.githubusercontent.com/618e15a15f5028b2d5a711ab8af8b24f6f8fbd7977d3f990a941d760a1855acd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f547970655363726970742d7374726963742d3331373863362e737667)](https://camo.githubusercontent.com/618e15a15f5028b2d5a711ab8af8b24f6f8fbd7977d3f990a941d760a1855acd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f547970655363726970742d7374726963742d3331373863362e737667)

What it does
------------

[](#what-it-does)

Designed for support sites where each thread is "about" a specific extension or theme:

- **Primary tag** = the specific extension/theme slug (e.g. `theme-toggle`, `gh-readme`, `respawn`).
- **Secondary tag** = the umbrella category (e.g. `Extensions`, `Themes`).

A discussion shows up in the showcase rail iff it carries **at least one whitelisted primary tag AND at least one whitelisted secondary tag**. Empty whitelist on either side ⇒ nothing qualifies (admin must explicitly opt in).

Features
--------

[](#features)

- **Two layout styles.** Carousel (horizontal snap-scroll with prev/next buttons) or grid (wraps to multiple rows). Toggle in the admin panel.
- **Automatic cover images.** When the opening post contains a `[gh-readme repo="owner/name"]` shortcode (from [`ernestdefoe/gh-readme`](https://github.com/ernestdefoe/gh-readme)), the card pulls the repo's GitHub social-preview as the cover. No manual image uploads.
- **Hashed-gradient fallback.** Discussions without a `gh-readme` shortcode get a stable, deterministic gradient + first-letter monogram — so every card looks intentional even before authors update their posts.
- **Real tag pickers in the admin.** Uses Flarum 2's bundled `TagSelectionModal` via the `flarum-tags.select-tags` setting type. Each picker is filtered to either primary or secondary tags so admins can't pick the wrong kind.
- **Localized.** Every visible string flows through `app.translator.trans(...)` and lives in `locale/en.yml` — drop in additional locale files (or use [`fof/linguist`](https://github.com/FriendsOfFlarum/linguist)) to translate.
- **Strictly typed.** TypeScript end-to-end, type-checked against Flarum core's `.d.ts` and `flarum/tags`'s `.d.ts`.

Compatibility
-------------

[](#compatibility)

- Flarum core `^2.0`
- PHP `^8.3`
- Requires `flarum/tags`
- Pairs nicely with — but does **not** require — [`ernestdefoe/gh-readme`](https://github.com/ernestdefoe/gh-readme). Without it the synthesized gradient fallback is used for every card.

Install
-------

[](#install)

```
composer require ernestdefoe/flarum-showcase
php flarum cache:clear
```

Then enable **Showcase** from the admin panel's Extensions page.

Configure
---------

[](#configure)

Admin → Extensions → Showcase exposes:

SettingWhat it does**Display style**Carousel (default) or Grid.**Qualifying primary tags**Multi-select tag picker, restricted to primary tags. A discussion needs one of these to qualify.**Qualifying secondary tags**Multi-select tag picker, restricted to secondary tags. A discussion needs one of these too (AND, not OR).**Maximum cards**Hard cap on how many cards render (default 12).**Sort order**Latest activity, most replied, or pinned first then latest.Cover image resolution
----------------------

[](#cover-image-resolution)

For each qualifying discussion, the backend reads the opening post's raw content and runs a regex looking for `[gh-readme repo="owner/name"]`. If found, the cover URL is set to `https://opengraph.githubassets.com/1/owner/name` — the same image GitHub serves as the repo's social preview. Otherwise the frontend renders the hashed-gradient fallback.

This means `ernestdefoe/gh-readme` does **not** have to be installed locally for showcase to function — Showcase only parses the shortcode string, never invokes any gh-readme PHP. But you'll want gh-readme installed if you want the shortcodes to actually render as live READMEs inside the discussions.

Development
-----------

[](#development)

```
cd js
npm install
npm run build           # production bundle (writes js/dist/forum.js + admin.js)
npm run dev             # watch mode for development
npm run check-typings   # tsc --noEmit, requires `composer install` at repo root first
```

The TypeScript path mapping in `js/tsconfig.json` resolves `flarum/*` from `../vendor/flarum/core/js/dist-typings/` and `flarum/tags/*` from `../vendor/flarum/tags/js/dist-typings/`. Run `composer install` at the repo root first.

### Project layout

[](#project-layout)

```
extend.php                                Flarum extension bootstrap (settings, API field, frontend assets)
composer.json                             Package manifest (suggests ernestdefoe/gh-readme)
locale/en.yml                             User-facing strings (forum, lib, admin)
less/forum.less                           Showcase / card / carousel / grid styles
src/
  Api/AddCoverImageField.php              JSON:API field on Discussion → showcaseCoverUrl
  CoverImage/Resolver.php                 Parses gh-readme shortcode → og:image URL
  Showcase/Qualifier.php                  AND-rule over primary + secondary tag ID whitelists
js/
  forum.ts / admin.ts                     Webpack entry points (note: admin.ts uses `export { default as extend }`)
  tsconfig.json                           Extends flarum-tsconfig with flarum/tags path mapping
  src/forum/                              IndexPage extender, ShowcaseSection, ShowcaseCard, ShowcaseCarousel, ShowcaseGrid, loader, util
  src/admin/index.ts                      Two SelectTags pickers + display-style toggle + sort + max

```

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance96

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~1 days

Total

3

Last Release

17d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c9978664264055711c21fbcf73c937f758df771d9cb40f6a25370b10123e7abc?d=identicon)[ernestdefoe](/maintainers/ernestdefoe)

---

Top Contributors

[![ernestdefoe](https://avatars.githubusercontent.com/u/24905286?v=4)](https://github.com/ernestdefoe "ernestdefoe (4 commits)")

### Embed Badge

![Health badge](/badges/ernestdefoe-flarum-showcase/health.svg)

```
[![Health](https://phpackages.com/badges/ernestdefoe-flarum-showcase/health.svg)](https://phpackages.com/packages/ernestdefoe-flarum-showcase)
```

###  Alternatives

[fof/byobu

Well integrated, advanced private discussions.

61112.4k10](/packages/fof-byobu)[fof/discussion-language

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

1032.0k](/packages/fof-discussion-language)[flarum-lang/russian

Russian language pack for Flarum.

12127.5k](/packages/flarum-lang-russian)[flarum/tags

Organize discussions into a hierarchy of tags and categories.

38744.9k133](/packages/flarum-tags)[michaelbelgium/mybb-to-flarum

Migrate a MyBB Forum to a fresh Flarum instance

261.1k](/packages/michaelbelgium-mybb-to-flarum)[fof/best-answer

Mark a post as the best answer in a discussion

26147.5k17](/packages/fof-best-answer)

PHPackages © 2026

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