« Rumor has it | Main | Standalone SWT libra... »

Re: Joe Hewitt Comments

Hey Matt, don't bring JSP into it. You could probably do this in Roller 0.9.7 without even making a code change. Just use the Roller Editor UI to add a new page template to your site to produce comments in Hewitt's XML format:

   #set( $comments = $allComments )
   <comments>
   #foreach( $comment in $comments )
   <comment id="$comment.id">
      <author>$comment.name</author> 
      <email>$entry.email</email>
      <url>$entry.url</url>
      <timestamp>$comment.postTime</timestamp>
      <body>
         $comment.content
      </body>
   </comment>
   #end
   </comments>
Assuming that the page above is named 'Comments' then the URL to call it and retrieve the comments for your post would look like this:
http://www.raibledesigns.com/comments/rd/Comments?anchor=joe_hewitt_comments
UPDATE: I made a couple of corrections and additions to the code above and the the URL; these are shown in bold.

Comments:

Very cool - I'll have to try that - I'm assuming that will give me the comments for the first post only. Now the question is - what in the "comment" object will give me the email and url information. I'm lazy - I suppose I should look at the JavaDocs.

Posted by Matt Raible on April 18, 2003 at 05:09 PM EDT #

Post a Comment:
  • HTML Syntax: NOT allowed

« Rumor has it | Main | Standalone SWT libra... »

Welcome

This is just one entry in the weblog Blogging Roller. You may want to visit the main page of the weblog

Related entries

Below are the most recent entries in the category Roller, some may be related to this entry.