Joe Hewitt Comments
I did a bit of research today and it looks fairly simple to incorporate Joe Hewitt-style comments into Roller. The hard part will be figuring out a way to convert an entry's comments into XML. For instance, Joe loads an XML document (sample) that contains all the comments for a given post. This document has a DTD which will hopefully make things easier. Here's what a sample XML-based comment entry looks like:
<comment id="000178"> <author>Joe Hewitt</author> <email /> <url /> <timestamp>April 3, 2003 04:14 PM</timestamp> <body> <p>I have readers??</p> </body> </comment>
Looks pretty simple eh? So how do we convert comments to XML? Since they're already (or supposed to be) XHTML, should we just use a JSP and JSTL's "x" tag to do a little XSL? That sounds like an easy solution. Or should we figure out a way that we can hit the RSS feed (which could be enhanced to include comments)? Once we've done this, there's some JavaScript to load this document.
// Make url unique to prevent loading it from cache var cacheKiller = new Date().getTime(); // replace this with a link to a JSP or something var url = "/content/blog/comments/" + aEntryId + ".xml?" + cacheKiller; loadXMLDocument(url, onCommentsLoaded);
Please comment with any ideas for the comments-to-XML conversion.
Posted by Simon Brown on April 17, 2003 at 08:26 PM MDT #
Posted by Paul Rivers on April 17, 2003 at 11:33 PM MDT #
Posted by Matt on April 18, 2003 at 08:24 PM MDT #