PHP Include’d Inline Comments For Movable Type

Published on August 27, 2004 at 7:47 PM EST
In the Tutorials category.

A few months back I implemented Inline Trackbacks using PHP as outlined in Learning Movable Type. The benefit is that Trackbacks become dynamic, not requiring a rebuild to be publicly visible—in other words, less work for me!

With that idea in mind, I’ve hacked the comments to work the exact same way. Just as detailed in Inline Trackbacks, copy the comment code into the Comment Listing template. In the Individual Archive template add <?php include('<$MTCGIPath$><$MTCommentScript$>?entry_id=<$MTEntryID$>'); ?> to make it all work. That’s it! The main benefit of doing this is similar to Inline Trackbacks—when I delete comment spam a rebuild isn’t required to clear the comment from that page.