tips and tricks for movable type

MTComments listing - link to popup
August 04, 2002

If you're using <MTComments> to generate a list of recent comments on your blog (perhaps on a sidebar), here's how you can link to the popup version of the comments (as opposed to linking to the comments section on an Individual Archive page, for example).

Make sure you have the latest version of the OpenComments function in your HEAD section:

function OpenComments (c) {
window.open(c,
'comments',
'width=480,height=480,scrollbars=yes,status=yes');
}

Then code your Recent Comments section like this:

<MTComments lastn="5">
<a href="<$MTCGIPath$>mt-comments.cgi?entry_id=<$MTCommentEntryID$>" onclick="OpenComments(this.href); return false">Comment by <MTCommentAuthor></a><br /> on <MTCommentDate>
</MTComments>

This is the same code as for your normal pop-up comments; it just uses the tag <MTCommentEntryID> instead!

Comments

Thanks for this! Great stuff!

Is there any way to pull the title of the entry into this code? So that in the list you get Entryname: Comment by SoandSo on Date ? Just curious. :)

by Raven | 08.19.02 11:26 AM

There's a hack on the support forum that will let you put MTEntry tags inside of the MTComments container. =)

by girlie | 08.19.02 06:44 PM

Thanks - this is awesome! I didn't need the hack, maybe coz I'm using 2.64? (I'm a new user and don't know much about coding... yet. LOL)

by irene | 07.22.03 05:55 AM

hi,

i was just wondering how you have this comments page designed and thought about leaving a comment.

kaushal parikh
http://www.kaushalparikh.com

by kaushal parikh | 12.22.03 08:43 AM

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

TrackBack: 0
(URL: http://www.thegirliematters.com/sf/mt-track.cgi/67)