PHPackages                             zhihe/primary-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. zhihe/primary-posts

ActiveFlarum-extension[Utility &amp; Helpers](/categories/utility)

zhihe/primary-posts
===================

Mark posts as primary content for serialized stories and multi-chapter discussions

v1.0.4(2mo ago)1804↓35.7%2MITPHP

Since Jul 31Pushed 2mo agoCompare

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

READMEChangelogDependencies (1)Versions (6)Used By (0)

Zhihe Primary Posts Extension
=============================

[](#zhihe-primary-posts-extension)

[![Latest Stable Version](https://camo.githubusercontent.com/e6125e356ef88a3343dd47419566af44330144dad29f8408fd5f1e0be70eae90/68747470733a2f2f706f7365722e707567782e6f72672f7a686968652f7072696d6172792d706f7374732f762f737461626c65)](https://packagist.org/packages/zhihe/primary-posts)[![Total Downloads](https://camo.githubusercontent.com/d751560baa250cad1eb9f31b496f167ed04e8446633229b091c930b7bcce846d/68747470733a2f2f706f7365722e707567782e6f72672f7a686968652f7072696d6172792d706f7374732f646f776e6c6f616473)](https://packagist.org/packages/zhihe/primary-posts)[![License](https://camo.githubusercontent.com/fd2f4ba722066950e1f1b20edaa18f292d2d9a96bb3ac575883655d12df5c37a/68747470733a2f2f706f7365722e707567782e6f72672f7a686968652f7072696d6172792d706f7374732f6c6963656e7365)](https://packagist.org/packages/zhihe/primary-posts)

A Flarum extension that allows marking posts as primary content, perfect for serialized stories, tutorials, guides, and any multi-part content.

Features
--------

[](#features)

- **Primary Post Marking**: Mark posts as "primary content" vs comments/discussions
- **Visual Indicators**: Bookmark badges on primary posts for easy identification
- **Smart Filtering**: Toggle between "Show All" and "Primary Only" views
- **Author Controls**: Mark/unmark controls in post dropdown menus
- **Composer Integration**: Checkbox for marking posts as primary during creation
- **Bilingual Support**: Chinese (Simplified) and English translations

Perfect for:

- 📚 **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

Requirements
------------

[](#requirements)

- Flarum 1.8.0+
- PHP 8.1+

Installation
------------

[](#installation)

Install with Composer:

```
composer require zhihe/primary-posts
```

Enable the extension:

```
php flarum extension:enable zhihe-primary-posts
```

Usage
-----

[](#usage)

### For Authors

[](#for-authors)

- **Creating Posts**: Check the "Primary" checkbox when creating discussions or replies to mark them as primary content
- **Managing Posts**: Use the dropdown menu (three dots) on posts to mark/unmark as primary

### For Readers

[](#for-readers)

- **Filtering**: Use the sidebar toggle button to switch between "Show All" and "Primary Only" views
- **Visual Cues**: Primary posts display a bookmark icon in the header

Database Schema
---------------

[](#database-schema)

The extension adds two columns to the `posts` table:

- `is_primary`: Boolean flag for primary content
- `primary_number`: Sequential numbering for primary posts (future feature)

Development
-----------

[](#development)

### Building Frontend Assets

[](#building-frontend-assets)

```
cd js/
npm install
npm run build
```

### File Structure

[](#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
-------

[](#license)

MIT License - see LICENSE file for details

Contributing
------------

[](#contributing)

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Test thoroughly
5. Submit a pull request

Support
-------

[](#support)

- **Issues**: [GitHub Issues](https://github.com/echolocked/zhihe-primary-posts/issues)
- **Documentation**: This README
- **Discussions**: [Flarum Community](https://discuss.flarum.org)

---

**Making every post count** 🔖✨

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance83

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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 ~51 days

Total

5

Last Release

87d 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 (7 commits)")

---

Tags

extensionflarumserializedstories

### Embed Badge

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

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

###  Alternatives

[fof/sitemap

Generate a sitemap

1988.7k2](/packages/fof-sitemap)[fof/mason

Add custom fields to discussions

206.0k](/packages/fof-mason)

PHPackages © 2026

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