Mailbag – Comment Blocks

From the mailbag: I was wondering if you could tell me how you made your inline comments? The link you have from ScriptyGoddess has changed and shows it as expandable links. I like your style better, where each comment is in its own separate box.

I use Jennifer’s original code verbatim. That code has since been completely updated here, but for my purposes the old code is working fine. Since I run PHP pages I can do a conditional check for comments > 0 and show the inline display only if there are comments.

The box is just blockquote formating, which merely entails enclosing each individual comment in blockquote tags. If you look at a post where I do a blockquote you’ll note that it’s the same style.

To get the same effect in for your comments put the <blockquote> right after <MTComment> and put </blockquote> right before </MTComment>. Of course if your stylesheet doesn’t have blockquote defined, or it’s not boxed like mine, then you will need to work on your style sheet first.

]]>< ![CDATA[

In case you were wondering how to do the conditional “Show Comments Here” text, here is the code you can use if (and only if) you are using PHP pages for your MT site:

if (<$MTEntryCommentCount$> > 0) {

*** put all your current code here ***

<? } ?>

I’m not sure where I first saw this, but I think it was either Jennifer or Girlie

Calgon Take Me Away


  1. James Joyner January 14, 2004
  2. King of Fools January 15, 2004
  3. Val Prieto January 15, 2004
  4. Morgan January 18, 2004
  5. Christian February 2, 2004