PHPackages                             zhihe/restricted-posts - 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. zhihe/restricted-posts

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

zhihe/restricted-posts
======================

Allow post authors to mark their posts as restricted content

v1.0.2(2mo ago)024121MITPHPPHP ^8.1

Since Aug 12Pushed 2mo agoCompare

[ Source](https://github.com/echolocked/zhihe-restricted-posts)[ Packagist](https://packagist.org/packages/zhihe/restricted-posts)[ RSS](/packages/zhihe-restricted-posts/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (1)

Restricted Posts for Flarum
===========================

[](#restricted-posts-for-flarum)

[![Latest Stable Version](https://camo.githubusercontent.com/cd3b959e5f1ed7ea813a0cd36353424cad6e6e2827e9f61b87bdef1022a27226/68747470733a2f2f706f7365722e707567782e6f72672f7a686968652f726573747269637465642d706f7374732f762f737461626c65)](https://packagist.org/packages/zhihe/restricted-posts)[![Total Downloads](https://camo.githubusercontent.com/4da0f9f79642c507a7f1f9a9d1a9f64ad0483b24b583a3b8c519ebfb85856948/68747470733a2f2f706f7365722e707567782e6f72672f7a686968652f726573747269637465642d706f7374732f646f776e6c6f616473)](https://packagist.org/packages/zhihe/restricted-posts)[![License](https://camo.githubusercontent.com/f749fd4f9822dc1ca7aa6d8abf79538f776196dfcc20a6cf90d71b513deae968/68747470733a2f2f706f7365722e707567782e6f72672f7a686968652f726573747269637465642d706f7374732f6c6963656e7365)](https://packagist.org/packages/zhihe/restricted-posts)

A Flarum extension that allows post authors to mark their posts as restricted content with visual indicators and integrated access control.

✨ Features
----------

[](#-features)

- 🔒 **Post Marking**: Post authors can mark their own posts as restricted
- 🎯 **Visual Indicators**: Lock icon badges appear on restricted posts
- ⚙️ **Post Controls**: Easy mark/unmark via post dropdown menu
- 📝 **Composer Integration**: Checkbox to mark posts as restricted during creation
- 🌐 **Multi-language**: English and Chinese (Simplified) support
- 🔗 **Extension Integration**: Works with money systems and access control

📋 Requirements
--------------

[](#-requirements)

- Flarum 1.8.0+
- PHP 8.1+

🚀 Installation
--------------

[](#-installation)

```
composer require zhihe/restricted-posts
php flarum extension:enable zhihe-restricted-posts
php flarum migrate
```

Usage
-----

[](#usage)

### For Post Authors

[](#for-post-authors)

- Use the "Restricted" checkbox when creating posts
- Mark existing posts via the post dropdown menu (⋮)
- Only post authors can mark/unmark their own posts

### Visual Design

[](#visual-design)

- 🔒 Orange lock badge appears on the right side of post headers
- Works alongside zhihe-primary-posts bookmark badges
- Consistent styling with Flarum's design system

🔗 Integration
-------------

[](#-integration)

This extension is designed to work seamlessly with:

- **zhihe-money-system**: Provides the `is_restricted` flag for money-based content filtering
- **zhihe-primary-posts**: Compatible badge positioning
- **Access control systems**: Integrates with permission-based restrictions

🛠️ Development
--------------

[](#️-development)

### Local Development Setup

[](#local-development-setup)

```
git clone https://github.com/echolocked/zhihe-restricted-posts.git
cd zhihe-restricted-posts
composer install
cd js && npm install && npm run build
```

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License
---------

[](#-license)

MIT License

🆘 Support
---------

[](#-support)

- **Issues**: [GitHub Issues](https://github.com/echolocked/zhihe-restricted-posts/issues)
- **Community**: [Flarum Community Forum](https://discuss.flarum.org)

---

*Love this extension? Consider starring the repository and sharing it with the Flarum community! ⭐*

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance83

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~96 days

Total

3

Last Release

85d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

contentextensionpostsflarumrestricted

### Embed Badge

![Health badge](/badges/zhihe-restricted-posts/health.svg)

```
[![Health](https://phpackages.com/badges/zhihe-restricted-posts/health.svg)](https://phpackages.com/packages/zhihe-restricted-posts)
```

###  Alternatives

[fof/terms

Ask users to accept terms of use before using the forum

1367.8k1](/packages/fof-terms)[fof/passport

The OAuth2 (and Laravel passport) compatible oauth extension

3013.3k](/packages/fof-passport)

PHPackages © 2026

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