Play Nice

A word about the original writing found on this site

Unless otherwise noted, these are my words, ideas, thoughts and feelings. If you like them great, if you don't that's fine too.

You're welcome to quote my writing, but please make sure you include a link back to the page from which you got the material.

This work is licensed under a Creative Commons License.
Creative Commons License



[This is where the summary would go if I'd bothered to write one.]

Last comment posted by code snippet

For my MT pals… I’ve noticed that some commenting systems show the last person who posts a comment on an entry and, because I’m the nerdy, jealous type, I wanted that on the blog, so I figured out how to do that in MT.

Here’s the code:

if (<$MTEntryCommentCount$> > 0) {
<MTComments sort_order="ascend" lastn="1"><$MTCommentAuthorLink spam_protect="1"$></MTComments> had the last word | <? } ?><a href=”<$MTCGIPath$><$MTCommentScript$>?entry_id=<$MTEntryID$>” onclick=“OpenComments(this.href); return false”><$MTEntryCommentCount$> </a>

Since it uses a little bit of php code I’m not sure if it will work with .html pages. If you try it and it works let me know.

Also if you’re using any sort of comments plugin you’ll want to change the code for the (<$MTEntryCommentCount$> > 0) part. I use Adam Kalsey’s simplecomments plugin so my code is actually (<MTSimpleCommentCount> > 0).

Published 09/09/03 in Geek_Speak • | Views: 11217 times | Print

0 Comments & Trackbacks

Post a comment





First time commenting? Please read the disclaimer. Thanks.

Remember me

Subscribe to comments?

Submit the word you see below:

Love it live.
Your comment will appear below as you type.