Zhihe Primary Posts Extension
My first flarum extension

A Flarum extension that allows marking posts as primary content, useful for serialized stories, tutorials, guides, and any multi-part content.
Features
- Primary Post Marking: Mark posts as "primary content" vs comments/discussions
- Visual Indicators: Bookmark badges on primary posts for easy identification
- Filtering: Toggle between "Show All" and "Primary Only" views
- Author Controls: Mark/unmark controls in post dropdown menus (OP only)
- Composer Integration: Checkbox for marking posts as primary during creation
Use cases:
- π Serialized stories and episodic content
- π Tutorials and educational series
- π οΈ Development logs and progress updates
- π Guides and documentation
- π― Any multi-part content where you want to distinguish main content from discussions
Demo



Requirements
Installation
Install with Composer:
composer require zhihe/primary-posts
Enable the extension:
php flarum extension:enable zhihe-primary-posts
File Structure
zhihe-primary-posts/
βββ src/ # PHP backend code
βββ js/ # JavaScript frontend code
βββ locale/ # Translation files
βββ migrations/ # Database migrations
βββ less/ # CSS styling
βββ composer.json # Package configuration
βββ extend.php # Extension configuration
License
MIT License - see LICENSE file for details
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Links