_BuTToN_PuSHeR_

Limit for Links for phpBB 3.3.x

Limit for Links is a free, lightweight anti-spam and moderation extension for phpBB 3.3.x that allows administrators to control how many links users can include in forum posts.

Unlike simple link blockers, the extension supports two independent restrictions: a minimum amount of useful text per hyperlink and a maximum number of links per post. Both limits can be configured globally or overridden for individual user groups.

Version 1.0.1 introduces per-group limits, an optional maximum link count and fully customizable warning messages in all 13 supported languages.

Support and discussion on phpBB.com: Limit for Links extension topic.

Configurable link limits in ACP

All restrictions can be managed directly from the phpBB Administration Control Panel (ACP). No modifications to phpBB core files are required.

The extension provides two independent settings:

  • Characters per link: defines how much useful text is required for each hyperlink. The default is 1024 characters per link. For example, a post containing three links must contain at least 3072 characters of useful text.
  • Maximum links per post: defines the absolute number of hyperlinks allowed in a single message. Set this value to 0 to disable the absolute maximum.

Both restrictions can be active simultaneously. By default, the maximum link count is unlimited, preserving the original behavior of version 1.0.0.

Limit for Links extension settings in phpBB Administration Control Panel

When a submitted message violates an active restriction, the extension displays a localized warning before publication. The user can then edit the message and submit it again.

Individual limits for user groups

Starting with version 1.0.1, administrators can configure separate link restrictions for each phpBB user group.

Each group has two independent settings: characters required per link and the maximum number of links allowed per post.

Group settings support three different behaviors:

  • Empty field: inherit the corresponding global setting.
  • 0: disable that particular restriction for the group.
  • Positive number: override the global setting with a custom group limit.

If a user belongs to multiple groups with explicitly configured limits, the extension applies the least restrictive value for each setting independently. An unlimited value of 0 takes priority over positive limits.

For example, a user belonging to both a registered-users group and a trusted-members group can receive more permissive link limits through the trusted-members group.

Disabling the characters-per-link requirement does not automatically disable the maximum link count, and vice versa.

Administrators can also be exempted from link restrictions through a separate ACP setting.

Customizable warning messages

Version 1.0.1 allows administrators to edit the warning messages displayed when users attempt to publish posts that exceed the configured limits.

Two message types are supported:

  • Insufficient useful text for the number of links.
  • Too many links in a single post.

Warning messages can be customized independently for every supported language directly in ACP.

The following placeholders are available:

  • {links} — number of links detected in the message.
  • {missing} — additional characters required to satisfy the text-to-link restriction.
  • {limit} — maximum number of links permitted.

For example, a warning can display the number of detected links and explain exactly what the user must change before submitting the post.

Leaving a custom warning field empty restores the built-in translation for that language. Messages are handled as plain text.

Features

  • Configurable minimum useful-text requirement per hyperlink
  • Configurable maximum number of links per post
  • Independent link restrictions for individual user groups
  • Unlimited group restrictions using the value 0
  • Automatic inheritance of global settings
  • Support for users belonging to multiple groups
  • Optional administrator exemption
  • Checks new topics, replies and edited posts
  • Localized warnings before message publication
  • Editable warning messages for all supported languages
  • Customizable message placeholders
  • Settings managed through the phpBB Administration Control Panel
  • No modifications to phpBB core files
  • Uses the standard phpBB extension system
  • Can be enabled, disabled and removed through ACP
  • Multilingual interface with 13 supported languages

Supported languages

Version 1.0.1 includes translations for the following 13 languages:

  • Czech
  • German
  • English
  • Spanish
  • French
  • Hebrew
  • Italian
  • Polish
  • Portuguese
  • Brazilian Portuguese
  • Russian
  • Turkish
  • Ukrainian

Administrators can customize both warning messages separately for each language without editing translation files.

Requirements

  • phpBB 3.3.x
  • PHP 7.2 or newer, compatible with the installed phpBB release

Installation

Download the extension archive and extract it. The extension directory must be placed in:

/ext/buttonpusher/limit4links/

The resulting structure should look like this:

phpBB/
└── ext/
    └── buttonpusher/
        └── limit4links/
            ├── composer.json
            ├── ext.php
            ├── config/
            ├── controller/
            ├── event/
            ├── helper/
            ├── language/
            ├── migrations/
            └── adm/

After uploading the files, open:

ACP → Customise → Manage extensions

Find Limit 4 Links in the list and click Enable.

The extension settings will then become available in ACP, where you can configure global limits, individual group restrictions and multilingual warning messages.

Updating

To update from version 1.0.0 to 1.0.1:

  1. Disable the extension in ACP.
  2. Replace the entire directory /ext/buttonpusher/limit4links/ with the files from version 1.0.1.
  3. Enable the extension again to apply the new migration.
  4. Clear the phpBB cache.
  5. Open the extension settings in ACP and configure the new options if needed.

Existing characters-per-link settings are preserved. The new maximum link count defaults to 0 (unlimited), while group overrides and custom warning messages are initially empty.

Do not use the Delete data option when performing a normal update.

Uninstallation

If you want to completely remove the extension:

  1. Disable Limit 4 Links in ACP.
  2. Click Delete data.
  3. Delete the directory /ext/buttonpusher/limit4links/ from the server.

Changelog

Version 1.0.1 — October 20, 2026

  • Added individual characters-per-link limits for user groups.
  • Added individual maximum-links-per-post limits for user groups.
  • Added a configurable global maximum number of links per post (0 = unlimited).
  • Added support for unlimited group restrictions using the value 0.
  • Added inheritance of global settings through empty group fields.
  • Added automatic resolution of multiple group memberships using the least restrictive explicit limit.
  • Added customizable warning messages for insufficient useful text and excessive link counts.
  • Added warning message editors for all 13 supported languages.
  • Added support for the {links}, {missing} and {limit} placeholders in warning messages.
  • Preserved existing settings when upgrading from version 1.0.0.
  • Corrected the extension homepage URL in composer.json.
  • Improved phpBB Extension Pre Validator compatibility by replacing direct htmlspecialchars() calls and adjusting SQL query construction.

Version 1.0.0 — September 26, 2026

  • Initial public release.
  • Added configurable minimum useful-text characters per hyperlink.
  • Added validation of links in new topics, replies and edited posts.
  • Added localized error messages.
  • Added Administration Control Panel settings.
  • Added support for 13 interface languages.

Acknowledgements

Thanks to the phpBB community for valuable suggestions that helped improve the extension.

Special thanks to bonelifer for suggesting configurable limits for individual user groups and to Brf for proposing an additional maximum number of links per message.

Both suggestions have been implemented in version 1.0.1.

Download

You can download the current release here:

Download Limit 4 Links 1.0.1

Version

Current version: 1.0.1

Limit for Links is distributed as a free, open-source phpBB extension under the GNU General Public License version 2 (GPL-2.0-only).

The extension is compatible with phpBB 3.3.x and does not require modifications to phpBB core files.

Comments (0)

Kherson TOP