resofire/labels

Apply labels to discussions for flexible categorization and filtering.

Maintainers

Package info

github.com/ResofireV2/labels

Language:TypeScript

Type:flarum-extension

pkg:composer/resofire/labels

Statistics

Installs: 51

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.3.2 2026-03-17 17:51 UTC

README

License: MIT Flarum

A Flarum extension that adds Labels — a flexible, user-applied categorization system for discussions. Labels sit alongside Flarum's built-in Tags but serve a distinct purpose: where Tags define the structure of your forum, Labels let users (and moderators) annotate discussions with freeform metadata like game titles, project names, status markers, or any other classification your community needs.

Features

  • Apply labels to discussions — not individual posts
  • Dedicated Labels page at /labels with a sidenav link positioned above Tags
  • Filtered discussion view at /l/{slug} — click any label anywhere to see matching discussions
  • Label badges appear on discussion list rows and the discussion hero
  • Label picker in the discussion composer and via the discussion controls dropdown
  • Global label color — one admin-selected color (with color picker) applied to all labels, defaulting to the forum's primary color
  • Min / max label count — admin-configurable per discussion
  • Required labels — optionally force users to apply at least one label on new discussions
  • Drag-to-reorder labels in the admin panel
  • Full permission integration with two nodes:
    • Edit labels on own discussions — respects Flarum's post editing time window
    • Edit labels on any discussion — for moderators and admins who can always edit

Requirements

  • PHP ^8.1
  • Flarum ^1.8

Installation

composer require resofire/labels
php flarum migrate
php flarum cache:clear

Updating

composer update resofire/labels
php flarum migrate
php flarum cache:clear

Configuration

Navigate to Admin → Extensions → Labels to:

  • Create and manage labels — set a name and slug for each label
  • Reorder labels via drag and drop
  • Set the global label color using the color picker (leave blank to use the forum's primary color)
  • Configure min/max labels per discussion (set max to 0 for unlimited)
  • Toggle required labels — when enabled, users must apply at least one label when creating a discussion

Permissions

Managed in Admin → Permissions:

Permission Default Description
Edit labels on own discussions Members Users can label their own discussions within the post editing time window
Edit labels on any discussion Moderators Can label any discussion at any time

Admins always have full access regardless of permission settings.

Installing from a GitHub Repository

If you are hosting this extension on GitHub rather than Packagist, add it as a VCS repository in your Flarum's composer.json:

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/resofire/labels"
    }
],
"require": {
    "resofire/labels": "^0.1.0"
}

Then run:

composer update resofire/labels
php flarum migrate
php flarum cache:clear

Building from Source

The compiled JS is included in js/dist/ so no build step is required for installation. If you want to modify the frontend:

cd js
npm install
npm run build
php flarum cache:clear

For development with live recompilation:

npm run dev

License

Released under the MIT License. Copyright © 2024 Resofire.