Configuration & Permissions
Configuring minimum character counts and bypass permissions for Minimum Post Characters on phpBB 3.3.x.
Configuration & Permissions
Minimum Post Characters is configured in two separate places: per-forum character limits in the Forum Management panel, and bypass permissions in the standard phpBB Permissions system. There is no dedicated extension settings page.
Per-Forum Minimum
ACP → Forums → Manage Forums → Edit Forum
Open any forum's edit page and scroll to the bottom of the form. You will find a new field injected by the extension:
Minimum characters per post
| Property | Value |
|---|---|
| Field | vaultbb_min_post_chars |
| Type | Integer |
| Default | 0 (no restriction) |
Set to any positive integer to enforce a minimum character count in that forum. Set to 0 to disable the restriction entirely for that forum.
The limit applies to both new topics and replies. When a user submits a post that falls below the minimum, phpBB's native error display shows a message indicating the minimum required and the user's current count. The form is re-displayed with the user's message intact so they can expand it without losing their work.
Per-forum settings are cached in phpBB's object cache with a 1-hour TTL. After saving a forum's settings, the cache entry for that forum is immediately invalidated — the new limit takes effect on the very next post submission.
How Character Counting Works
Before comparing against the minimum, the extension strips all BBCode tags from the raw post body and collapses whitespace. This prevents users from padding posts with invisible markup.
Counting uses mb_strlen with UTF-8 encoding, so every Unicode character — including multibyte characters such as CJK, emoji, and accented letters — counts as exactly one character.
| Raw message | After stripping | Count |
|---|---|---|
[b]Hello[/b] | Hello | 5 |
[quote="User"]hi[/quote] reply | hi reply | 8 |
[url=https://example.com]link[/url] | link | 4 |
spaces and tabs | spaces and tabs | 16 |
Héllo | Héllo | 5 |
Character counting is performed on the raw request body, not the stored post. phpBB internally processes BBCode before saving (encoding UIDs, generating HTML), which would make counting unreliable. The raw approach gives consistent, predictable results.
Bypass Permission
ACP → Permissions → Group Permissions or User Permissions
The extension registers one permission that controls who is exempt from the minimum character requirement:
u_minpostchars_bypass
| Property | Value |
|---|---|
| Permission | u_minpostchars_bypass |
| Category | Posting |
| Lang key | ACL_U_MINPOSTCHARS_BYPASS |
| Description | Can bypass minimum post character requirement |
Assign YES to this permission for any group or user that should be exempt. Standard phpBB permission inheritance applies — a group-level YES propagates to all members unless overridden at the user level.
Bypass order of precedence
When a post is submitted, the extension evaluates exemptions in this order:
- Administrators — any user with the
a_admin permission is unconditionally exempt. u_minpostchars_bypass= YES — users or groups with this permission bypass the check.- Forum minimum = 0 — if no minimum is configured for the forum, no check is run.
If none of the above apply, the character count is evaluated and an error is raised if it falls below the minimum.
Caching Behaviour
Per-forum settings are cached individually per forum using the key _vaultbb_minpostchars_{forum_id} with a TTL of 3600 seconds (1 hour). Cache entries are invalidated immediately on save in ACP → Forums → Edit Forum. This means even high-traffic forums perform at most one database read per forum per hour for the minimum character lookup — all subsequent post submissions within the TTL window hit only the cache.