Gregs Plugins: Because One Size Does Not Fit All

Plugins for WordPress

Greg Mulhauser

New Version of Comment Numbering Plugin Adds Features and Fixes

Just a week after its first public release, Greg’s Threaded Comment Numbering plugin for WordPress has reached release 1.1, with an increase in hierarchical numbering up to 10 levels, plus an extra new counting mode, enhanced performance, and an important fix for users encountering avatar problems.

NOTE: This article was originally published on the Psychology, Philosophy and Real Life blog and was later moved here to GregsPlugins.com.

When this plugin was originally released, the full contents of the 'README' file were provided here in this article. Since the contents of the 'README' file evolve over time, I have now removed the original version but have kept this stub posting so as to preserve the comments which were made at the time.

IMPORTANT UPDATE: This plugin now has newer versions! For information on subsequent releases, please see the update announcements here:

This new release comes with a big thank you to all the folks who have sent along feedback on the initial version — I really appreciate it!

Also, for existing users: please be sure to visit the plugin options page as soon as you upgrade to the new version, in order to specify your preferred level of numbering. The upgrade will default to level 1.
(For folks who didn’t notice this note or the corresponding one in the README file, a new version 1.1.1 release will change the level to 2 if it has never been set.)

Here’s what’s new in version 1.1:

Increased Hierarchical Numbering Levels
Previously, the plugin numbered only the first two levels of threaded comments (e.g., comment number 2 and its replies numbered 2.1, 2.2, 2.3, etc.). However, feedback from users suggests that plenty of people would like the option of numbering threaded replies at 3, 4, or even the full 10 levels supported by WordPress. So now we have it! Note that the plugin setting for maximum numbering depth operates independently of the main admin setting for how many levels of threading you allow on your blog. So you can, for example, enable 5 levels of threading on your blog while only actually numbering 2 or 3 levels.
Jumble Count Mode
Some users would rather just see the order in which their comments were submitted, and this new release makes that possible. (If you have threaded comments enabled, the order in which comments are displayed of course doesn’t match the order in which they were received, so the ‘Jumble Count’ can leave you with a sequence of numbers that looks like a bit of a jumble.) If you don’t have threading enabled, Jumble Count will give exactly the same results as a regular count. Since Jumble Count is more computationally expensive than an ordinary count, however, you should opt for a regular count whenever you have threading switched off.
Rewritten Core Numbering Routines
New routines handle the numbering in a significantly improved way, so this already speedy plugin is now even faster and more efficient.
Fix for the Built-In Basic Callback Function
Many users without their own wp_list_comments() callback functions are relying on the rudimentary callback function which is built into the plugin, and an important fix for this basic function overcomes the problem some users were having with default avatar behaviour.
Enhanced Handling of Bugs in the Way WordPress Handles Orphaned Comments
As of version 1.1.2, a new option enables more aggressive handling of bugs in the way WordPress orders orphaned threads: you can now check explicitly whether a comment’s parent has been deleted before trying to number it (since WordPress displays orphaned comments in the wrong order).

For more background on the plugin, please see the original release plugin page here: “Introducing Greg’s Threaded Comment Numbering Plugin for WordPress”.

4 Responses (2 Discussion Threads) to “New Version of Comment Numbering Plugin Adds Features and Fixes”

  1. avatar image
    lex
    1

    Doctor,

    For some reason when I use your plug-in to restore the comment numbering schema, the size of my comment font is drastically reduced. It’s practically unreadable now.

    I’ve dithered around inside the Cutline theme trying to find how to restore the comments to a more legible size unsuccessfully. Is there any chance you can point me in the right direction?

    Very much appreciate your efforts.

    • 1.1

      Hi Lex,

      I haven’t seen the code for the particular theme you’re using, but here’s my guess about what’s happening…

      First, some background:

      As you probably know, the new version of WP supports the use of a callback function to spit out the various pieces of a comment (e.g., the date, name, comment body, etc.). When a callback function spits out those various pieces, it also wraps them up with tags and classes and such to make it into a piece of valid XHTML that can be styled.

      The plugin provides a function which gets called by the callback function to deliver the comment number. (Summary so far: comment loop calls callback function, and callback function calls various functions that deliver pieces of comment, one of which is the comment number.)

      So if a WordPress theme already has a callback function, you can modify that existing callback function to include a call to the plugin to deliver the number. That way, whatever other structuring and formatting jobs the callback function might be doing won’t be disturbed.

      If the theme doesn’t have a callback function, on the other hand, then it will need one in order to take advantage of all the new WP 2.7 features. The plugin provides a very basic one which happens to yield structure and formatting along the lines of the default theme included with WordPress. It can be used as a starting point for retro-fitting older themes which do not yet include full support for the latest and greatest comment features.

      However — wow, we’re getting to my guess at last! — the catch is that the styling component of all themes will have been designed with certain assumptions in mind about how the comments will be structured and what CSS classes will be used where. So if we take a 2.7-unaware theme and plop in a callback function that delivers comments in a way the theme wasn’t expecting, the resulting styles might be all over the map. What I think you’re probably seeing is the result of using the latest WP comment loop features with a theme whose styling is built around a different structure for the comments.

      Solution 1: Contact the theme developer and encourage them to add a callback function for some WP 2.7 goodness.

      Solution 2: Switch back to your previous comments, make a careful note of exactly how they are structured, and then create a new callback function that delivers them in the same way, using the basic callback function as a starting point and modifying from there. (This amounts to doing the job of Solution 1 yourself.)

      Good luck, and all the best,
      Greg

  2. avatar image
    lex
    2

    thanks for your extended reply. In the interim, I placed some force coding in the comments css, thus:

    }
    ul.commentlist p {
    margin-top: 1em;
    }
    ul.commentlist p {
    margin-bottom: 1em;

    It’s not perfect, but it gets the job done.

    Thanks again for your plug-in, and your help.

    • 2.1

      Hi Lex,

      You’ve very welcome — I’m glad to hear the formatting end of things is at least workable, and the plugin is doing its job for you!

      All the best,
      Greg

The comment form is currently closed.