<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>David Raynes: ExtendedComments</title>
<link>http://www.rayners.org/archives/blogging/movable_type/mt_plugins/extendedcomments/index.php</link>
<description></description>
<language>en-us</language>
<copyright>Copyright 2005</copyright>
<lastBuildDate>Tue, 08 Jun 2004 00:26:42 -0500</lastBuildDate>
<pubDate>Wed, 11 May 2005 17:01:10 -0500</pubDate>
<generator>http://www.movabletype.org/?v=3.16</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>

<item>
<title>CommentThreads is working!</title>
<description>As you may see if you look at the comment pages on this site, you can now reply to a...</description>
<link>http://www.rayners.org/2004/06/commentthreads.php</link>
<guid>http://www.rayners.org/2004/06/commentthreads.php</guid>
<content:encoded><![CDATA[<p>As you may see if you look at the comment pages on this site, you can now reply to a specific comment and it will be displayed as such when you submit your comment.</p>

<p>So, <b>CommentThreads</b> is working now.  I just need to clean it and <b>ExtendedComments</b> up before releasing them to the public.  Should only be a couple more days.  Until then, here is the template code I am using on my site to display the comment threads, just to give you a taste (edited slightly for display purposes):</p>

<pre><code>&lt;MTCommentThreads&gt;
&lt;MTCommentThreadsIfFirst&gt;&lt;ul&gt;&lt;/MTCommentThreadsIfFirst&gt;
&lt;li&gt;&lt;div class=&quot;comment&quot;&gt;
&lt;a id=&quot;c&lt;$MTCommentID$&gt;&quot;&gt;&lt;/a&gt;
&lt;h4&gt;&lt;MTCommentTitle use_default=&quot;1&quot;&gt;&lt;/h4&gt;
&lt;div class=&quot;posted&quot;&gt;
&lt;p class=&quot;posted&quot;&gt;&amp;raquo; &lt;$MTCommentAuthorLink spam_protect=&quot;1&quot; 
no_redirect=&quot;1&quot;$&gt; at &lt;$MTCommentDate$&gt;:&lt;/p&gt;
&lt;p&gt;[ &lt;a href=&quot;&lt;$MTCGIPath$&gt;&lt;$MTCommentScript$&gt;
?__mode=preview
&amp;entry_id=&lt;MTEntryID&gt;
&amp;parent_id=&lt;MTCommentID&gt;
&amp;static=1&quot;&gt;Reply to this&lt;/a&gt; ]&lt;/p&gt;
&lt;/div&gt;
&lt;$MTCommentBody$&gt;
&lt;/div&gt;
&lt;MTCommentThreadsRecurse&gt;
&lt;/li&gt;
&lt;MTCommentThreadsIfLast&gt;&lt;/ul&gt;&lt;/MTCommentThreadsIfLast&gt;
&lt;/MTCommentThreads&gt;</code></pre>

]]></content:encoded>
<category>CommentThreads</category>
<pubDate>Sat, 12 Jun 2004 09:10:29 -0500</pubDate>
</item>
<item>
<title>ExtendedComments Progress And Site Changes</title>
<description>ExtendedComments and CommentTitles are coming along well so far. I am still working up the preview portion of the comment...</description>
<link>http://www.rayners.org/2004/06/extendedcomment_1.php</link>
<guid>http://www.rayners.org/2004/06/extendedcomment_1.php</guid>
<content:encoded><![CDATA[<p><b>ExtendedComments</b> and <b>CommentTitles</b> are coming along well so far.  I am still working up the preview portion of the comment system, but as long as you just go ahead and post, it is working just fine.  Once I get preview working, <b>CommentThreads</b> should follow up shortly afterwards.</p>

<p><b>Update (at 1:40 on 06/08):</b> Okay, so I got preview working now.  I was expecting it to go quickly, but not <em>that</em> quickly.</p>

]]></content:encoded>
<category>ExtendedComments</category>
<pubDate>Tue, 08 Jun 2004 00:26:42 -0500</pubDate>
</item>
<item>
<title>Some Sample ExtendedComments Code</title>
<description>Just to help me think things through, I am in the process of porting code from the provided MT::App::Comments class...</description>
<link>http://www.rayners.org/2004/06/some_sample_ext.php</link>
<guid>http://www.rayners.org/2004/06/some_sample_ext.php</guid>
<content:encoded><![CDATA[<p>Just to help me think things through, I am in the process of porting code from the provided <code>MT::App::Comments</code> class to "work" with my planned <code>rayners::ExtendedComments</code> class.  I plan on making each and every feature available in the default comments script work as a plugin of sorts with my new script.</p>

<p>For example, here is the current code for the callback that operates on the <code>entry_id</code> parameter.  It will most likely be setup as one of the first callbacks used when creating a comment.  If it errors out, the process is halted and no comment is created.  Otherwise, it will continue to the next callback, which can error out and halt the process there, and so on.</p>

<pre><code>sub entry_id_param {
  my ($app, $comment, $entry_id) = @_;

  require MT::Entry;
  my $entry = MT::Entry-&gt;load ($entry_id) or
    return $app-&gt;error ($app-&gt;translate (
          &quot;No such entry '[_1]'.&quot;, $entry_id));
  return $app-&gt;error($app-&gt;translate(
        &quot;No such entry '[_1]'.&quot;, $entry_id))
    if $entry-&gt;status != RELEASE;

  unless ($entry-&gt;allow_comments eq '1') {
    return $app-&gt;handle_error($app-&gt;translate(
          &quot;Comments are not allowed on this entry.&quot;));
  }

  $comment-&gt;blog_id ($entry-&gt;blog_id);
  $comment-&gt;entry_id ($entry_id);
  $comment;
}</code></pre>

<p>What I am working towards is a setup where each of the current features of <code>MT::App::Comments</code> is replicated in <code>rayners::ExtendedComments</code> so that adding on new features (e.g. <b>CommentTitles</b>) will be fairly trivial.</p>

]]></content:encoded>
<category>ExtendedComments</category>
<pubDate>Fri, 04 Jun 2004 14:41:15 -0500</pubDate>
</item>
<item>
<title>Coming Soon: ExtendedComments, CommentTitles, and CommentThreads</title>
<description>Recently, I have been talking with Imajes in #joiito about the port of a site to MT. This site currently...</description>
<link>http://www.rayners.org/2004/06/coming_soon_ext.php</link>
<guid>http://www.rayners.org/2004/06/coming_soon_ext.php</guid>
<content:encoded><![CDATA[<p>Recently, I have been talking with <a href="http://imajes.info/">Imajes</a> in <a href="http://joi.ito.com/joiwiki/IrcChannel"><code>#joiito</code></a> about the port of a site to <a href="http://www.movabletype.org/">MT</a>.  This site currently has a threaded comment system, and he was looking to see if it was doable in MT.  Currently, the only way to do it is via a hack, <b><a href="http://akosut.com/software/mtthreadedcomments.html">MTThreadedComments</a></b>, but I thought there might be a better way to do that, especially after all the experience I have gained while working on the <b><a href="http://www.rayners.org/archives/blogging/movable_type/mt_plugins/subcategories/index.php">SubCategories</a></b> plugin.  So, I am going to announce the following plugins:</p>

<ul>
<li>ExtendedComments</li>
<li>CommentTitles</li>
<li>CommentThreads</li>
</ul>

<h4>ExtendedComments</h4>

<p><b>ExtendedComments</b>, as a replacement for <code>mt-comments.cgi</code>, will not be so much a plugin as it will be a platform for plugins.  The idea here is to give plugin authors a way to add functionality to the comment system without having to write yet another <code>MT::App</code> class.</p>

<p>I envision something like the following being used in a plugin to add a handler for a new argument to the <b>ExtendedComments</b> cgi script:</p>

<pre><code>rayners::ExtendedComments-&gt;add_param ('param_name' =&gt; \&amp;handler);
</code></pre>

<h4>CommentTitles</h4>

<p><b>CommentTitles</b> will provide what you would expect, titles for comments.  Mostly, it is to duplicate functionality of the <b><a href="http://akosut.com/software/mtthreadedcomments.html">MTThreadedComments</a></b> hack, as well as to provide me with a very basic plugin with which to test <b>ExtendedComments</b>.</p>

<h4>CommentThreads</h4>

<p>Here is the fun part.  <b>CommentThreads</b> will provide a threaded comment system for <a href="http://www.movabletype.org/">MT</a> users, without having to resort to patching the core files.</p>

<p>All three of these are still very much in the preliminary planning stages, so any and all feedback is more than welcome.</p>


]]></content:encoded>
<category>ExtendedComments</category>
<pubDate>Wed, 02 Jun 2004 13:25:44 -0500</pubDate>
</item>


</channel>
</rss>