Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32

Thread: Plugin to add Threaded Comments to any theme

  1. #1
    davecoveney is offline Tavern Regular
    Join Date
    Jan 2009
    Posts
    211

    Icon3 Plugin to add Threaded Comments to any theme

    Another moment of self promotion, I'm afraid.

    We always had the pain of adding threaded comments to themes, styling them up and so on. Nobody enjoys it, and the comments section of a theme is one of the most complex to write.

    So we came up with a plugin that can either be included in a theme, or installed as a plugin.



    As you can see in the screenshot above, there are two styles supplied for light and dark themes, but more can be easily added.

    Javascript comment folding is available with a selectable level, and the plugin supports all WP options as well as, at least in testing, supporting other commenting plugins such as subscribe to comments.

    There's a 'powered by' link which you can quickly and easily switch it off, but it would be nice if in return for switching it off you contribute to our club over at http://spectacu.la - not compulsory, of course, and we appreciate that not everyone has the funds to do so, but membership does of course help you get support direct from the developers.

    You can download the plugin now from http://spectacu.la/spectacula-threaded-comments/ or you can wait a few days until it hits the WordPress.org repository.

    Feedback is, of course, both welcome and encouraged

  2. #2
    davecoveney is offline Tavern Regular
    Join Date
    Jan 2009
    Posts
    211

    Default

    And just realised - @themelab has posted an excellent screencast of the plugin in action on his site: http://www.themelab.com/2009/12/15/s...mments-plugin/

    The site doesn't seem to be responding for me at the moment, but hopefully soon. The screencast can be viewed seperately from his post over at: http://screenr.com/HiU

  3. #3
    Ryan's Avatar
    Ryan is offline WordPress Legend
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,797

    Default

    Interesting idea. Dan Schulz and I had discussed creating something similar but decided it might cause too many glitches when trying to style comments within another theme.

    It would be nice to see a plugin which gives complete control over the comments area, things like where various things are and what text is displayed.

  4. #4
    davecoveney is offline Tavern Regular
    Join Date
    Jan 2009
    Posts
    211

    Default

    We (or others, of course) can add functions as time passes. Leave a comment on the page suggesting features and they'll be added to the list for future releases.

    I agree that dealing with how other themes look can be a major issue. We tested it out, however, and it works fine in everything we've tried. You have to be a little careful, but James does tend that way :-)

  5. #5
    chipbennett's Avatar
    chipbennett is offline WordPress Legend
    Join Date
    Feb 2009
    Location
    St. Louis, MO
    Posts
    1,993

    Default

    One shortcoming I've come to notice with threaded comments is the inability to follow heavily commented posts. With flat comments, it is easy to find all new comments. But, with threaded comments, it is nearly impossible, without a lot of scrolling up-and-down, and "concentration"-like remembrance of previous comments - since new comments could show up in any of the threads.

    Has anyone come up with a solution to this short-coming?

    One that I can think of, for subscribed comments, would be for the comment notification email to provide a link to the comment itself, rather than just to the comment thread.

    But, what about in the thread itself?

    I suppose that, with cookies, the site could use styles to indicate new-since-last-visit comments?

    Any others?

    (And Dave, hope you don't mind me somewhat hijacking the thread. If you want, I can move the question to a separate post.)
    WP TurnKey - Turn-Key WordPress installation and maintenance services
    WordPress user since 2005 | @chip_bennett | chipbennett.net | cbnet Plugins

  6. #6
    Otto's Avatar
    Otto is offline On The Rocks
    Join Date
    Apr 2009
    Location
    Memphis, TN
    Posts
    862

    Default

    Hmm.. Seems like it's overly complicated and confusing to me.

    OTOH, I've never had any problem making threaded comments work well. It's a pretty straightforward process, really. Doing JS folding stuff is slightly more complex, but not much so.

  7. #7
    Otto's Avatar
    Otto is offline On The Rocks
    Join Date
    Apr 2009
    Location
    Memphis, TN
    Posts
    862

    Default

    Quote Originally Posted by chipbennett View Post
    One shortcoming I've come to notice with threaded comments is the inability to follow heavily commented posts. With flat comments, it is easy to find all new comments. But, with threaded comments, it is nearly impossible, without a lot of scrolling up-and-down, and "concentration"-like remembrance of previous comments - since new comments could show up in any of the threads.

    Has anyone come up with a solution to this short-coming?

    One that I can think of, for subscribed comments, would be for the comment notification email to provide a link to the comment itself, rather than just to the comment thread.
    The problem lies with paged comments. There's no easy way to figure out what page a comment will be on.

    If you don't use paged comments, then it's relatively easy to change the email notifications to include direct links to the comments.
    - Look in the pluggable.php file.
    - Find the wp_notify_postauthor function.
    - There's a line that looks sorta like this:
    PHP Code:
    $notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n"
    Change that to this:
    PHP Code:
    $notify_message .= get_permalink($comment->comment_post_ID) . "#comment-$comment_id\r\n\r\n"
    Voila. You can find other instances where the #comments link is created and modify them similarly.

    Don't want a core change? A plugin could do it with the comment_notification_text filter. I leave that as an exercise for the reader.

    The reason this isn't in core is paged comments. A valid solution needs to account for both cases. Also, this assumes that the theme is using the proper comment id's and such, which is a tall assumption. However, most themes use the comment-### as the id of the bit surrounding the comment, it's pretty standard.

    Quote Originally Posted by chipbennett View Post
    But, what about in the thread itself?

    I suppose that, with cookies, the site could use styles to indicate new-since-last-visit comments?
    Possibly, but it'd be a javascript thing. You'd need to add the comment timestamp in as a class on the comment or something (could be done with a comment_class filter), then have javascript read a cookie and set additional styles or classes based on comparisons with these.

  8. #8
    davecoveney is offline Tavern Regular
    Join Date
    Jan 2009
    Posts
    211

    Default

    Hi Otto - complicated for the user/implementor, or for the visitor?

    Don't forget, that while you or I may be comfortable with code, most people aren't. All this does is provide a very easy way to implement threaded comments in themes. The js element is an option.

  9. #9
    chipbennett's Avatar
    chipbennett is offline WordPress Legend
    Join Date
    Feb 2009
    Location
    St. Louis, MO
    Posts
    1,993

    Default

    Quote Originally Posted by Otto View Post
    The problem lies with paged comments. There's no easy way to figure out what page a comment will be on.
    I hadn't even thought about paged comments. Gah, that gets complicated.

    If you don't use paged comments, then it's relatively easy to change the email notifications to include direct links to the comments.
    - Look in the pluggable.php file.
    - Find the wp_notify_postauthor function.
    - There's a line that looks sorta like this:
    PHP Code:
    $notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n"
    Change that to this:
    PHP Code:
    $notify_message .= get_permalink($comment->comment_post_ID) . "#comment-$comment_id\r\n\r\n"
    Voila. You can find other instances where the #comments link is created and modify them similarly.

    Don't want a core change? A plugin could do it with the comment_notification_text filter. I leave that as an exercise for the reader.
    I'll look into that. Won't make much of a difference on my personal blog (not a heavy comment load), but a plugin might encourage others. :)

    The reason this isn't in core is paged comments. A valid solution needs to account for both cases. Also, this assumes that the theme is using the proper comment id's and such, which is a tall assumption. However, most themes use the comment-### as the id of the bit surrounding the comment, it's pretty standard.


    Possibly, but it'd be a javascript thing. You'd need to add the comment timestamp in as a class on the comment or something (could be done with a comment_class filter), then have javascript read a cookie and set additional styles or classes based on comparisons with these.
    Being able to collapse all but unread comments would be nifty (thinking of Dave's new plugin).
    WP TurnKey - Turn-Key WordPress installation and maintenance services
    WordPress user since 2005 | @chip_bennett | chipbennett.net | cbnet Plugins

  10. #10
    Jeffro's Avatar
    Jeffro is offline WPTavern Forum Admin
    Join Date
    Jan 2009
    Location
    Ohio
    Posts
    2,358

    Default

    Does this plugin mean CommentBits will go out of business? I wonder...

Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •