Adds a #N number to each post in a discussion. Ported to Flarum 2.0 from ziven/flarum-post-number.
composer require linkrobins/post-num
Then enable it in your forum's admin panel under Extensions.
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).
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.
The number comes from Flarum's own per-discussion post number, not a count the extension keeps. That has two consequences worth knowing:
#42 in a quoted link still points at the same post later.Hidden posts are skipped entirely: if a post is hidden, no number is rendered for it rather than a number for something you cannot read.
The number renders as a <span class="LinkRobinsPostNum"> in the post header, alongside the timestamp. Restyle it from your theme's custom LESS:
.LinkRobinsPostNum {
opacity: .5;
font-variant-numeric: tabular-nums;
}
The original extension targeted Flarum 1.x and relied on a webpack/JSX build pipeline. This 2.0 port:
flarum/core ^2.0extend() helper from the export registry with string-path lazy module resolution, so no JSX/build step is requiredpost.number(), post.isHidden()) with fallback to raw attribute access for resilienceLinkRobinsPostNum to avoid colliding with the original if both are ever installed side-by-sideTranslation strings follow the same shape — the only difference is the namespace key.