wszdb / flarum-autolock
Automatically lock discussions when they reach a specific number of posts
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:flarum-extension
pkg:composer/wszdb/flarum-autolock
Requires
- flarum/core: ^1.0
README
A Flarum extension that automatically locks discussions when they reach a specific number of posts.
Features
- 🔒 Automatically lock discussions when they reach a configurable post threshold
- ⚙️ Easy configuration through admin panel
- 🌍 Multi-language support (English & Chinese)
- 🎯 Simple and lightweight
- 🔧 No database modifications required
Installation
Install with composer:
composer require wszdb/flarum-autolock
Usage
- Enable the extension in your Flarum admin panel
- Go to extension settings
- Configure the post threshold (default: 100 posts)
- Enable/disable the auto-lock feature as needed
Configuration
Admin Settings
- Enable Auto Lock: Toggle to enable or disable the automatic locking feature
- Post Threshold: Set the number of posts after which a discussion will be automatically locked (minimum: 1)
How It Works
When a new post is created in a discussion:
- The extension checks if auto-lock is enabled
- If enabled, it counts the total number of posts in the discussion
- If the count reaches or exceeds the configured threshold, the discussion is automatically locked
- Already locked discussions are skipped
Requirements
- Flarum 1.0 or higher
- PHP 7.4 or higher
Links
Support
If you encounter any issues or have suggestions, please open an issue on GitHub.
License
This extension is licensed under the MIT License.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Made with ❤️ for the Flarum community