“Greg’s Threaded Comment Numbering Plugin for WordPress” Comments, Page 1

avatar image

You are currently browsing page 1 of comments on the article Greg’s Threaded Comment Numbering Plugin for WordPress.

More on WordPress plugins

Greg’s WordPress plugins available at CounsellingResource.com can help you to:

Would you like to reach the community of bloggers using particular plugins? Check out the Sustainable Plugins Sponsorship Network.

You are currently browsing comments. If you would like to return to the full story, you can read the full entry here: “Greg’s Threaded Comment Numbering: Number Your WordPress 2.7 Comments the Easy Way”.

97 Responses (Including 29 Discussion Threads) to “Greg’s Threaded Comment Numbering Plugin for WordPress”

  1. avatar image
    baron
    1

    hi. Thanks for plugin

    perfect.

    Regards


  2. avatar image
    George Serradinho
    2

    Wow, thanks for the plugin.

    Did you see it’s WP Developers Day on Wordpress


    • 2.1

      You’re welcome!

      Ironically enough, I didn’t even notice that it was Developers’ Day on WordPress.org — it was a total coincidence that it just happened to fall on the day I was uploading the plugin to the repository. Oooh, maybe it’s a sign?

      All the best,
      Greg


  3. avatar image
    Iwan Setya Putra
    3

    Hi,

    I am using WP 2.7 and Digital_Statement theme.

    I search on comments.php but there is no wp_list_comments() in it.

    So how to use this plugin on my theme ?


  4. avatar image
    Tanim
    4

    Hi! Thanks for this plugin. I’ve been looking for this type of plugin for my blog. I like it…


  5. 5

    [...] Greg’s Threaded Comment Numbering [...]


  6. avatar image
    Philip S
    6

    Hi Greg,

    This is just what I was looking for!

    Now I may be doing something wrong, but after I installed it and added the code to the comments.php it all seemed to be working flawlessly.

    Then I noticed all the replies share the *same* number series, so the first reply to any comment will be correct (reply to comment 1 will be 1.1) but a second reply to another comment will be incorrect (reply to comment 2 will be 2.2 not 2.1).

    If you look at the comments to this post, you’ll see that your reply to comment 3 is correct (3.1) buy your reply to comment 2 is incorrect, and shows 2.2 not 2.1.

    It his supposed to be like that (in which case sorry for bothering you) or is it a bug? If it is, when do you plan to fix it? (sorry for being pushy but I really like the concept of this plugin!)

    If and when you do fix this ‘bug’, while you’re under the hood with your code spanner is it possible to include an option to allow the deeply nested numbers all the way up to #.10.10.10. I would like to include them as a little tag to each comment.

    Many thanks,

    Philip S


    • 6.1

      Hey, many thanks for that Philip! That nested comment numbering problem was a silly mistake on my part, and the fix is now in the repository — it should be available as the 1.0.2 update within a few minutes.

      When it comes to numbering more deeply nested comments, it gets a fair bit trickier to manage the overheads. That’s not to say I’m totally averse to adding that feature, but it’s something that would cost me quite a bit more time to code up, so it will probably be awhile before I tackle that one.

      In any case, thanks again for the bug catch!

      All the best,
      Greg


    • avatar image
      Philip S
      6.2

      Thanks for the quick response – I shall keep and eye out for the update! (I did notice that your reply to my comment is correct ;) )

      As for ‘deeply nest comments’ I do hope you have a crack at it, because I think it would solve a lot of problems with blogs with threaded comments set to depth-10 which can become horrendously complex and confusing to navigate during intense discussions. Yet nested comments are a very nice way to talk and would be great if you could pull it off.

      I know the style of the nested comments can help with the clarity, but having a little tag on top of each post so someone can double check when running their eye down a really long list of replies, bypassing other nested comments, to get to the next on they are after would be great.

      However, if the coding gets too much, how about a ‘depth’ option and merely echo the depth of the post? Not quite what you intended with your plugin but it may be handy for really deep nested replies (instead of ‘…’ as it is now). It may be a simple fudge (I’m really interesting in the practical application rather than intellectual purity!)

      Anyway, thanks for you hard work and I look forward to any developments :D

      Philip


  7. avatar image
    HotForWords
    7

    I added the plugin to my site, but it appears to mess up on the early comments.. they show “…” instead of the number.

    You can see it in action here.

    I added in some fun stuff to allow for alternating colors as that is a feature of wp 2.7

    Let me know if you want my code for that (it’s just some css).

    Thanks!

    Marina


    • 7.1

      Marina, many thanks for that — your list of comments included some nesting sequences which I hadn’t adequately accounted for, and which I might never have encountered otherwise.

      Anyway, it’s fixed now!

      The new version should be showing up in the plugin repository right about now.

      Thanks again,
      Greg


  8. avatar image
    Jehzeel Laurente
    8

    oh cool.. but I’m still skeptical in adding this to my blog. Hmmmm… but anyway, this plugin really did its purpose of numbering the comments :D


    • 8.1

      Hi Jehzeel,

      Actually, the plugin is only intended for blogs running 2.7+, so installing it right now wouldn’t get you very far. :-)

      But if you decide to go with 2.7, feel free to give it a whirl.

      All the best,
      Greg


  9. avatar image
    HotForWords
    9

    The plugin seems to be working fine for me, but it all appears a bit whack as I go 3 levels deep and the amount of …’s get almost makes me want to kill the plugin.

    I have an idea… how about offering the option to juset number the comments, regardless of whether they are nested or not.. just number them in the sequential order in which they are posted. That way, it might be easier for you?

    I don’t mind having a comment counter reflect the actual number of comments, and it would be fun to see the order in which comments appear as they will be sequentially numbered.

    What do you think?


    • 9.1

      Hi Marina,

      I’m glad to hear it’s working for you now — and by the way, you can shut off all those ellipses in the plugin’s options page. (Just set it to display a blank instead of an ellipsis.)

      It certainly is possible just to number them in the order received, although this turns the sequence into an apparently unstructured jumble because the structure of temporal ordering doesn’t match the structure of threading. Your numbers might look like this: 2, 107, 19, 43, 612, 112, 31, etc.

      Having said that, it’s certainly something I could look into adding to the plugin — an override setting to allow you just to have temporal numbering without regard for threading or the order in which comments are being displayed.

      Together with Philip S’s request for numbering at deeper levels of nesting, that’s two possible new features that could be added…

      All the best,
      Greg


  10. avatar image
    Rudi
    10

    My thame use: <?php wp_list_comments(’type=comment&avatar_size=48′); ?

    In order to use Threaded Comment Numbering Plugin I add callback=gtcn_basic_callback, so the complete is:
    <?php wp_list_comments(’type=comment&avatar_size=48&callback=gtcn_basic_callback’); ?

    In doing that the commentator’s photo only the default (gravatar) and cannot be change to use wavatar. How can I make the default photo to wavatar.

    In addition, If I want to add the code <?php if (function_exists(’gtcn_basic_callback’)), appears error. What code should I use in case some day I don’t use the plugin anymore. Thanks.


    • avatar image
      HotForWords
      10.1

      I did the following to allow for my wavatars, which were selected in the admin area of Wordpress, but lost when I used the code above.

      I made this the link in the comments:

      Then in the functions.php I added this code:

      [Whoops, had a problem display the code correctly, but see later post -- GM.]

      If this code doesn’t work I’ll post links to a text file.

      But it all works perfectly for me now. You can see it in action at http://www.hotforwords.com


    • avatar image
      HotForWords
      10.2

      Enter the following code into the comments.php and functions.php.

      It allowed me to have the wavatars as the default and works perfectly for me.

      http://www.hotforwords.com/files/gregs.txt


    • 10.3

      Hmm, not sure on the trouble you’re having with testing whether the function exists, Rudi, as it’s definitely there — you can tell by the fact that it works when you include it in your wp_list_comments call.

      However, Marina’s suggested use is much better (IMHO): if you put together your own callback function, you can craft it however you like, rather than relying on the plain old default given in the WordPress Codex.

      All the best,
      Greg


    • avatar image
      Philip S
      10.4

      Would it be possible to include Marina’s code into the plugin, to show the Avatar according to the options set in the Admin area?


    • 10.5

      Hi Philip,

      Marina’s code gets rid of the ‘path to url’ text which I’d left in there from the Codex but which of course needs to be swapped out to avoid thwacking the gravatar function call — I’ve stripped that out in the pending new release (see below).

      More sophisticated callback functions, though, are very much a theme-dependent matter, rather than something I can build into the plugin. I.e., one builds a callback function to fit with one’s theme, and uses the plugin to spruce it up. It’s the callback function itself that is responsible for calling the plugin functions, rather than the plugin setting out what the callback function should be. (Does that make sense?)

      The good news is that a new version of the plugin is now basically ready, and it will provide up to full 10-layer numbering as well as a special counting mode for just numbering comments in the order received. I’d like to do a smidgen more testing before releasing it, but it will be any day now!

      All the best,
      Greg


    • avatar image
      Philip S
      10.6

      10-layer numbering – excellent!

      Thank you for adding in this functionality, I am subscribed to this post so as soon as it’s ready I grab a copy!

      As for the ‘call back function’ – I was suggesting that the default of the plug-in should show the Avatars the user is expecting to see (i.e. the options they already ticked off in their Admin section).

      I can mess about with custom call back functions to get it back to what is was, but I suspect a lots of users of your plug-in will want the same functionality, and consider it hassle that is don not work they way they expected (or wished for!)

      Still the coolest of plug-ins ;)

      Philip


    • 10.7

      Hi Philip,

      Sorry, I wasn’t very clear — the only reason the built-in callback function was not providing gravatar defaults as set in the admin preferences was because it still had a leftover bit of ‘path to url’ text left from the version shown in the WordPress Codex. When that is removed, and the $default parameter removed from the gravatar function call, it works fine. I.e., that’s the only thing that is different in Marina’s code, except for slightly different positioning of the number itself. That leftover text is gone from the new version.

      All the best,
      Greg


Page 1 of 512345»

Join the Discussion!

We support Gravatars rated PG or G; if you don't have a Gravatar, we'll display a mathematically created identicon next to your comment.

A valid email address is required to enable you to personally verify and authorize your comment for posting. It will not be displayed in your post or used in any other way. SPAM comments will be deleted, as will those attempting to circumvent the Gravatar rating system or attempting to circumvent our Terms of Use by employing Gravatar images to advertise on this site.

 characters available

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting