PHPackages                             huoxin/filter-rule-manager - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. huoxin/filter-rule-manager

ActiveFlarum-extension[Utility &amp; Helpers](/categories/utility)

huoxin/filter-rule-manager
==========================

Filter Rule Manager

1.0.0-beta.1(today)00GPL-3.0-or-laterTypeScriptCI passing

Since Jun 19Pushed todayCompare

[ Source](https://github.com/huoxin233/flarum-ext-filter-rule-manager)[ Packagist](https://packagist.org/packages/huoxin/filter-rule-manager)[ RSS](/packages/huoxin-filter-rule-manager/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (6)Versions (2)Used By (0)

Filter Rule Manager
===================

[](#filter-rule-manager)

[![License](https://camo.githubusercontent.com/1c7d7671effd64df0ad09c2aa87a73bfaf614a8ec5e72dbe870c8635b57bb1ce/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c2d2d332e302d2d6f722d2d6c617465722d626c75652e737667)](https://camo.githubusercontent.com/1c7d7671effd64df0ad09c2aa87a73bfaf614a8ec5e72dbe870c8635b57bb1ce/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c2d2d332e302d2d6f722d2d6c617465722d626c75652e737667) [![Latest Stable Version](https://camo.githubusercontent.com/85d917a0ab6b2efe2371c10b12563905be53417f79b5e2c14a81016368b90b28/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68756f78696e2f66696c7465722d72756c652d6d616e616765722e737667)](https://packagist.org/packages/huoxin/filter-rule-manager) [![Total Downloads](https://camo.githubusercontent.com/93e82c312365e6c3e7a07f72241b260ec9a572f67e279c77fafe68a04ae30930/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68756f78696e2f66696c7465722d72756c652d6d616e616765722e737667)](https://packagist.org/packages/huoxin/filter-rule-manager) [![Review](https://camo.githubusercontent.com/ebaaa3d96f55a4052a3798de42462ccd1418b67b1cf3c79c942f02d27cce7268/68747470733a2f2f666c6f78756d2e636f6d2f657874656e73696f6e2f68756f78696e2f66696c7465722d72756c652d6d616e616765722f62616467652f726576696577)](https://floxum.com/extension/huoxin/filter-rule-manager) [![Review Score](https://camo.githubusercontent.com/7266e7061c18d256f4d3f48dd91e721cd6d993cb7d869042cafca03f407ef487/68747470733a2f2f666c6f78756d2e636f6d2f657874656e73696f6e2f68756f78696e2f66696c7465722d72756c652d6d616e616765722f62616467652f7265766965772d73636f7265)](https://floxum.com/extension/huoxin/filter-rule-manager)

A powerful, AST-based moderation and filtering engine for [Flarum](https://flarum.org).

Filter Rule Manager goes beyond simple word replacements. It allows forum administrators to build complex, logical rulesets that can dynamically evaluate post content, automatically flag suspicious behavior, require manual approval, or block posts entirely.

Features
--------

[](#features)

Filter Rule Manager is built to give Flarum administrators fine-grained control over their community's content. It covers the following features out-of-the-box:

- **Visual Rule Builder**: Construct complex logic using an intuitive drag-and-drop interface. Group conditions using `AND` / `OR` / `NOT` logic to create highly specific content filters.
- **Priority-based Execution**: Order your rulesets. Higher priority rules execute first, efficiently preventing unnecessary processing on lower rulesets.
- **Intervention Types**: Choose exactly how the system reacts to a violation:
    - **Info**: Displays a real-time hint while the user is typing, but does not block them from submitting the post.
    - **Warning**: Displays a real-time hint and explicitly requires user confirmation (via a modal) before they can submit the post.
    - **Block**: Evaluated server-side upon submission. Prevents the post from being submitted entirely and displays an error message.
    - **Silent**: Does not display anything to the user. Evaluated silently on the server-side. *(Note: You can configure any of the above to also automatically Flag the post or hold it for Approval.)*
- **Dynamic Scopes**: Apply filtering rules globally, or restrict them to specific **Tags** or specific **Discussions**.
- **Evasion Detection**: Define strict timeout windows and strike thresholds. If a user repeatedly hits block rules (e.g., 3 times within 15 minutes), the system automatically escalates penalties, flagging their next *clean* post for moderator review.
- **Bypass Groups**: Exempt specific User Groups (e.g., Moderators, Admins) from individual rulesets.
- **Customizable Messaging**: Define dynamic flag reasons and block messages using variable interpolation (e.g., `Matched word: {{matched_word}}` or `Triggered ruleset: {{ruleset}}`). Messages support **HTML**.
- **Extensible API**: Other extensions can securely inject their own custom Rule Providers into the AST engine.

⚠️ Security &amp; Privacy Note
------------------------------

[](#️-security--privacy-note)

**Frontend Evaluation Disclosure:** Filter Rule Manager evaluates `Info` and `Warning` rulesets instantly on the client-side to provide real-time feedback to users as they type. To achieve this, the system injects the full logic (including compiled word lists, regex patterns, and match conditions) of all active **Info** and **Warning** rulesets into the page payload for authenticated users.

A determined user could potentially inspect the page source to discover the exact patterns configured in these rulesets and attempt to bypass them.

**Best Practice:** Use `Info` and `Warning` interventions only for guidelines, formatting hints, or soft moderation. For strict filters (e.g., severe profanity, spam links, zero-tolerance policies) that you wish to keep hidden, use the **Block** or **Silent** intervention types. Block and Silent rulesets are evaluated strictly server-side and are **never** exposed to the browser.

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

[](#installation)

Install with composer:

```
composer require huoxin/filter-rule-manager:"*"
```

Updating
--------

[](#updating)

```
composer update huoxin/filter-rule-manager:"*"
php flarum migrate
php flarum cache:clear
```

For Developers
--------------

[](#for-developers)

Filter Rule Manager is built to be extended! If you are an extension developer and want to register custom Rule Providers (e.g., AI toxicity checks, image scanning, custom regex engines), please read the [Extending Guide](EXTENDING.md).

Screenshots
-----------

[](#screenshots)

### Admin Panel

[](#admin-panel)

[![PixPin_2026-06-19_23-19-22](https://private-user-images.githubusercontent.com/23447157/610556470-a562bc11-bec2-405d-a700-a1014f90c44c.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODE5MjE3MzgsIm5iZiI6MTc4MTkyMTQzOCwicGF0aCI6Ii8yMzQ0NzE1Ny82MTA1NTY0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XJlPWU3MjJiYmVmYjA5YWVlMGJlZTBiYWMyYTRmZmQwNjYyNjgzZjU2OTc1ODQxYzczYmRlMDVlZjRiZjY3YjMzNmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.-MwoKPnQAcvBqEqQ7qqODM5lhIMZaoguCc4mDP2LfDg)[![PixPin_2026-06-20_02-00-24](https://private-user-images.githubusercontent.com/23447157/610602120-d80389df-d5a9-4fa9-b298-66894ed73284.webp?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODE5MjE3MzgsIm5iZiI6MTc4MTkyMTQzOCwicGF0aCI6Ii8yMzQ0NzE1Ny82MTA2MDIxMjAtZDgwMzg5ZGYtZDVhOS00ZmE5LWIyOTgtNjY4OTRlZDczMjg0LndlYnA_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNjIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDYyMFQwMjEwMzhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05OTc4MWY5YmYwYTdkNWM5MzA2NzM3OTNiYjA0OGIxZDQ5NGZiZDlkYzIzYTc2ODcwOWEyZjU2ODRjOGRkNjUxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZ3ZWJwIn0.NvGt5nVDkzHzV2J9d0aq-SQdB4pJz7D_ddWrnV6myVw)](https://private-user-images.githubusercontent.com/23447157/610602120-d80389df-d5a9-4fa9-b298-66894ed73284.webp?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODE5MjE3MzgsIm5iZiI6MTc4MTkyMTQzOCwicGF0aCI6Ii8yMzQ0NzE1Ny82MTA2MDIxMjAtZDgwMzg5ZGYtZDVhOS00ZmE5LWIyOTgtNjY4OTRlZDczMjg0LndlYnA_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNjIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDYyMFQwMjEwMzhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05OTc4MWY5YmYwYTdkNWM5MzA2NzM3OTNiYjA0OGIxZDQ5NGZiZDlkYzIzYTc2ODcwOWEyZjU2ODRjOGRkNjUxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZ3ZWJwIn0.NvGt5nVDkzHzV2J9d0aq-SQdB4pJz7D_ddWrnV6myVw)### Frontend Display

[](#frontend-display)

[![PixPin_2026-06-20_02-04-15](https://private-user-images.githubusercontent.com/23447157/610602156-91d0cd29-72e9-4e93-a40b-f5f514ac2774.webp?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODE5MjE3MzgsIm5iZiI6MTc4MTkyMTQzOCwicGF0aCI6Ii8yMzQ0NzE1Ny82MTA2MDIxNTYtOTFk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LVNpZ25hdHVyZT1iNTI1YWM3ZGY3NDQ5N2YyZTk0NWQ1ZGQ4OTJlYmViYzliNmMxMjA5YjJjMGIwNzhlYmY2NmE3MTU3NzU1YTQzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZ3ZWJwIn0.OFgEDtTK4rErC3Kf8N6hGkIpODbxlOKwXMRg5Rtst1A)[![PixPin_2026-06-20_02-06-20](https://private-user-images.githubusercontent.com/23447157/610602160-ee145721-5596-4050-8e44-b2b4ddd54041.webp?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODE5MjE3MzgsIm5iZiI6MTc4MTkyMTQzOCwicGF0aCI6Ii8yMzQ0NzE1Ny82MTA2MDIxNjAtZWUxNDU3MjEtNTU5Ni00MDUwLThlNDQtYjJiNGRkZDU0MDQxLndlYnA_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNjIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDYyMFQwMjEwMzhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03MTYyMTg5MWViNzA2Zjc5M2ZmMTZhY2E3NzQ5NDc0N2I4OWRkZDhmYzViZWQ5YWY5YmViMmE5YjM5ZWQ3NWI0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZ3ZWJwIn0.j7p45dEDTYWqkZ9VEutLWBcDn6jCV1DI5J1cnIGBPPI)](https://private-user-images.githubusercontent.com/23447157/610602160-ee145721-5596-4050-8e44-b2b4ddd54041.webp?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODE5MjE3MzgsIm5iZiI6MTc4MTkyMTQzOCwicGF0aCI6Ii8yMzQ0NzE1Ny82MTA2MDIxNjAtZWUxNDU3MjEtNTU5Ni00MDUwLThlNDQtYjJiNGRkZDU0MDQxLndlYnA_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNjIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDYyMFQwMjEwMzhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03MTYyMTg5MWViNzA2Zjc5M2ZmMTZhY2E3NzQ5NDc0N2I4OWRkZDhmYzViZWQ5YWY5YmViMmE5YjM5ZWQ3NWI0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZ3ZWJwIn0.j7p45dEDTYWqkZ9VEutLWBcDn6jCV1DI5J1cnIGBPPI)Links
-----

[](#links)

- [Packagist](https://packagist.org/packages/huoxin/filter-rule-manager)
- [GitHub](https://github.com/huoxin233/flarum-ext-filter-rule-manager)
- [Discuss](https://discuss.flarum.org/d/39451-filter-rule-manager)

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

Top contributor holds 94.7% of commits — single point of failure

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

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23447157?v=4)[huoxin](/maintainers/huoxin233)[@huoxin233](https://github.com/huoxin233)

---

Top Contributors

[![huoxin233](https://avatars.githubusercontent.com/u/23447157?v=4)](https://github.com/huoxin233 "huoxin233 (90 commits)")[![flarum-bot](https://avatars.githubusercontent.com/u/39334649?v=4)](https://github.com/flarum-bot "flarum-bot (5 commits)")

---

Tags

flarum

### Embed Badge

![Health badge](/badges/huoxin-filter-rule-manager/health.svg)

```
[![Health](https://phpackages.com/badges/huoxin-filter-rule-manager/health.svg)](https://phpackages.com/packages/huoxin-filter-rule-manager)
```

###  Alternatives

[flarum-lang/russian

Russian language pack for Flarum.

12127.5k](/packages/flarum-lang-russian)[fof/byobu

Well integrated, advanced private discussions.

59112.4k11](/packages/fof-byobu)[fof/gamification

Upvotes and downvotes for your Flarum community

4162.0k7](/packages/fof-gamification)[fof/polls

 A Flarum extension that adds polls to your discussions

25130.2k9](/packages/fof-polls)[fof/user-bio

Add a user bio to user profiles

20102.0k9](/packages/fof-user-bio)[fof/sitemap

Generate a sitemap

1796.4k2](/packages/fof-sitemap)

PHPackages © 2026

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