SimpleComments

Freshness Warning
This article is over 15 years old. It's possible that the information you read below isn't current.

TrackBacks are comments. They are comments left on someone else’s site rather than your own, but they are comments nonetheless. Movable Type makes a distinction between entry comments and TrackBacks that seems artificial, and it made more sense to me to have TrackBack ping data appear within the comments portion of a Movable Type site.

SimpleComments is a new plugin that will let you do just this. Comments and Trackbacks are merged into a single list. Comment counts include the number of TrackBack pings, and best of all, you don’t need to learn new MT tags in order to do this.

Download

Simplecomments 1.34 (updated Jul 24, 2006)

Installation

Unzip the SimpleComments zip file to a directory on your computer.

Copy the plugins and php directories to the MT directory on your server.

Usage

Simplecomments gives you a couple of new tags that complement the existing set of Movable Type comment and ping tags.

  • <MTSimpleComments>
    The main container tag. This tag will create a list of comments and pings sorted by date. You can use the MT comment sort order settings to display the comments in ascending or decending order, or you can configure the order in your templates using the same sort_order attribute as the built-in MTComments tag. You can also use lastn=&#8221;N&#8221; to limit the total number of comments and pings displayed. Under MT3+ only approved comments are displayed. If you want to show unapproved comments as well, add an attribute of moderate=&#8221;0&#8221;. You use standard MTComment… and MTPing… tags inside this container to output your comment and ping data.

    If you use this tag inside an entry, only the comments for that entry will be displayed. If you use it outside an entry, all comments will be displayed in ascending or descending order, depending upon your sort_order attribute. The default sort order is defined in your blog config.
  • <MTSimpleCommentCount>
    A unified count of your comments and pings. If you have 3 comments and 2 pings, <span class="caps">MTS</span>impleCommentCount will display 5.
  • <MTSimpleCommentNumber>
    The numeric order of the current comment or TrackBack. For the first SimpleComment, it reads 1. For the second, 2, and so on.
  • <MTSimpleCommentOdd>
    Returns 1 if the current SimpleComment is odd and 0 if it is even. Useful for setting alternating background colors with stylesheets. Use something like class=&#8221;commentbg<MTSimpleCommentOdd>&#8220; and create classes for commentbg0 and commentbg1.
  • <MTSimpleCommentIfTrackback>
    The <span class="caps">MTS</span>impleComments tag is going to give you a list that has both comments and TrackBack pings. Since comments and pings use a different set of MT tags, you can use this conditional container to output data for trackbacks. The contents of this tag will only be displayed if the current item in the comment list is a TrackBack.
  • <MTSimpleCommentIfComment>
    Just like <span class="caps">MTS</span>impleCommentIfTrackback, the contents of this tag will only be displayed if the current item in the comment list is a Comment. See the example below to help you understand how this works.
  • <MTSimpleCommentEntry>
    This container tag works just like the MTCommentEntry tag and contains the entry on which the comment or TrackBack was made. Using this tag, you can use MTEntry tags to get entry data for that SimpleComment.
<MTSimpleComments lastn="5">
<MTSimpleCommentEntry>
This comment was made on the entry <MTEntryTitle>.
</MTSimpleCommentEntry>
</MTSimpleComments>

Example

<p><MTSimpleCommentCount> Comments</p>
<MTSimpleComments>
<MTSimpleCommentIfTrackback>
<a name="trackback-<MTPingID>"></a>
<p><b><a href="<MTPingURL>"><MTPingBlogName></a></b> 
<$MTPingDate format="%b %e, %Y %l:%M %p"$><br />
<MTPingExcerpt><br />
Read more in <a href="<$MTPingURL$>"><$MTPingTitle$> &raquo;</a></p>
</MTSimpleCommentIfTrackback>

<MTSimpleCommentIfComment>
<a name="comment-<MTCommentID>"></a>
<p><b><$MTCommentAuthorLink$></b> 
<$MTCommentDate format="%b %e, %Y %l:%M %p"$><br />
<$MTCommentBody$></p>
</MTSimpleCommentIfComment>
</MTSimpleComments>

License

Like my other freeware, this plugin is released under the open-source MIT License. In plain English, that means you can do whatever you want with the software, including modifying it, selling it, or eating it, but I’m not responsible for anything that goes wrong.

The PHP port was created by Brad Choate and is also released under the MIT license.

Revision History

1.34 - Jul 24, 2006

  • (fix) Errors when using MTSimpleCommentEntry tags in templates (Thanks to Jaques Distler for the bug report)

1.33 - Jul 12, 2006

  • (fix) Errors when rebuilding templates under MT 3.3
  • (fix) Integrated patches from Cameron Bulock and Joe D’Andrea to handle MT’s TrackBack anti-spam tools

1.32 - Oct 24, 2004

  • (fix) when used outside an entry with the lastn attribute and there are recent unapproved comments, the list of comments wasn’t what you’d expect.
  • (new) PHP version for dynamic templates courtesy Brad Choate
  • (changed) Easier installaion. Uses SelfLoader so the entire perl plugin is contained in a single file. The Module previously in MTPlugins is no longer needed and can be deleted if desired. Idea from Brad Choate, who’s Perl Fu is much stronger than mine.
  • (new) The plugin is listed as an installed plugin in the MT user interface on MT3 or later

1.31 - Oct 18, 2004

  • (fix) Uninitialized value warnings when the moderate parameter wasn’t used.

1.3 - Oct 12, 2004

  • (new) The moderate attribute controls the display of unmoderated comments under MT3+. The default is to show approved comments only.

1.2 - July 27, 2004

  • (new) support for MT 3.x comment statuses. Only approved comments show up.

1.11 - Apr 24, 2003

  • (Fix) SimpleCommentEntry didn’t work for trackbacks outside an entry context. Thanks to Jacques Distler for the initial bug report and Alexei Kosut for the patch.

1.1 - Apr 23, 2003

  • SimpleComments can now be used outside an entry, thanks to Mark Paschal.
  • Added SimpleCommentNumber tag.
  • Added SimpleCommentOdd tag
  • Added SimpleCommentEntry container
  • Moved bulk of code into an external module to improve MT performance

1.0 - Feb, 2003

  • Initial release.

Joe D'Andrea
February 28, 2005 7:24 PM

Wishlist request (or if this is pilot error, let me know that too): Would like to be usable outside of individual entries (and give the total tally), just like can be used in a similar fashion. (Nice job with the plugin BTW!)

Daniel A. Munz
March 5, 2005 10:16 PM

Moderation question: It seems like if I have your plugin designed to list the last 10 comments, and my last 9 comments have been blocked pending moderation, the plugin only shows one comment. Is there a way to have the plugin only display the last X *non-moderated* comments? Thanks!

Christian
March 6, 2005 6:31 AM

Just wondering if the: Undefined subroutine MTPlugins::simplecomments::SimpleCommentCount at lib/MT/Builder.pm line 139 bug was fixed. I'm currently setting up a photoblog with posts set as future as far as one month from now and my indexes aren't being rebuilt, which really makes me using scheduled posting useless. Thanks!

Red Wolf
April 22, 2005 9:43 PM

I've also just started getting the bug... Undefined subroutine MTPlugins::simplecomments::SimpleCommentCount at lib/MT/Builder.pm line 139 ...since the upgrade to 3.16. But there's a post on the MT Support Forum reporting it happening in 3.14... http://www.movabletype.org/support/index.php?act=ST&f=28&t=48607

Kory Doszpoly
May 6, 2005 12:42 AM

I am pretty new to this stuff, but this blog has answered questions that had me run up the wall! Thanks a bunch.

demonsurfer
August 27, 2005 10:40 PM

Just tried this with MT3.2 as it was one of my fav plugins up until now.. unfortunately, when listing all X recent comments/trackbacks, it includes all the junk comments and trackbacks as well, which is utterly useless. I hope you'll have time to look at a new release in the near future, I'm sure a lot of people would appreciate it. Cheers.

Jason
September 7, 2005 8:04 PM

Awesome! I just implemented it on my site, so I can mix all the comments and trackbacks together into one listing. One request that, with MT 3.2 now out, is semi-important: is there a way to make SimpleComments adhere to the new junk scoring system used in MT 3.2? Right now, it only includes approved comments, but TrackBacks are a problem -- any TrackBacks that are deemed junk by MT 3.2 (and thus not displayed) are still included in the SimpleComments container. I think it'd be as simple as checking the tbping_visible column in the mt_tbping table.

yukino
September 8, 2005 10:35 AM

Hi Adam! Just a couple notes: 1) SimpleComments 1.32 with MT 3.2 seems to be publishing trackbacks in the new "junk" folder. 2) Brad's PHP version of MTSimpleCommentCount is producing empty text -- I read a reference elsewhere on the web that said it seems to work only inside MTSimpleComments blocks and that seems to jibe with what's happening on my blog. I had to move to the unofficial 1.31 version of that tag to get the right behavior.

Joe D'Andrea
September 8, 2005 9:52 PM

Greetings! I've tried my hand at a SimpleComments mod (Perl version) that gets it living in harmony with MT 3.2's SpamLookup suite: http://www.joesapt.net/archive/2005/09/09/00.21.59/

Gary LaPointe
November 29, 2005 9:35 AM

So I've got MTSimpleComments working and I'm doing a "Recent Commenters + Pingers" list in my blog sidebar. BUT what what I've got it to say for a ping is "J.A.S.O.N. pinged from What Sort of Intellectual Are You?" The title of the post is his post and it links back to his post. What I want is for it to be the name of my post that he pinged and the link to that same post (I'll liknk their name back to their post). That's the way my comment links are like: "kazza on Christmas Tree Assembly" Any tips? I thought I had it working but then I realized the name of the post they pinged from was identical to my post name... I'm using MT3.2 and my site supports php and mySQL and SimpleComments 1.32. THANKS! I'll keep trying but I'm considering it might not be possible.

sda
March 16, 2006 8:56 AM

looks cool

Matt Moore
July 12, 2006 7:11 PM

The link to simplecomments1.33.zip doesn't seem to be working.

Henrik Gemal
July 13, 2006 10:21 AM

You forgot to change the version number to 1.33. It still says 1.32 in SimpleComments.pl

Pad
September 6, 2006 3:34 PM

well, it seems like someone fixed it, thank you.

Michael Croft
October 3, 2006 9:01 PM

MTSimpleCommentCount off by one in 1.34? It looks like it on my first entry. Not sure what's going on, will look at that and see if I can help trace it down.

These are the last 15 comments. Read all 84 comments here.

This discussion has been closed.

Follow me on Twitter

Best Of

  • The mouse and me Not only is the mouse very destructive, but it's evaded all attempts to capture or kill it so far.
  • Lock-in is bad T-Mobile thinks they'll get new Hotspot customers with exclusive content and locked-in devices.
  • Newly Digital Newly Digital is an experimental writing project. I've asked 11 people to write about their early experiences with computing technology and post their essays on their weblogs. So go read, enjoy, and then contribute. This collection is open to you. Write up your own story, and then let the world know about it.
  • Pitching Bloggers Forget what you learned in your PR classes. Start acting like a human instead of a marketer, and the humans behind the blogs will respond.
  • California State Fair The California State Fair lets you buy tickets in advance from their Web site. That's good. But the site is a horror house of usability problems.
  • More of the best »

Recently Read

Get More

Subscribe | Archives

15

Recently

Stretching your team (Jun 11)
Stretching your team is one of the best ways to improve your output, your team's happiness, and your velocity. But they'll need coaching.
Physical camera shutter for Cisco Spark Board (Jul 6)
A 3d printable design for a camera shutter for a Cisco Spark Board
My Travel Coffee Setup (Jan 20)
What my travel coffee brewing setup looks like, and how you can build your own for under $100.
Turkey Legs (May 30)
Product naming gone awry.
Speaking for Geeks: Your Slides (Dec 17)
Tips and tricks for creating great slides.
Speaking for Geeks: Writing Your Talk (Dec 14)
Don’t wait until the night before the talk to write it. Crazy, I know.
Speaking for Geeks: Tell a Story (Dec 13)
Telling a story keeps your presentation focused, keeps your audience interested, and makes it easier for you to remember your talk.
Speaking for Geeks: Where to speak (Dec 11)
You've got a great idea for a talk. How do you find conferences to submit it to?

Subscribe to this site's feed.

Elsewhere

Tropo
Voice and communications platforms, including Tropo and Phono. Work.
SacStarts
The Sacramento technology startup community.
Pinewood Freak
Pinewood Derby tips and tricks

Contact

Adam Kalsey

Mobile: 916.600.2497

Email: adam AT kalsey.com

AIM or Skype: akalsey

Resume

PGP Key

©1999-2018 Adam Kalsey.
Content management by Movable Type.