PHPackages                             qwe987299/flarum-auto-ban-spam - 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. qwe987299/flarum-auto-ban-spam

ActiveFlarum-extension

qwe987299/flarum-auto-ban-spam
==============================

自動偵測違規關鍵字，立即無限期停權帳號、改暱稱為 Banned、清空簡介與頭像，並依照所設定的處置方式進行處理。Auto detect keywords to ban user indefinitely, reset nickname to Banned, wipe profile, and handle content according to configured strategy.

10PHP

Since Jul 23Pushed todayCompare

[ Source](https://github.com/qwe987299/flarum-auto-ban-spam)[ Packagist](https://packagist.org/packages/qwe987299/flarum-auto-ban-spam)[ RSS](/packages/qwe987299-flarum-auto-ban-spam/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Auto Ban Spam Keywords for Flarum
=================================

[](#auto-ban-spam-keywords-for-flarum)

[![Flarum Extension](https://camo.githubusercontent.com/42551a85bfe406ae91bcef3eb7e15d63965c26e565260729e79ba2bbcf1ab21c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f466c6172756d2d322e302e30253230253743253230312e382d627269676874677265656e2e737667)](https://camo.githubusercontent.com/42551a85bfe406ae91bcef3eb7e15d63965c26e565260729e79ba2bbcf1ab21c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f466c6172756d2d322e302e30253230253743253230312e382d627269676874677265656e2e737667)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)

當系統偵測到使用者名稱、暱稱、簡介/簽名檔（Bio）、主題標題或留言內文包含後台設定的違規關鍵字時，自動執行安全防護處置：

- **無限期停權**：自動將該帳號停權至 `2099-12-31`。
- **變更顯示暱稱**：統一變更顯示暱稱（Nickname）為 `Banned`（`username` 保持不變）。
- **清空個人資料**：自動清空使用者實體頭像圖檔、個人簡介/簽名檔 (Bio，支援 `fof/user-bio`)，以及社群網路按鈕連結 (Social Profile Buttons，支援 `fof/socialprofile`)。
- **註冊天數過濾 (僅檢測註冊 X 天內的帳號)**：可自訂防護天數（例如設定 30 代表僅對註冊 30 天內的新會員進行關鍵字檢測；設定 0 代表適用於所有會員）。
- **豁免權限群組 (不受影響的群組)**：支援於 Flarum 權限矩陣中勾選豁免群組（管理員預設豁免，其他群組可自由設定）。
- **隱密安全提示**：觸發封鎖時不會向使用者透露具體被比對成功的關鍵字，防止機器人測試邊界。
- **使用者違規處置方式 (軟刪除 / 硬刪除)**：
    - **軟刪除 (Soft Delete)**：將該使用者過往發佈的所有主題（Discussions）與留言（Posts）執行隱藏 / 移入審核佇列，**完整保留原始內文**，並自動刷新討論區與個人資料統計頁。
    - **硬刪除 (Hard Delete)**：從資料庫與實體儲存區中永久徹底刪除該帳號發佈的所有主題、留言，以及透過 **FoF Upload (`fof/upload`)** 上傳的所有圖片與檔案（僅限有啟用 FoF Upload 時自動清理）。
- **後台管理介面**：管理員可自訂違規關鍵字清單並切換使用者違規處置方式（軟刪除或硬刪除）。

---

👨‍💻 作者資訊 (Author)
-----------------

[](#‍-作者資訊-author)

- **作者 (Author)**: Feng, Cheng-Chi
- **Email**:
- **擴充官方網站 (Website)**:
- **Packagist 帳號**: [qwe987299](https://packagist.org/users/qwe987299/)
- **授權條款 (License)**: MIT

---

🚀 安裝說明 (Installation)
---------------------

[](#-安裝說明-installation)

於 Flarum 根目錄執行：

```
composer require qwe987299/flarum-auto-ban-spam
php flarum extension:enable qwe987299-auto-ban-spam
```

---

⚙️ 後台設定 (Configuration)
-----------------------

[](#️-後台設定-configuration)

1. 登入 Flarum 管理員後台。
2. 前往 **擴充套件 (Extensions)** -&gt; **Auto Ban Spam Keywords**：
    - **違規關鍵字清單**：輸入要攔截的關鍵字（多個關鍵字可用換行、半形逗號「,」或全形逗號「，」分隔）。
    - **使用者違規處置方式**：可選擇 **軟刪除（隱藏 / 等候審核）** 或 **硬刪除（永久刪除主題、留言與 FoF Upload 上傳的檔案）**。
    - **僅檢測註冊 X 天內的帳號**：輸入天數數字（例如輸入 30 代表僅對註冊天數 30 天內的新會員進行關鍵字檢測；輸入 0 代表適用於所有會員）。
3. 前往 **權限 (Permissions)** 頁面：
    - 於 **Auto Ban Spam Keywords** 區塊下勾選 **不受影響的群組**，即可設定豁免關鍵字封鎖檢查的使用者群組。

###  Health Score

21

—

LowBetter than 17% of packages

Maintenance65

Regular maintenance activity

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c63875472a671bb4fd1e3a1012e8ef8bb9672b41d7810b61f508a42ad15ef16a?d=identicon)[qwe987299](/maintainers/qwe987299)

---

Top Contributors

[![qwe987299](https://avatars.githubusercontent.com/u/11752390?v=4)](https://github.com/qwe987299 "qwe987299 (5 commits)")

### Embed Badge

![Health badge](/badges/qwe987299-flarum-auto-ban-spam/health.svg)

```
[![Health](https://phpackages.com/badges/qwe987299-flarum-auto-ban-spam/health.svg)](https://phpackages.com/packages/qwe987299-flarum-auto-ban-spam)
```

PHPackages © 2026

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