mu.nu - We're sorry we accidentally destroyed your panties.
June 05, 2004
"Latest Comments" Code?
I dig that Latest Comments feature on the sidebar here. Is there code available for adding that to our blogs? For one site specifically, I mean.
Seems to be a great way to let readers know where the comment activity is, without scanning every post.Posted by: Ace at 02:02 AM | Comments (118) | Add Comment | Trackbacks (Suck)
1
There are several threads concerning recent comments over at the MT Support Forum.
Try this code:
<MTSetVar name="Counter" value="0">
<MTGlobalComments sort_order="descend">
<MTIfLess a="[MTGetVar name='Counter']" b="5" numeric="1">
<MTIfNotEqual a="[MTCommentAuthor]" b="Lisa">
• <MTCommentAuthorLink spam_protect="1">:
<MTCommentEntry>
<a href="">[...]
</MTCommentEntry>
<MTIfEqual a="[MTGetVar name='Counter']" b="4" numeric="1">
<MTSetVar name="Counter" value="5">
</MTIfEqual>
<MTIfEqual a="[MTGetVar name='Counter']" b="3" numeric="1">
<MTSetVar name="Counter" value="4">
</MTIfEqual>
<MTIfEqual a="[MTGetVar name='Counter']" b="2" numeric="1">
<MTSetVar name="Counter" value="3">
</MTIfEqual>
<MTIfEqual a="[MTGetVar name='Counter']" b="1" numeric="1">
<MTSetVar name="Counter" value="2">
</MTIfEqual>
<MTIfEqual a="[MTGetVar name='Counter']" b="0" numeric="1">
<MTSetVar name="Counter" value="1">
</MTIfEqual>
</MTIfNotEqual>
</MTIfLess>
</MTGlobalComments>
from this thread. Replace "Lisa" in line #4 with whatever your name is and it will give the last 5 comments that were made by people other than you. If you want to display more than 5 comments, just look at the code and modify where appropriate.
Try this code:
<MTSetVar name="Counter" value="0">
<MTGlobalComments sort_order="descend">
<MTIfLess a="[MTGetVar name='Counter']" b="5" numeric="1">
<MTIfNotEqual a="[MTCommentAuthor]" b="Lisa">
• <MTCommentAuthorLink spam_protect="1">:
<MTCommentEntry>
<a href="">[...]
</MTCommentEntry>
<MTIfEqual a="[MTGetVar name='Counter']" b="4" numeric="1">
<MTSetVar name="Counter" value="5">
</MTIfEqual>
<MTIfEqual a="[MTGetVar name='Counter']" b="3" numeric="1">
<MTSetVar name="Counter" value="4">
</MTIfEqual>
<MTIfEqual a="[MTGetVar name='Counter']" b="2" numeric="1">
<MTSetVar name="Counter" value="3">
</MTIfEqual>
<MTIfEqual a="[MTGetVar name='Counter']" b="1" numeric="1">
<MTSetVar name="Counter" value="2">
</MTIfEqual>
<MTIfEqual a="[MTGetVar name='Counter']" b="0" numeric="1">
<MTSetVar name="Counter" value="1">
</MTIfEqual>
</MTIfNotEqual>
</MTIfLess>
</MTGlobalComments>
from this thread. Replace "Lisa" in line #4 with whatever your name is and it will give the last 5 comments that were made by people other than you. If you want to display more than 5 comments, just look at the code and modify where appropriate.
Posted by: Madfish Willie @ at June 05, 2004 03:50 AM
2
Here is the code that dipslays recent comments on this page:
<div class="side">
<MTComments lastn="10" sort_order="descend">
<$MTCommentAuthorLink show_email="0"$>: <$MTCommentBody convert_breaks="0" trim_to="60" remove_html="1"$>
<MTCommentEntry>
<a href=""><i>entry</i></a>
</MTCommentEntry><br />
</MTComments>
</div>
<div class="side">
<MTComments lastn="10" sort_order="descend">
<$MTCommentAuthorLink show_email="0"$>: <$MTCommentBody convert_breaks="0" trim_to="60" remove_html="1"$>
<MTCommentEntry>
<a href=""><i>entry</i></a>
</MTCommentEntry><br />
</MTComments>
</div>
Posted by: Madfish Willie @ at June 05, 2004 05:38 AM
3
Thanks. The second bit of code works.
I didn't try the first bit. I wasn't sure if that bold-bullet in the first paragraph was supposed to be there or is just an error.
Also, I didn't know if the bit three lines after that, containing this:
[...]
was realy supposed to be coded that way, of if there's something I'm suppsed to substitute in for the [...} .
Is there a big difference between the two?
Either way, thanks. Like I said, the second one works great.
I didn't try the first bit. I wasn't sure if that bold-bullet in the first paragraph was supposed to be there or is just an error.
Also, I didn't know if the bit three lines after that, containing this:
[...]
was realy supposed to be coded that way, of if there's something I'm suppsed to substitute in for the [...} .
Is there a big difference between the two?
Either way, thanks. Like I said, the second one works great.
Posted by: ace @ at June 06, 2004 09:48 PM
4
Actually, I spoke too soon. The second code displays the latest posts, but the "entry" link doesn't link to the comment; it just links right to the main page.
Posted by: ace @ at June 06, 2004 09:52 PM
5
The first code, at least for me, gives an error on rebuild. It tells me that I used a "commentauthor" entry outside of a comment, and then it suggested that perhaps I'd mistakenly used it outside an MTCommententry "container."
Posted by: ace @ at June 06, 2004 10:02 PM
6
The first one, follow the link back to the discussion thread. The rest of the thread should tell you something about if it works and what the problems were implementing it. The bullet was supposed to be there. I didn't test it, so I don't know how/if it works.
The second one should read:
<a href="<$MTEntryLink$>"><i>entry</i></a>
I missed converting the tags and it got parsed.
The second one should read:
<a href="<$MTEntryLink$>"><i>entry</i></a>
I missed converting the tags and it got parsed.
Posted by: Madfish Willie @ at June 06, 2004 10:55 PM
7
Can I just answer what a ralph lauren outlet pain relief to locate a star who essentially understands what theyre discussion concerning on top of th ralph lauren polo shirts e online world. You unquestionably identify how to carry an concern to brightness and build it significant. Extra public need to read this plus realize this side of the narrative. Polo Ralph Lauren Outlet I cant believe youre not extra well-liked since you absolutely have the gift. Ralph Lauren
Posted by: ralph lauren outlet @ at June 30, 2011 07:04 AM
Processing 0.01, elapsed 0.0082 seconds.
22 queries taking 0.0049 seconds, 29 records returned.
Page size 11 kb.
Powered by Minx 0.8 beta.