linkrobins/post-num 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

linkrobins/post-num

最新稳定版本:v1.0.0

Composer 安装命令:

composer require linkrobins/post-num

包简介

Adds a #N number to each post in a discussion. Ported to Flarum 2.0 from ziven/flarum-post-number.

README 文档

README

Adds a #1, #2, #3... number to each post in a discussion. Helpful for referring to specific posts ("see #4 above") and giving readers a sense of where they are in a long thread.

Ported to Flarum 2.0 from ziven/flarum-post-number (MIT).

What it does

Extends CommentPost.headerItems to append a small #N label to each post's header, where N is the post's sequence number within its discussion. Hidden posts are skipped, matching the original extension's behavior.

Requirements

  • Flarum 2.0 or later
  • PHP 8.2 or later

Installation

composer require linkrobins/post-num
php flarum cache:clear

In Flarum admin → Extensions, find Link Robins Post Numbers and enable it. No configuration needed.

What changed from the 1.x original

The original extension targeted Flarum 1.x and relied on a webpack/JSX build pipeline. This 2.0 port:

  • Targets flarum/core ^2.0
  • Uses the runtime extend() helper from the export registry with string-path lazy module resolution, so no JSX/build step is required
  • Uses the canonical 2.0 model accessors (post.number(), post.isHidden()) with fallback to raw attribute access for resilience
  • Renames the CSS class to LinkRobinsPostNum to avoid colliding with the original if both are ever installed side-by-side
  • Adds tabular-numeric digit alignment so post numbers stay column-aligned in lists

Translation strings follow the same shape — the only difference is the namespace key.

License

MIT. Credit to the original author for the design.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 8
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固