
π Diff for Flarum

π Description
Diff allows you to view post edit histories on your Flarum forum. Track changes, compare revisions, and even rollback to previous versions.
This is the maintained fork of the original the-turk/flarum-diff extension. Both Flarum 1.x and Flarum 2.x are supported β install the version that matches your Flarum.
β¨ Screenshots

π Post-Stream Item

π Revision Dropdown List

π Key Features
- β
Multiple Detail Levels - Line (default), word, and character level diffs
- π¨ Three Render Modes - Inline, Side by Side & Combined views
- π¦ Archive Old Revisions - Save storage with automatic compression
- βͺ Rollback Support - Revert to any previous revision
- ποΈ Delete Revisions - Remove unwanted edit history
- π Dark Mode Support - Native Flarum 2.x dark mode compatible
- β° Cron Job Support - Automated archiving with scheduler
- π Quiet Edits Support - Works with
the-turk/flarum-quiet-edits
π₯ Installation
Flarum 1.x:
composer require huseyinfiliz/flarum-diff:"^1.0"
php flarum migrate
php flarum cache:clear
Flarum 2.x:
composer require huseyinfiliz/flarum-diff:"*"
php flarum migrate
php flarum cache:clear
β οΈ Upgrading from the-turk/flarum-diff
Note on settings: Extension settings won't transfer automatically due to the namespace change (the-turk-diff.* β huseyinfiliz-diff.*). Simply reconfigure your preferences in the admin panel after installation. Your revision history is not affected.
βοΈ Configuration
After installation, go to Admin Panel β Extensions β Diff to configure:
- Detail Level - None, Line, Word, or Character level
- Neighbor Lines - How many context lines to show
- Merge Threshold - For Combined renderer (0-1)
- Archive Options - Automatic archiving with A, m, b parameters
- Cron Jobs - Enable scheduled archiving
ποΈ Archive Old Revisions
If x β₯ A (where x is post's revision count), first y=mx+b revisions will be stored as merged & compressed. Configure A, m, and b values in settings.
For automated archiving, enable cron jobs and add this to your server:
* * * * * php /path/to/flarum schedule:run >> /dev/null 2>&1
Or run manually: php flarum diff:archive
π Permissions
Configure in Admin Panel β Permissions:
- View edit history - Who can see revision history
- Delete own/others edit history - Who can remove revisions
- Rollback own/others edit history - Who can revert to previous versions
β»οΈ Updating
composer update huseyinfiliz/flarum-diff
php flarum migrate
php flarum cache:clear
π Requirements
Flarum 1.x: PHP β₯ 7.4, ext-iconv
Flarum 2.x: PHP β₯ 8.1, ext-iconv
π Links
π Credits
- Original Extension: Hasan Γzbey (the-turk)
- Fork & Maintenance: HΓΌseyin Filiz
If you find this extension helpful, feel free to β star the repository and share your feedback!