{"id":434,"date":"2008-02-27T19:47:36","date_gmt":"2008-02-28T01:47:36","guid":{"rendered":"http:\/\/blog.codedread.com\/archives\/2008\/02\/27\/feeding-the-conversation\/"},"modified":"2008-02-27T19:47:36","modified_gmt":"2008-02-28T01:47:36","slug":"feeding-the-conversation","status":"publish","type":"post","link":"https:\/\/www.codedread.com\/blog\/archives\/2008\/02\/27\/feeding-the-conversation\/","title":{"rendered":"Feeding The Conversation"},"content":{"rendered":"<p><object type=\"image\/svg+xml\" width=\"100\" height=\"100\" align=\"right\" hspace=\"10\" data=\"http:\/\/codedread.com\/clipart\/feed.svgz\"><span\/><\/object>Since my feeds are now customized as part of my theme, I thought I'd take a look at some of the interesting things you can do.  I knew that <a href=\"http:\/\/www.wordpress.org\/\">WordPress<\/a> supports a variety of feeds at different levels (main feed, main comments feed, per-entry feed, per-category feed, etc).<\/p>\n<p>What I was wondering was if there was a way to link each post in the feed to the comments feed of that story.  This would allow a good feed reader to let people easily subscribe from the main feed to the conversation feed of a particular story where they have left a comment.  Turns out it was fairly straightforward.<!--more--><\/p>\n<p>Doing a quick dig around the web turned up <a href=\"http:\/\/www.ietf.org\/rfc\/rfc4685.txt\" title=\"Atom Threading Extensions\">RFC 4685<\/a>, which is an extension to the <a href=\"http:\/\/tools.ietf.org\/html\/rfc4287\">Atom format<\/a> to support \"threading\".  It's been around since 2006.  Apparently there was a similar effort on the RSS side called commentsRss.<\/p>\n<p>Anyway, the spec addresses much more than I need at the moment.  All I want to do is, for each &#60;entry&#62; element, to include a link to the comments feed for that post.  I do this by adding the following element inside each &#60;entry&#62; element in the feed:<\/p>\n<div class=\"code\">&#60;entry&#62;<br \/>&#160;&#160;&#60;link rel=\"replies\" href=\"&#60;url-of-story-here&#62;?feed=atom\"&#62;<br \/>&#160;&#160;...<br \/>&#60;\/entry&#62;<\/div>\n<p>To do this, I updated my feed-atom.php file to:<\/p>\n<div class=\"code\">&#60;link rel=\"replies\" href=\"&#60;?php echo the_guid() . '?feed=atom' ?&#62;\" \/&#62;<\/div>\n<p>Ta da.  Then I thought I'd track this down in WordPress and see if there was a bug\/patch.  Guess what... <a href=\"http:\/\/www.intertwingly.net\/\" title=\"Sam Ruby\">Sam<\/a> has already submitted <a href=\"http:\/\/trac.wordpress.org\/ticket\/5434\">a patch<\/a> for this.  Two months ago.  It will be in WordPress 2.5.  Weird... Cool...<\/p>\n<p>But the real question is why haven't feed readers (like <a href=\"http:\/\/reader.google.com\/\">Google Reader<\/a>) made more use of this?  I think this is the biggest problem with having conversations in the blogosphere.  You may subscribe to a feed that you enjoy.  You may read a good story that someone publishes.  You want to contribute to the discussion so you post a comment.  Now if you want to keep following that story you either have to search for that story's comment feed or (more often than not) you have to continue visiting the web page to see if anyone posts a new comment.  Wouldn't it be great if your feed reader provided you with a button next to that story you can click to automatically subscribe to that conversation (i.e. the comments feed for that story).  After a while the conversation may dry up, upon which you can unsubscribe by unchecking a box in the UI or something.<\/p>\n<p>Hey, this may already be out there and I might get laughed off the face of the blogosphere for still re-visiting web pages throughout the day.  Feel free to leave your laughter below...<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since my feeds are now customized as part of my theme, I thought I&#8217;d take a look at some of the interesting things you can do. I knew that WordPress supports a variety of feeds at different levels (main feed, main comments feed, per-entry feed, per-category feed, etc). What I was wondering was if there [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,11,28,30],"tags":[58,164],"class_list":["post-434","post","type-post","status-publish","format-standard","hentry","category-software","category-technology","category-web","category-xml","tag-atom","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts\/434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/comments?post=434"}],"version-history":[{"count":0,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts\/434\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/media?parent=434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/categories?post=434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/tags?post=434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}