How to show comment numbers?

Hi does anyone know of a way to number the comments in a discussion? Presumably this would be through a plugin.

I'm on Vanilla 3.2.

Here's an example of a forum that has numbered comments:

That's an older version of vanilla, which is using a non-standard plugin called EnhancedComments:

But that plugin is not playing well with the theme I'm using (Keystone) on 3.2. Also it's doing other stuff besides numbering the comments which are garbling the presentation.

I could always try hacking on that plugin, but just wondering if the numbering issue has already been solved in a more mainstream way.



  • R_JR_J Ex-Fanboy Munich Moderator

    That's easy. You need a plugin which does not much more than this:

       public function discussionController_discussionInfo_handler($sender, $args) {
           echo '<span class="MItem CommentCounter">'.anchor(
               ['rel' => 'nofollow']
       public function discussionController_commentInfo_handler($sender, $args) {
           $permalink = $args['Comment']->Url ?? '/discussion/comment/'.$args['Comment']->CommentID.'/#Comment_'.$args['Comment']->CommentID;
           echo '<span class="MItem CommentCounter">'.anchor(
               '#'.strval($args['CurrentOffset'] + 1),
                   'name' => 'Item_'.$args['CurrentOffset'],
                   'rel' => 'nofollow'

    Additionally you can use some CSS that will re-order the number. I've put some quick proof of concept together. It should be pretty complete, but the css would need to be tested on different browsers. There was an error displaying this embed.

  • Thanks R_J, that’s a great help!

Sign In or Register to comment.