PHPackages                             resofire/blog-cards - 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. resofire/blog-cards

ActiveFlarum-extension

resofire/blog-cards
===================

Display the discussion list as blog-style cards

v0.5.2(3d ago)0106↑98.1%MITPHP

Since Mar 14Pushed 3d agoCompare

[ Source](https://github.com/ResofireV2/blog-cards)[ Packagist](https://packagist.org/packages/resofire/blog-cards)[ RSS](/packages/resofire-blog-cards/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (2)Versions (44)Used By (0)

Blog Cards for Flarum
=====================

[](#blog-cards-for-flarum)

A [Flarum](https://flarum.org) extension by **Resofire** that displays discussions as blog-style cards, complete with hero images, participant avatars, read/unread states, and a moonlit alpine placeholder for posts without images.

---

Features
--------

[](#features)

### Card layout

[](#card-layout)

- Discussions are rendered as cards with a **hero image**, tag labels, title, excerpt, author, reply count, and a participant avatar strip
- The hero image is extracted automatically from the first `` tag in the first post — no manual configuration required
- Cards without a post image display a built-in SVG landscape illustration as the placeholder
- Cards respect Flarum's native **read/unread styles** — unread discussions show a bold title and prominent reply count; read discussions are visually receded using `--discussion-title-color`

### Participant avatar strip

[](#participant-avatar-strip)

- Each card displays up to **6 participant avatars** in a strip at the bottom, showing users who have replied to the discussion
- Avatars are shown in chronological order of first post
- An overflow badge (`+N`) appears when there are more than 7 total participants (6 repliers + the OP)
- Clicking the overflow badge opens a **paginated participant modal** listing all participants with their avatars and usernames
- The strip updates optimistically when the current user posts a reply, without requiring a page refresh
- Participant data is maintained in a bounded preview table (`discussion_participant_previews`, max 6 rows per discussion) for efficient loading

### Admin settings

[](#admin-settings)

SettingDescription**Use on Discussion List**When enabled, cards appear on the main index page (`/`) as well as tag pages**Restrict to Tags**Select specific tags to show cards on. If none are selected, cards appear on all tag pages**Full Width Cards**When enabled, each card spans the full width instead of two per row. Full-width cards use a taller hero image (420px vs 250px)### Tools

[](#tools)

The admin panel includes a **Recalculate Participants** button that rebuilds the participant preview table for all discussions. A chunked progress modal shows real-time progress and timing per batch. Run this once after installing on an existing forum.

### Sidebar behaviour

[](#sidebar-behaviour)

When viewing a discussion, Flarum shows a discussion list in the sidebar. Cards in the sidebar are automatically displayed **single column** with a reduced image height. Cards only appear in the sidebar when the discussion list is filtered to a tag that has cards enabled — the sidebar respects the same tag restrictions as the main list.

---

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

[](#installation)

```
composer require resofire/blog-cards
php flarum migrate
php flarum cache:clear
```

After installing on an existing forum with existing discussions, run the participant backfill:

```
php flarum participants:populate
```

Or use the **Recalculate Participants** button in the admin panel.

---

Updating
--------

[](#updating)

```
composer update resofire/blog-cards
php flarum migrate
php flarum cache:clear
```

---

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

[](#compatibility)

- Requires **Flarum 1.0** or later
- Requires **flarum/tags**
- Compatible with **resofire/discussion-participants** — both extensions can be enabled simultaneously without conflict. Blog Cards is fully self-contained and does not require Discussion Participants to be installed.

---

Technical notes
---------------

[](#technical-notes)

- First post content is included in the discussion list API response to enable image extraction. The `DOMParser` result is cached on the discussion object for the session so parsing only runs once per discussion per page load.
- Participant preview data is stored in a dedicated `discussion_participant_previews` table (max 6 rows per discussion) with a `participant_count` column on the discussions table. This means the list page never issues a `COUNT(DISTINCT)` subquery — all data is pre-computed at write time.
- The extension keeps its preview table in sync automatically via post `Posted`, `Hidden`, `Restored`, and `Deleted` events.

---

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance99

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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

43

Last Release

3d ago

### Community

Maintainers

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

---

Top Contributors

[![WalsGit](https://avatars.githubusercontent.com/u/108340184?v=4)](https://github.com/WalsGit "WalsGit (91 commits)")[![ResofireV2](https://avatars.githubusercontent.com/u/266603343?v=4)](https://github.com/ResofireV2 "ResofireV2 (52 commits)")[![Dem13n](https://avatars.githubusercontent.com/u/52776643?v=4)](https://github.com/Dem13n "Dem13n (44 commits)")

---

Tags

extensionblogflarumdiscussioncards

### Embed Badge

![Health badge](/badges/resofire-blog-cards/health.svg)

```
[![Health](https://phpackages.com/badges/resofire-blog-cards/health.svg)](https://phpackages.com/packages/resofire-blog-cards)
```

###  Alternatives

[fof/mason

Add custom fields to discussions

205.8k](/packages/fof-mason)

PHPackages © 2026

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