fof/taxonomies

Create custom discussion taxonomies and terms

Fund package maintenance!
Open Collective

Installs: 126

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 4

Forks: 1

Open Issues: 2

Language:JavaScript

Type:flarum-extension

0.1.0-beta.2 2021-03-09 22:16 UTC

This package is auto-updated.

Last update: 2021-09-29 00:39:42 UTC


README

License Latest Stable Version

Adds custom taxonomies to discussions.

Taxonomies are like tag sets. Taxonomy "tags" are called Terms.

Each Taxonomy has its own rules on how many Terms are required/allowed.

You can allow the users to create custom Terms under some Taxonomies.

Taxonomies and Terms can be used to filter the list of discussions or just store and display particular information about discussion.

A global permission controls who can see and use all taxonomies. Per-taxonomy permissions are currently not available.

The Taxonomies extension can work alongside Flarum's Tags extension, or be used in place of it. Unfortunately all extensions that implement custom Tag feature won't automatically work with Taxonomies (like the ability to follow Tags).

Installation

composer require fof/taxonomies

Updating

composer require fof/taxonomies
php flarum migrate
php flarum cache:clear

Configuration

Once enabled, a new Taxonomies tab will show up in the admin.

Taxonomies are shown as tabs, while Terms are shown in a list in the Taxonomy tab.

Taxonomies and Terms can be re-ordered by drag-and-drop (horizontally for Taxonomies, vertically for Terms).

If you don't re-order Terms, they will appear alphabetically. If you have a large number of Terms or allow user-created Terms, it's recommended to not order them and leave them in automatic ordering.

An identical Term can be created in multiple Taxonomies. Even slugs can be re-used across Taxonomies, they only need to be unique inside of that Taxonomy.

Slugs are used for search queries and as part of some URLs. You should avoid reserved terms in Taxonomy slugs, like tag, tags, page, limit, include, sort, q as these might conflict with Flarum or other extensions.

The Taxonomy and Term descriptions are shown in the "choose terms" modal. Taxonomy description appears above the search field, while Term description appears next to the term. The descriptions might also be used for SEO improvements in a future release.

When a Term is deleted from the admin panel, it is removed from all discussions that used it. When a Taxonomy is deleted from the admin panel, all its Terms are removed from discussions that used it. Discussions are not deleted.

Possible improvements

The terms API currently doesn't use pagination. With large numbers of user-created terms, loading the "choose term" modal or filter dropdown for those taxonomies could hit performance issues.

More integration with Tags is possible, but requires a lot of work. Restricting a Taxonomy to particular Tags, or linking Terms to Tags to gain Tag-compatible features won't be easy to implement.

Links

An extension by FriendsOfFlarum