Archive for May, 2006

Announcing Tinythread threaded discussion plugin for WordPress

Tuesday, May 9th, 2006

** Note ** : The Tinythread plugin is no longer being developed. The version(s) available for download are AS IS - I will no longer provide support for them.

The Tinythread plugin is available for adoption. If you would like to take over development of Tinythread, please email me.

Tinythread is a threaded discussion plugin for WordPress. It is based largely on Brians threaded comments and dodos threaded comments hack.

Features

  • Elegant, easy-to-use discussion interface.
  • Minimal Javascript - no thread collapsing, nesting or the like. Just straightforward threaded comments.
  • Doesn't alter WordPress database tables - uses the "comment_parent" field available in more recent versions of WordPress.
  • Relatively easy to install.
  • Integrates with the WordPress gravatar plugin.
  • "Wandering forms" - forms that appear when you click on "reply" links, sort of like the forms found in Brians threaded comments.
  • Degrades gracefully - if you deactivate the plugin, comments still look decent.

To see a demonstration of Tinythread, take a look at any discussion on this blog. Feel free to post comments in this entry if you want to try it out.

Current version is 0.6.2.

Updates:

v. 0.6.2 (06-25-2006): The "I got a job, so development is slow" release. Patched code base to fix Akismet bug. Added "comment minimization" (after X replies in a thread, comments appear as links with just the date and a short teaser), configurable from the Options page.

Advisory (05-29-2006): After some testing, the current version of Tinythread does not appear to work with many human-verification anti-spam plugins. This includes captcha plugins, the Did You Pass Math> plugin, and possibly others. However, Tinythread works with Akismet.

v. 0.6.1 (05-23-2006): Various Javascript fixes and additions; added tt_delete_comment() to handle comment deletions and update comment_parent value on child comments.

v. 0.6 (05-22-06): Tinythread has undergone a minor code cleanup, and "view thread" and "parent comment" links have been added.

v. 0.5 (05-15-06): Tinythread has been updated to eliminate the need to replace comment-functions.php.

v. 0.4.1 (5-10-06): Tinythread has been updated to remove a few small errors. I've also added the ability to quote a comment in a reply.

The Tinythread plugin for WordPress may be downloaded here:

tar.gz: tinythread-0.6.1.tar.gz

zip: tinythread-0.6.1.zip

Be sure to read the instructions carefully before installing. Tinythread 0.6.1 is beta.

Quick Install Instructions

(I'm placing these here so you know what you're getting yourself into)

  1. Copy the tinythread folder to wp-content/plugins/.
  2. Backup wp-content/themes/your-current-theme/comments.php. Copy wp-content/pugins/tinythread/comments.php to your current theme folder.
  3. Go to your WordPress installation's plugin interface (wp-admin/plugins.php). Find Tinythread and click on "Activate."

You're set!

Manual Install

If you want to keep your current comments.php page, you'll need to follow these instructions. As different templates structure comments.php in different ways, your mileage may vary.

The implementation here is simple - on the HTML/CSS side, the comment section of comments.php needs to be enclosed in a DIV whose ID is "comments." On the PHP side, comments.php needs to use the tt_comments() function if it exists, and the standard comments_template() function if tt_comments() is nonexistent/deactivated.

  1. Copy the tinythread folder to wp-content/plugins.
  2. In your favorite text editor, open comments.php from your current theme.
  3. Look for:

    <?php if ($comments) : ?>


    replace it with:

    <div id="comments">
    <?php
    if (function_exists('tt_comments')) {
        if (
    $_GET['thread_id'] && $_GET['thread_id'] != ") {
            
    tt_comments($_GET['thread_id'],'thread');
        } elseif (
    $_GET['comment_id'] && $_GET['comment_id'] != "){
            
    tt_comments($_GET['comment_id'],'single');
        } else {
            
    tt_comments();
        }
    } else {
           if (
    $comments) :
    ?>


  4. Find a section of comments.php that looks like this:

    <!– If comments are closed. –>
            <p class="nocomments">Comments are closed.</p>
            
        <?php endif; ?>
    <?php 
    endif; ?>


    and alter it to look like this:

    <!– If comments are closed. –>
            <p class="nocomments">Comments are closed.</p>
            
        <?php endif; ?>
    <?php 
    endif;
    // closing bracket for tinythread plugin
    ?>


  5. At the very end of comments.php, add:
  6. </div>

    Activate the plugin, and it should work.