References

Tracks links between discussions. When a post links to another discussion, the linked discussion shows where it was linked from.

Features
- Records links to other discussions and to posts in other discussions.
# picker in the composer to insert a discussion reference.
- "Linked from" and "Links to" lists in the discussion sidebar. One "N links" button on phones.
- "Linked from …" under a post that another discussion links to.
- "All links" dialog with details and a map of connected discussions.
- Related discussions, based on which discussions are linked together.
- "Most linked" sort option.
- Search filters:
references:12, referenced-by:12, has:references.
- Moderators can add links by hand, set a type (duplicate of, see also, replaces, answers), add a note, and remove links they added.
- Notifications for authors and followers.
- Admin reports: broken links and analytics with CSV export.

Replies and links within the same discussion are not recorded. Mentions already shows replies.
Installation
Requires Flarum 2.0 and PHP 8.2.
composer require datlechin/flarum-references
php flarum migrate
php flarum cache:clear
php flarum references:backfill
The backfill command records links in posts written before the extension was installed. Run it once.
Updating
composer update datlechin/flarum-references
php flarum migrate
php flarum cache:clear
Links