PHPackages                             linkrobins/link-gate - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. linkrobins/link-gate

ActiveFlarum-extension[Authentication &amp; Authorization](/categories/authentication)

linkrobins/link-gate
====================

Hide links to chosen domains behind a permission, and show everyone else your own message in their place.

v2.0.0(today)00MITPHPPHP &gt;=8.0CI passing

Since Aug 8Pushed todayCompare

[ Source](https://github.com/linkrobins/flarum-link-gate)[ Packagist](https://packagist.org/packages/linkrobins/link-gate)[ Docs](https://linkrobins.com)[ RSS](/packages/linkrobins-link-gate/feed)WikiDiscussions main Synced today

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

Link Gate for Flarum
====================

[](#link-gate-for-flarum)

[![Latest Stable Version](https://camo.githubusercontent.com/372177e0d6de52c0555edb64095cf88b9b349fdebd941752e0b9de0575e8ee07/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c696e6b726f62696e732f6c696e6b2d676174652e737667)](https://packagist.org/packages/linkrobins/link-gate)

Pick the domains you want to keep behind a permission. Anyone without it sees your own message where the link used to be, and **the address is not in the page at all**.

The part that matters
---------------------

[](#the-part-that-matters)

Plenty of setups hide a link with CSS or a bit of JavaScript. That looks right in the browser and is not a gate: the address is still sitting in the API response, so anyone can open developer tools, or fetch `/api/discussions/123` directly, and read it. If you are charging for access, that is a speed bump.

Link Gate removes the address on the server, before the post is rendered. For a reader without the permission the bytes never leave the machine, so there is nothing to find in devtools, in the page source, or in the API.

Setup
-----

[](#setup)

```
composer require linkrobins/link-gate
```

Then enable it and, on the extension's settings page:

1. **Gated domains**, one per line, for example `mega.nz`. Subdomains are included, so `mega.nz` also covers `folder.mega.nz`. Leave it empty and nothing is gated.
2. **What to show instead**: the HTML shown where a gated link used to be.
3. **Plain wording**: a short line used where HTML cannot go, mainly in notification emails.

If your forum runs in more than one language, an **Other languages** section appears under those settings, with a box per installed language. Fill one in and readers using it see that instead; leave it blank and they get what you wrote above.

Finally, on **Permissions**, grant *View gated links* to the groups that should see the real links. Nobody has it by default. It is a permission rather than a single group setting, so you can give it to several groups at once and it survives a group being renamed or recreated.

Who sees what
-------------

[](#who-sees-what)

ReaderSeesHas *View gated links*The post exactly as writtenEveryone else, members and guests alikeYour message in the link's placeThe person who posted it, and moderatorsThe post as writtenThat last row is deliberate. Flarum already sends the raw text of a post to anyone who is allowed to edit it, which is how the edit box gets filled in, so hiding the rendered link from the author would not actually hide anything. It would just confuse the person who posted it.

Things worth knowing before you rely on it
------------------------------------------

[](#things-worth-knowing-before-you-rely-on-it)

**Notification emails do not contain gated links.** When Flarum builds a notification email there is no reader attached to ask about, so Link Gate has nobody to check and refuses rather than guesses. Subscribers get your plain wording instead of the link and open the discussion to get it. Guessing the other way would mail the address to every subscriber regardless of their group, which would undo the whole thing.

This covers both halves of the message. A notification email is sent as HTML with a plain-text copy alongside it, and the plain copy is built from the post's own source rather than from the rendered version, so it needs stopping separately. Mail clients show the HTML, but the plain copy travels with it and is just as readable.

**Searching can reveal that a link exists.** Flarum's default search looks through the stored text of posts, so someone searching `mega.nz` may find that a post mentions it. They never receive the address itself, only the fact that it is there.

**Full-page caches have to vary by reader.** Post content is no longer the same for everyone, so a cache or CDN in front of the forum must vary by user, or be off for discussion pages. Flarum's own caching is fine.

**An extension that shows raw post history bypasses this.** Anything that surfaces the stored source of a post rather than the rendered version is outside what Link Gate can reach.

Release lines
-------------

[](#release-lines)

FlarumBranchVersions2.x`main``2.y.z`1.8`1.x``1.y.z`Composer picks the right one for your forum on its own, so `composer require linkrobins/link-gate` is all you need either way.

Links
-----

[](#links)

- [Report a problem](https://github.com/linkrobins/flarum-link-gate/issues)
- [Forum and support](https://linkrobins.com/forum)

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 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

Every ~0 days

Total

3

Last Release

0d ago

Major Versions

v1.0.0 → v2.0.02026-08-08

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/213107296?v=4)[Link Robins](/maintainers/linkrobins)[@linkrobins](https://github.com/linkrobins)

---

Top Contributors

[![karl-bullock](https://avatars.githubusercontent.com/u/213107296?v=4)](https://github.com/karl-bullock "karl-bullock (18 commits)")[![flarum-bot](https://avatars.githubusercontent.com/u/39334649?v=4)](https://github.com/flarum-bot "flarum-bot (1 commits)")

---

Tags

permissionsmembershipflarumlinkspaywall

### Embed Badge

![Health badge](/badges/linkrobins-link-gate/health.svg)

```
[![Health](https://phpackages.com/badges/linkrobins-link-gate/health.svg)](https://phpackages.com/packages/linkrobins-link-gate)
```

###  Alternatives

[flarum-lang/russian

Russian language pack for Flarum.

13129.1k](/packages/flarum-lang-russian)[flarum-lang/french

French language pack to localize the Flarum forum software plus its official and third-party extensions.

1941.0k](/packages/flarum-lang-french)[maicol07/flarum-ext-sso

SSO for Flarum

468.7k](/packages/maicol07-flarum-ext-sso)

PHPackages © 2026

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