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:)

This entry was posted on Tuesday, May 23rd, 2006 at 11:29 am and is filed under WordPress. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

82 Comments »

2006-05-23 12:17:55

[...] English page: http://www.qingbo.org/blog/?p=54 [...]

Comment by roz
2007-06-23 09:16:15

test

Comment by fadsf
2008-07-02 16:00:59

fasdfasd

 
 
 
Comment by Yidiot
2006-05-30 21:05:28

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

 
2006-06-03 10:43:08

[...] English: http://www.qingbo.org/blog/?p=54 Tagged:   plugin , WordPress [...]

 
Comment by Brian Meidell
2006-06-05 18:57:49

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

 
2006-06-08 09:32:42

[...] 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. [...]

 
2006-06-11 07:41:37

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

 
Comment by toolvicarious
2006-06-12 22:38:42

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!

Comment by zhouqb
2006-06-13 02:35:22

No idea if it’s a spam. Mail me about the error, please.

 
Comment by Lopo lencastre de Almeida
2006-07-05 00:10:54

This is for Wordpress 2.0.2
Check at http://gleamynode.net/wordpress/archives/106 for the 1.5 compatible version.

 
 
Comment by Everton Blair
2006-06-17 06:22:56

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

Comment by zhouqb
2006-06-17 09:49:55

Sorry, I didn’t see any effect in your blog, and the code you pasted may have been eaten by WordPress.
This plugin creates different backgrounds for every other comment in a thread, like the page http://www.qingbo.org/blog/?p=55#comment-64
If you want to paste the code, please email me and point to a site using the effect you described.
You’re welcome:)

Comment by test
2007-02-28 13:20:27

just testing…

Comment by test
2007-02-28 13:21:05

test again

(Comments wont nest below this level)
Comment by testtest
2008-03-24 18:36:04

anoter test

 
 
 
 
 
Comment by Quintessential
2006-06-29 08:26:34

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.

Comment by Quintessential
2006-07-02 01:31:54

Thanks so much for your gravatar support. Finally they are working,, again thanks so much…

 
 
Comment by Baby-Ang3L ♥
2006-07-05 12:29:22

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

Comment by zhouqb
2006-07-08 10:05:06

Quintessential may help you.(See the comment below. He had the same problem)
Sorry

 
 
Comment by QE
2006-07-06 06:40:44

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…??

Comment by zhouqb
2006-07-08 09:59:37

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:)

 
 
2006-07-08 13:56:38

[...] 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. [...]

 
Comment by Brian Schmidt
2006-07-10 05:23:12

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 ;)

 
2006-07-24 00:54:54

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

 
Comment by Andy
2006-08-04 07:27:01

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?

Comment by Andy
2006-08-22 21:11:11

Solved it. The problem is with the way PHP5 now treats array_merge. Simple fix.

 
 
Pingback by Kalivo - Show
2006-08-10 11:27:49

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

 
Trackback by Kalivo
2006-08-16 03:00:16

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 »

Comment by Alec
2007-06-14 10:29:18

Just testing this stuff and it seems to work well! =)

 
 
Comment by Daniela
2006-08-28 02:53:09

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

Comment by zhouqb
2006-10-07 19:46:49

It seems you have soved the problem:)

 
 
Comment by Laura Lohr
2006-08-28 04:04:16

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.

 
Comment by Milena
2006-09-10 00:59:33

You have good site, thx a lot! wall murals

Comment by anton merkurov
2006-09-11 02:49:11

test

 
 
Comment by Gerry
2006-09-14 15:20:58

great pugin. Thanks

 
2006-09-21 05:11:25

[...] 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. [...]

 
Comment by Andy Beard
2006-10-21 04:58:13

I have been geting 404 errors trying to download the plugin

Comment by zhouqb
2006-10-21 12:34:56

Sorry. I’ve moved the blog to the root directory and forgot to repair the links. Now it’s OK:)

 
 
Comment by Chris
2006-11-18 00:50:43

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

Comment by zhouqb
2006-11-18 01:38:12

http://www.viper007bond.com/wordpress-plugins/clean-archives-reloaded/
This is the plugin I know:smile: Maybe you will like it.

 
 
Comment by Gasinas
2006-12-01 10:12:38

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

 
Comment by Tedinoz
2006-12-04 06:29:59

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”>

Comment by Tedinoz
2006-12-04 06:34:30

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

Comment by Tedinoz
2006-12-13 06:44:11

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

 
 
 
Comment by Jadon
2006-12-13 04:54:44

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.

 
Comment by Kennric
2006-12-28 11:02:48

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.

 
Comment by Rush
2007-01-06 10:03:01

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

Best,
-Rush

Comment by test
2007-06-15 12:11:40

test

 
 
2007-01-20 01:29:19

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

 
Comment by R&B Junkie
2007-07-04 20:07:17

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.:)

 
Comment by Mr Zog
2007-08-09 00:21:23

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

 
2007-08-10 12:42:59

[...] Visit [...]

 
Comment by Iva
2007-08-10 20:06:51

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.

 
Comment by zhouqb
2007-08-10 20:41:48

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

 
Comment by Iva
2007-08-10 23:05:35

Thank you so much:)

 
2007-08-24 04:58:20

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

 
Comment by Jackbook.com
2007-09-21 11:24:27

may i test it? :)

 
Comment by qingbo
2007-10-21 02:12:06

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

Comment by Ammy
2007-12-11 17:04:09

hmmm

 
 
2007-11-15 16:23:57

Software Development Guide…

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

 
Comment by yesky
2007-12-02 21:01:55

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.

Comment by zhouqb
2007-12-03 17:32:10

Great Spam!!

 
 
Comment by Alex
2007-12-07 04:55:22

Does it work with wp 2.2 and 2.3?

Comment by zhouqb
2007-12-07 10:24:05

Maybe you need some simple hacks :)

 
Comment by Ash Haque
2007-12-25 12:17:27

Doesn’t seem to be working on Wordpress 2.3. After I try to put in a comment, it goes to an error page (http://www.website.com/page_comments.php)

Comment doesn’t show up either :-(

 
 
Comment by daniel
2008-02-07 16:12:03

test comment

Comment by fdhdh
2008-02-10 01:19:11

fdhadh

 
 
Comment by Steve
2008-02-20 12:06:38

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?

Comment by wqeqwe
2008-02-25 11:01:52

dsf

Comment by wqeqwe
2008-02-25 11:02:14

32423

Comment by wqeqwe
2008-02-25 11:03:38

werw

(Comments wont nest below this level)
 
 
 
 
Comment by SM
2008-03-15 05:19:40

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

Comment by zhouqb
2008-03-15 20:04:22

Luckily I found the archive. Try it again :)

 
 
Comment by tng
2008-03-23 01:39:30

Does this work

 
Comment by tng
2008-03-23 01:51:22

Does this work?

 
Comment by FERSFRE
2008-04-07 18:09:44

RETGRETGERTERTRE

 
2008-05-22 15:41: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 [...]

 
Comment by ac
2008-08-07 16:53:03

3434

 
Comment by BK
2008-09-10 00:09:10

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.

 
Comment by venz
2008-10-19 00:57:25

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

 
Comment by Ken Thomas
2008-11-07 12:22:14

Is it possible to make the comments numbered?

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)

Please copy the string 1cbt3G to the field below: