Live Threaded Commenting on WP

At Interconnect IT / Spectacu.la my colleague James has developed a new version of the popular Spectacu.la Threaded Comments plugin.  It’s not yet in release form, but you can grab it from the WordPress.org repository via svn if you know how at http://svn.wp-plugins.org/spectacula-threaded-comments/trunk/

I’m bringing it up here because I’ve decided to trial the plugin out here on my own site.  It was designed to work in conjunction with a webinars project, allowing visitors to have an active discussion, in real time, on a WordPress site.  It can be dropped into almost any theme, and adds nicely to the standard WP comments functionality.

Threaded comments are a powerful way to turn your WordPress site into a mini discussion forum.  Adding live commenting can now turn it into a chatroom full of ajaxey goodness.

Try it out below, if you like….

Author: David Coveney

I own the big bit of Standfirst, Interconnect, and Design Week. They keep me busy.

82 thoughts on “Live Threaded Commenting on WP”

    1. Would love to know what you think… I think there’s a couple of things to sort out still before this turns into a full release.

      1. A textarea.focus() would be nice when you click reply, so I wouldn’t have to click inside the text area to write my comment and could just start typing… :-)

      2. It should do that… will check after the next commit, however, before bothering James with it! I know he has a long list on his notepad of things to polish off.

      1. Hi.. I’ve tried installing this plugin on my blog, which is using the third-style theme and there’s always an error saying “Warning: Cannot modify header blah blah!”.
        How can it happen?

  1. Does it impact performance much? I found that using P2 on my main blog killed the server as there were dozens (or hundreds?) of clients making dynamic requests for comments all the time. It got worse with time as users left their browsers open in the background :(

    1. It’s been coded differently to P2 in order to try and keep performance reasonable. But tomorrow we have a client using the plugin on a webinar with around 400 attendees, which should be an interesting test!

  2. Very curious to know how you’ve done this, Dave. We’ve done a ‘live commentary’ app for a client, based on WP comments entered and viewed with ajax – but the toughest part, by far, was working out how to handle the server load… which would (presumably?) be beyond the scope of a WP plugin.

    1. Simon – there’s an option to set the polling frequency. The default is 30s, with a 10s possible. It could be made shorter, but you really do have to be careful.

      1. Donncha’s point certainly echoes the experience we had. We got it to work in the end, but had to do some serious reconfiguration at server level.

        It’ll be interesting to see how people react to a 30 second delay. Instinctively that feels too long to me: you’re competing with people’s prior experience of instant messaging, so (a potential) 30 seconds could feel like a lifetime in comparison. In my mind, it has to be as close to zero as your server can possibly bear.

      2. Simon, we use memory tables for handling what is in essence a cache of what’s happening. Keeps performance up. We’ll find out tomorrow when a site gets 400 concurrent users :-/

      1. I’ll leave this window open :)

        I think something like this will need to have the updates cached. I’m sure there won’t be any updates 90% of the time and it would be a simple matter to cache it in a file and clear the cache file when a comment is made or deleted.

        Works a treat though!

  3. One thing worth noting is that until a comment is approved, others won’t see it.

    However, there are a number of ways in which you could make that smoother – you could have subscribers log in and allow them to comment freely, for example, or do as I do and allow pre-approved commenters to comment as they wish.

      1. Curiously I’m not seeing the auto-updates myself at the moment, but that was having gone ‘back’ to the page. Hmmmm….

      2. It does – it just doesn’t seem to be working here! Might be an interaction with something else, of course. I know it works fine on another install. OK, back to the testing!

      3. Hmmmm – not sure what’s happening, just tried deactivating caching to see what’s going on here. But there really should be fresh comments popping in. Can others see them?

      4. We discovered a problem with the code for creating the memory table. Works in standard installations, but failed on my old site where a long line of plugins and a not terribly clever installation five years ago have all left their mark! I really must get around to a ‘reboot’ of this site – probably on my more ‘grown-up’ domain…

  4. Darn it – the live commenting isn’t working on this site, but is fine on another – suggests an issue with a plugin. Thanks everyone for the feedback and help so far!

  5. Boo hoo – Dave deleted my comment – I hope that was due to testing and nothing personal – oh! It’s there now. I definitely saw a message saying comment deleted

  6. Is there any way to notice when comments arrive in reply to an earlier comment? I mean, it’s easy to spot new comments coming in at the bottom here, but hard to see if there are new replies once the threading starts to kick in…

    Guess I just want it to work as nicely as usenet did back in the day ;-)

    1. I’m wondering whether highlighting new comments with a slow fade might help? If you scroll up you’ll see them in pink, say?

  7. Is this going to support collapsing or at least some way to limit it to the top ‘n’ posts as on a busy blog this will be mahooooosive.

    Also its annoying to type as the text area keeps getting lower……..

  8. It went into moderation mode then definitely said comment deleted before suddenly appearing. I’ve exited the page and reloaded it – worked in less than a second that time and looks like I’ve now got all the CSS styling. The first time it looked a bit rough!

  9. Don – Glen – it does indeed show as deleted for a while! We’ll look into that, though it’s worth noting that this is definitely still work in progress beyond the original client specs…

    1. Yeah, we’ll fix that – this really is alpha style code :o) Not such a problem for our client site as they set it to approve subscriber comments.

      1. Just follow the link above to the svn repo – you can play with it and inspect the code as much as you like :o)

      2. Haha, was so interested to see if working I went straight to the comments and didn’t actually read the post.

        Oh potential bug, whilst I am typing this, other comments are being posted in-line and my comment box is moving down the page – I’m going to wait and see what happens when/if it gets pushed off the bottom because I took so long writing a long reply and other people posted responses to other comments.

        And yes, it does ….

    1. Hi Laurie – there’s no facility to delete your own comments (so you have to be nice!).

      Link provides a link directly to the comment – for example, if somebody posts something interesting in a comment (it does happen, sometimes) then it can be easily linked to directly.

      1. This is great work – wish I had a chance to properly play with it! Really look forward to implementing this in the future:)

      2. Damn right! Anything with decent js support should support this. And if you don’t have js it does, of course, go back to acting just like ‘normal’ commenting – something P2 doesn’t do, incidentally ;-)

    1. As you may have noticed, it also supports the WP setting for limiting the depth of comments. You can also choose to ‘roll-up’ comments beyond a certain depth as well.

      Thanks for the kind words – and you can already use it if you check out the trunk version from the wp.org repo.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.