Paged Threaded Comments plugin

中文页面: http://www.qingbo.org/blog/?p=55

This plugin is a combination of Brian’s Threaded Comments and Keyvan’s WordPress Paged Comments Plugin. Trustin Lee has written a plugin Threaded and Paged Comments Plugin for WordPress 1.5, but the structure is complicated. I borrowed the SQL statements and functions of it, and made the two plugins work together. Now the structure is tidier, since the plugin files are put into one directory, except the comments-paged.php file.

Download(zip file, 2006-06-08)

Update:

2006-10-07:

  • Fixed a bug in thread-event.js. Now afer clicking "Reply to this comment", the ‘+’ and ‘-’ pictures display as they should be.
  • Fixed the array_merge problem with PHP5. Thanks to Andy.

2006-06-08:

  • Fixed a bug with the updating of Threaded Comments options.

2006-06-03:

  • Added a hook to delete_comment so that when the parent comment is deleted, the child gets the reply ID of it. Previously, the replies no longer display when the parent is deleted.
  • Added the code to display the number of threads above comments area. See the effect below.

2006-05-24:

  • Converted icon files to gif format to solve the problem that IE6 doesn’t support transparent PNG file.

Installation:

  1. Unzip the archive. There should be a PagedThreadedComments directory and a comments-paged.php file.
  2. Upload PagedThreadedComments directory to WordPress plugin directory (wp-content/plugins/)。
  3. Upload comments-paged.php file to the theme directory you are currently using(wp-content/themes/yourtheme/)。
  4. In this theme directory, edit every template file that is comments-enabled (such as single.php). And the comments_template() function call should be replaced by the following code:
    if (function_exists('paged_comments_template')) paged_comments_template();
     else comments_template();
  5. Activate Paged Threaded Comments plugin in the WordPress admin panel.
  6. Now the plugin should work. If the comments style does not fit your theme, modify the file thread-style.css in the plugin directory.

By default, the last page shows 10 threads, with the latest on the top. You can change this behaviour and modify other options in paged-comments-config.php. If you want to modify the max nesting level, please go to WP admin panel.

Only tested in WordPress 2.02-2.04. Any problems, please leave a comment, or directly send a mail to me.

Many people asked me how to use gravatar. Brian used $c in the comment loop, and that’s why it’s not compatible with gravatar. When time allows, I’ll modify the plugin to let it be compatible with other plugins, but for now here is a "dirty" solution:

  • Extract this file to your plugins directory, and activate the plugin. This is a modified version of gravatar.php.
  • Inside write-comment function of comments-paged.php, add codes like <img src=’<?php gravatar($c->comment_author_email); ?>’ />
    in an appropriate place.

Of course, you need some CSS or HTML to beautify it:)

86 Responses

  1. 还没有了解这个插件有什么用- -

  2. Hey Zhou,

    You didn’t leave your email on my blog, so here’s mine (in the comment email field).
    I think people altering and building on my plugins is absolutely great, especially if they don’t mind that I merge their changes in (with credit) to the plugin at a later point.

    Regards,
    Brian

  3. [...] From now on, Zhou Qingbo will be in charge of this plugin. This page exists only for historical reason. Please visit his Paged Threaded Comments Plugin page to download the latest version. [...]

  4. [...] 星月轮转 / Paged Threaded Comments plugin (tags: wordpress plugin) [...]

  5. Are you still working on this plugin?
    I get this error when I activate it :(
    I am running Wordpress 1.5.1.2
    What am I doing wrong?
    Help me please!

  6. Hi

    great plugin. My old template used to shade every other comment differently

    ” id=”comment-”>

    said,

    comment_approved == ‘0′) : ?>
    Your comment is awaiting moderation.

    on at

    How do I create this effect with your template? I can’t work out how.

    thanks

    EB

  7. Hello,
    I am going crosseyed and jack mad crazy trying to get gravatars to work. I’ve been putting the code in comments-paged.php with a resulting blank image. The place holder is there but that’s all.

    Then I started thinking maybe I was using the wrong file. So before I go poking around and ending up more frustrated, could you give me a hint where to put the code for gravatars. I’m using the code from Skippy.net, code here

    Please, please,, thanks.

  8. My gravatars is not showing up in IE and keep showing the default gravatar in Firefox.

    It’s fine when using my comments_template() but not when i change it to
    if (function_exists(’paged_comments_template’)) paged_comments_template();
    else comments_template();

    Please help

  9. Threaded comments not working.
    After the gravatar problem got fixed now I’m getting this error when submitting a comment

    Please do not load this page directly. Thanks! and it does

    I am using your latest version. Things stopped working out of nowhere.
    The only thing I recently did was to try editMonkey wysiwyg for WP2 but it didn’t play well with the comments on reply to comments..

    I have tested with various themes etc.. still get the same error…

    Help agian…??

    • This should not be the problem of the plugin. Did you carefully follow the instructions, especially replacing the code?
      Sorry I can’t provide more help now. I’m on vacation and accessing the Internet is difficult:)

  10. [...] Perasan tak that my gravatar is not working? I installed the paged comments and then the gravatar is getting sot by showing the default gravatar even when you enter the correct email. It’s getting worse in IE because it’s not showing any image for the gravatar. So, coding master please help. I need my gravatars back. [...]

  11. Brian Schmidt says:

    I few ideas/suggestions for this plugin (already posted one of them that was specific to the Nested Comments on Brian’s blog).

    1. Autofolded comments based on specific criterias (posted example to Brian based on date).
    2. Added support for AJAX Comments.

    AJAX Comments doesn’t work with this plugin out of the box for 2 reasons.
    1st. When submitting a comment with this plugin, a JS function is called which currently does nothing. Easily fixed by replacing that with the original submit button.

    2nd. AJAX Comments uses comments.php to to dynamically show new posts. This is a bit more tricky to circumvent because comments-paged.php isn’t just the template as in comments.php but some extra things I haven’t bothered to look at yet ;)
    My idea to get around this is to make it in 2 parts.

    1st. part being comments-paged.php which is the actual file that are included in single.php and page.php (and others where needed).
    comments-paged.php should then include comments.php as the actual template. Not sure how easy this is to do (haven’t looked at it yet) since comments-paged uses a function where comments.php just uses a while loop.

    With a bit of work it should be doable though. Just read the comments.php file in the write_comment function, then use that as a template still. Definitely something I’ll be looking in to when time permits, just thought I’d give someone else the idea, cause I usually don’t get far unless really really motivate d ;)

  12. Sorry, you do not have sufficient privileges to view this post.

  13. This looks really promising but I have a problem. I am getting the comment count, the paged links list and the edit form – but no comments displaying whatsoever. Whats more, if I click on one of the page links (or the All link) I then get a heading X comments in X threads (which is correct) followed by another heading saying ‘no comments yet’. I just can’t see what can be wrong. Any ideas please?

  14. [...] 星月轮转 / Paged Threaded Comments plugin (tags: wordpress plugin) [...]

  15. links for 2006-06-10

    How to Write a Simple WordPress Plugin – Asymptomatic (tags: wordpress plugin howto) Writing a Plugin « WordPress Codex (tags: wordpress plugin howto) Brian Meidell’s Blog » Threaded Comments (tags: wordpress plugin) gleamynode.net » Blog Archive »

  16. I did exactly what is written here and I am getting error messages :-( Could someone please help me?

  17. I have followed all the instructions several times, upgraded WP and my theme. I cannot seem to get this to work. The comment form disappears each time I activate the plugin.

    Any suggestions are appreciated.

  18. You have good site, thx a lot! wall murals

  19. great pugin. Thanks

  20. [...] UPDATE: Zusätzlich habe ich heute Abend noch das Paged Threaded Comments Plugin (Download der von mir übersetzten Version) installiert. Damit ist es möglich, auf Kommentare zu antworten – die Anzeige erfolgt als Thread. Außerdem werden die Kommentare bei erreichen einer gewissen Anzahl auf mehrere Seiten aufgeteilt. [...]

  21. I have been geting 404 errors trying to download the plugin

  22. Does anyone know the name of the wordpress plugin that creates a list of your posts in a category instead of just displaying them one after the other? I want it so that when someone clicks on a category they just get a list of posts from that category.

    I'm sure Ive seen one…and sifting through the WP site is a nightmare

  23. Sorry about the first entry. My fingers don’t always go where they should.

  24. Hi
    Looking forward to this plug-in.

    I’m unable to “reply” to post”-the problem seems to be line 105 of comments-paged.php driven by line 47 of thread-event.js. My html looks like this:
    <a href=”moveAddCommentBelow(” rel=”nofollow”>

    • Hmm.
      Looks like something cut-me off (quote marks, perhaps).
      Anyway, html at moveAddCommentBelow is getting a space immediately after the opening quote and before div-comment. I figure this is causing the problem.

      Thoughts.
      Ted

      • With sincere thanks to Zhou and his tenacious analysis.

        Finally worked out that problem was caused by a plugin “Link Indication”. Swapped that for Semiologic’s “sem-external-links” and all fixed.

        Thanks Zhou

        Ted

  25. What I want to do on my blog, is every few hours take the oldest post and move it to the
    front of the queue, all automatically. Anyone know if there is a plugin that can do this or
    a simple way to set up another plugin to do this (use my own feed perhaps)?
    Thanks.

  26. Thanks for the plugin, I’ve been trying to find threaded comments that work since first installing WordPress (seems like an obvious standard feature, doesn’t it?). I can confirm that this plugin works on WordPress 2.0.5.

  27. Very nice plugin! thank you :) and thanks to Andy from Yellowswordfish.com for letting me know of this plugin.

    Best,
    -Rush

  28. [...] Added Plugin: Page Threaded Comments by Zhou Qingbo [...]

  29. I’ve installed this plu (maybe not in the correct way), but it doesn’t work, it’s like brian threaded, but it loose the reply to comment function, plus i don’t see any page, what i’ve done wrong?
    PLEASE HEEELP ME! I can pay you off something if you help me.:)

  30. I have tried the link to the download and continue to get a 404 error. Anyone have the updated link?

  31. Same problem here, and I just needed the css file, as I removed it and now my error log is full of it.

    If you could fix the download, it would be greatly appreciated.

  32. Mr Zog and Iva,
    I’m very sorry about this. The file was lost due to an operation mistake. I’ll fix it in 24 hours and send it to you via Email.
    Zhouqb

  33. Thank you so much:)

  34. [...] Paged Threaded Comments 1.0 用這個可以一對一的回復留言也可以以一個主題回復1,,最新的留言會在最上面 還有分葉效果2看上去會比較整齊 回復留言也很方便 效果請看留言板3 [...]

  35. I don’t want to spend time on it any more…

  36. Software Development Guide…

    I couldn’t understand some parts of this article, but it sounds interesting…

  37. Same problem here, and I just needed the css file, as I removed it and now my error log is full of it.

    If you could fix the download, it would be greatly appreciated.

  38. Does it work with wp 2.2 and 2.3?

  39. I modified my comments-paged file pretty heavily to match the look of my theme. The functionality is still there but I seem to either having a problem or have found a bug. When i reply to a comment on any page other than the last it does not nest. It doesn’t appear anywhere. It only shows up and it is nested in the appropriate place if I select “show all”. Anyone know how to fix this?

    Is the author supporting this still?

  40. Hi, the “dirty” gravatar zip is giving a 404 error. Can it be re-uploaded please?

  41. Does this work

  42. Does this work?

  43. RETGRETGERTERTRE

  44. [...] aber richtig komfortabel ist die normale Kommentarfunktion nicht. Ich hatte bisher ja das Paged Threaded Comments-Plugin im Einsatz und adaptierte hierfür mein Comments-Template mit sehr viel Aufwand. Hat auch [...]

  45. This is really strange, but this plugin seems to find nine more comments in a post than really exist. Like, if a new post has no comments, it will show “9 Comments» ” and then nothing underneath. Any ideas what might be causing this? I’m using WP 2.6.1.

  46. wordpress 2.6 :

    Fatal error: Cannot redeclare btc_options_page() (previously declared in /home/.rema/lfs/lfs.ph/wp-content/plugins/briansthreadedcomments.php:55) in /home/.rema/lfs/lfs.ph/wp-content/plugins/PagedThreadedComments/briansthreadedcomments.php on line 42

  47. Is it possible to make the comments numbered?

  48. test234

  49. thanks for this great plugin. now using on woozybmx.com check: http://www.woozybmx.com/blog/woozybmx/freedombmx-issue-87/

  50. test again

  51. anoter test

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please copy the string 5wCDAT to the field below: