Blog | Admin | Archives

Bernzilla Comments

Bernzilla Comments is a recent comments plugin that I developed after I was inspired by the behavior of the recent comments section on Bernie Zimmermann’s website. To be honest, I thought that his recent comments list worked rather poorly when multiple recent comments were made on the same post. For example, three recent comments on the same post would make it so no other recent coments would show up. I thought it would be a lot better if multiple recent comments on the same post were collapsed into a single heading (see my comment). I tried to get that effect, but ran into issues with MySQL’s refusal to allow the LIMIT clause in subqueries. So I rethought my direction and arrived with the WordPress Plugin that it now in use on this site.

I began with a recent comments plugin that I happened to be trying out at the time, Mt. Dew Virus’ recent comments by Nick Momrik. However, I was uninspired by the plugin’s output, so I completely rewrote it, using the original only as a template. At any rate, you can see the plugin in use on this site in the sidebar, on the left hand side as of this writing.

I have now made available the source code as well as a gzip file with the plugin. I wrote it so that all parameters are optional and the default output looks like this site’s. There is no documentation included, but I did try to make the code self-documenting, as you can see in the function declaration below:


function bernzilla_comments(
        $number = 5,
        $before_block = '<li>',
        $after_block = '</li'>',
        $before_title = '',
        $after_title = '<br />',
        $before_author = ' &raquo;',
        $after_author = '')

Leave a Reply