Help - Search - Members - Calendar
Full Version: Comment Feed
Movable Type Community Forum > Using Movable Type > Commenting System
dianag
I'm trying to make a customized Comment Feed and I'm about 90% there.

I have my Comment Feed template, AND I managed to get the feed to show the body of the comment as the headline (I'll be repurposing these comments as a feed "promo" on my site) but no matter WHAT code I delete, my individual comment feeds always start with <p> and end with <br /></p> as shown here:
http://blogs.courant.com/rant/comments.xml

I'm thinking it HAS to do with the <title> tag, but without that, the comment won't show up as the headline (or show up at all).

Here's my code:

CODE
<?xml version="1.0" encoding="<$MTPublishCharset$>"?>
<rss version="2.0">
<channel>
<title><$MTBlogName remove_html="1" encode_html="1"$>: Comments</title>
<link><$MTBlogURL$></link>
<description>Latest comments for <$MTBlogName remove_html="1" encode_html="1"$></description>
<language>en-us</language>
<lastBuildDate><MTComments lastn="1"><$MTCommentDate language="en" format="%a, %d %b %Y %H:%M:%S"$> <$MTBlogTimezone no_colon="1"$></MTComments></lastBuildDate>
<generator>http://www.movabletype.org/?v=<$MTVersion$></generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<MTComments lastn="20" sort_order="descend">

<item>
<title>"<description><$MTCommentBody encode_html="1"$> <$MTCommentAuthorLink show_email="0" encode_html="1"$></description>"</title>


<guid isPermaLink="false">comment<$MTCommentID pad="1"$>@<$MTBlogURL$></guid>
<pubDate><$MTCommentDate language="en" format="%a, %d %b %Y %H:%M:%S"$> <$MTBlogTimezone no_colon="1"$></pubDate>
</item>
</MTComments>
</channel>
</rss>


Any ideas?
danwolfgang
Try changing <mt:CommentBody> to <mt:CommentBody convert_breaks="0">.
dianag
QUOTE (danwolfgang @ Oct 31 2008, 04:07 PM) *
Try changing <mt:CommentBody> to <mt:CommentBody convert_breaks="0">.



Excellent! That worked like a charm! Now I wonder if you can tell me 2 things:
Can I use the trim_to tag in here, and can you help me figure out what code I deleted that properly links the comments to their respective entry? I've rearranged it so much and taken so much out that I can't clearly see what's missing.
Smaaz
Hi,
could you guys tell me how to display only the title?
Thanks!
danwolfgang
QUOTE
Can I use the trim_to tag in here

Sure. The trim_to modifier can be used anywhere, as can any of the other tag modifiers.

QUOTE
can you help me figure out what code I deleted that properly links the comments to their respective entry?

You can always refer to the default templates to help recreate something. It looks like the CommentLink tag would do the job.

QUOTE
could you guys tell me how to display only the title?

The title of what? The entry? EntryTitle. You might read up on the Template Tag Reference.
dianag
FYI:

I was able to get the "headline" to link back to the entry, by adding back this code:

CODE
<link><MTCommentEntry><$MTEntryPermalink$>#comments</MTCommentEntry></link>


right after the title tag.

And the trim_to tag worked insde the comment body tag.

Thx for the help, Dan.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.