Thursday April 17, 2003
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 in Roller
at Apr 17 2003, 01:00:34 PM MDT
3 Comments
Search This Site
Recent Entries
- Wine Tasting in Napa Valley
- How to build a Shot-Ski
- Bus Project Update
- Farewell to the 2011-2012 Ski Season
- Cruising around the Western Caribbean
- Spring Break!
- A Spectacular Trip to Stockholm and Madrid
- Comparing Web Frameworks and HTML5 with Play Scala at Jfokus 2012
- Play Framework 2.0 with Peter Hilton at Jfokus
- Secure JSON Services with Play Scala and SecureSocial
Posted by Simon Brown on April 17, 2003 at 02:26 PM MDT #
Posted by Paul Rivers on April 17, 2003 at 05:33 PM MDT #
Posted by Matt on April 18, 2003 at 02:24 PM MDT #