wp hacks

dodo's threaded comments

actually someone translated my old threaded comments hack for b2 for wp – i think it works great except the fact it uses wp-comments-reply.php. i find that totally unnecessary. i don’t really understand the purpose behind it. i modified that file some what to rid of the necessity of wp-comments-reply.php.

download here

A Reader’s Toolbox

There are a lot of hosting companies which offers the cheap domain hosting plans to register the domains in cost-effective prices. Some hosting companies provide merely domain web hosting to promote the domains after registration processing. The affiliate programs are introduced by affiliate business entrepreneurs who have marketing interaction with different corporate on the commission basis. The best hosting services are provided with all essential accessories and features by internet providers in the most reliable manner.

47 thoughts on “dodo's threaded comments

      1. πŸ™‚ Nothing really, it was something we wanted to avoid (this was planned as part of the WordPress core for 1.2, but I fell behind in development)

  1. oh dodo, i noticed something in the treadedcomments.txt…. when it gives instructions to edit the wp_comments.php file, you’re missing out a tag that displays the content of the comment xDD

    code removed coz it got messed up. i had phpcode plugin installed now and hopefully it will work better – by dodo

  2. I tried your threaded comments. Here.
    I had tried to get Mark’s threaded comments to work some time ago but was unsuccessful.
    Yours was great. Everything done under 5mins. πŸ™‚
    However, i now have a vertical line in front of my reply to someone’s comment.

    1. you do have a line in your reply.. so maybe you fixed that? it should work after you edited your wp-layout.css

      to have comment by stuff, open your wp-comments.php

      <?php if (‘yes’ == get_settings(‘thread_comments’)) { ?>

      add before:
      <p><cite><?php comment_type(); ?> <?php _e(“by”); ?> <?php comment_author_link() ?> — <?php comment_date() ?> @ <a href=”#comment-<?php comment_ID() ?>”><?php comment_time() ?></a></cite>

      let me know if it works. that’s actually a bug in mark’s as well.

        1. Sorry about this. I have used your Code button next to i . It seems to have messed up my comment. So I won’t use that button and won’t post the code I’ve used. I’ll just explain what I did.

          I was saying that this code above didn’t work.
          Then I inserted underscores in commenttype,commentauthorlink, commentdate, commentID,commenttime so that they become comment_type,comment_author_link, comment_date, comment_ID,comment_time. I guess your underscores didn’t show up properly when you wrote that reply to my comment. I also changed the – right before the comment date to the word on because it showed up as two question marks in my comments.
          Now it works just great. πŸ™‚

          Concerning the vertical line before a reply, it’s still there and i can’t get rid of it. It should be a css problem but i haven’t been able to figure it out yet. Can you help me there? I only edited my css using the css you included in your instructions.
          I notice that Perja who used your threaded comments also has that vertical line.

          1. oh you want to get rid of the vertical line. i thought you wanted it there. it’s in your wp-layout.css
            ol li ul {
            list-style-type: none;
            border-left: 1px solid #ddd;

            find that and remove the border.

  3. I just noticed something else. In your instructions about editing wp-comments.php , the last instruction removes the
    Commented by Name under the comment for me. I only see the comments but not the name of the person who wrote the comment.I’m not sure why this is happening.
    I can only know who the commentors are by looking at the list above the comments (i have the comment plugger plugin installed).
    I had tried the very first step about running add_comment_reply_ID.php and i got this:

    Can’t connect to the database
    Duplicate column name ‘comment_reply_ID’

    Then I remembered that I had already run Mark’s add_comment_reply_ID.php when i had attempted to install threaded comments in the past so I just went ahead with the remaining instructions.

    1. ok i didn’t test out all my steps since i already did my hack when i wrote read me. i just did it from memory. thanks for the note. i will fix those.

  4. HI, I installed your hack on top of the translated hack and it messed up all the comments, it doesn’t thread the comments right and then it displayed the posts that had comments threaded with the previous version as threads within threads like in this one.

    1. i’m not sure what you mean by “on top of the translated hack” – if you mean mark’s.. you are not supposed to add the two hacks together. the readme is meant for a fresh install.

      1. You see, I had marked the mods made with the converted hack that used the comment-post-reply file, and so I went back, deleted all those mods and replaced by yours.

        Now it’s all… um… broken.

        1. i can not tell what the problem is from your code.. the reason it’s not working is the comment_reply_ID is not being recorded by the javascript like it’s supposed to. but i’m not sure why.. i will have to look at your php code to see. it did work for aline tho.

            1. i found what’s wrong with your code, you have
              <input type="hidden" name="comment_reply_ID" id="comment_reply_ID" value="0" />
              <input type="hidden" name="comment_reply_ID" value="0" /></input></input>

              you need to delete the second line

              1. Erf, I looked high and low for the duplicate line… In the end, I couldn’t find it, so I did the sensible thing, deleted the files on my server, remodded fresh ones and uploaded.

                Guess what? It works! πŸ˜€
                Thank you for you helping me out.

  5. Thanks for the help it’s working now..Threaded comments don’t work with Comment Moderation.?? In my blog somehow the thread comment bypass moderation and get post without being approval..I was having the problem when I was using Mark’s coversion of the hack as well..Do u know why this is happening??i turned comment moderation off, because the replying when getting posted anyway..

  6. Sorry to come back with yet another problem, but the name of the commenter seems to dissapear with the new plugin. I only changed what the readme said to change, nothing more…

  7. Do you think you can implement Email notification with the threaded comments for wp? I noticed that I get emails whenever you reply to my comments. It would be nice to have this. πŸ™‚
    I know that many people on the wordpress forums wanted this and only one person did something about it but in a separate hack. There’s also Subscribe to comments by Scriptygoddess but it’s not what i want. My blog readers won’t be interested in seeing the comments by other people but rather,notifications of replies to their own comments.
    From your past blog entry about threaded comments, I know that you used to have email notification but I’m not sure if it’s exactly the same thing I’m talking about.

  8. I notice that the total comments count for a blog entry is accurate even when using threaded comments. However, the numbers next to the comments are not. I don’t have any number next to comments to which someone has replied to. For example there, the total number of comments is 15. Actually, it’s 14 but the trackback counted as 1 comment.ah well. Anyway,if you scroll down to see all the comments,you will see that the last one is number 10 and not number 15.

    1. that’s because there is no number shown next to your replies. your number count is done by <ol> not the script. some more work are required if you want the numbers to show up on the replies. i don’t plan to release my code on that coz it deals a lot more with the comment layout. i hate to say but i don’t want to provide any support for layouts. that’s more than my time can deal with. if scriptygoddess is willing to help, ask them. it’s not hard to figure out. you just need an extra counter variable in the loop and make it global in the dodosthread function.

  9. Pingback: BubblesSOC
  10. I’ve been looking at the code for this for awhile…because I’m sure its something I’ve done incorrectly. I used WP1.2.2 and for the wp-comments.php file the last direction in the readme isn’t present in my wp-comments.php file. I even thought I might have changed it earlier and that’s what it was, but I looked at the original file and its not there either…looks kind of important, too. But nothing like this is in the file I have. It’s the very last direction for wp-comments.php in the readme file…everything else has been easy and straightfoward, except for this weird thing.

    Does this mean the version of wordpress I have just won’t handle this? *boggles* I’m sorry to bug you!

    This is the code that I cannot find:
    <p><cite><?php comment_type(); ?> <?php _e("by"); ?> <?php comment_author_link() ?> — <?php comment_date() ?> @ <a href="#comment-<?php comment_ID() ?>"><?php comment_time() ?></a></cite> <?php edit_comment_link(__("Edit This"), ' |'); ?></p></li>

  11. I can’t get your hack to work after trying for many hours. I’m using WP Does it just not work in this version? Please let me know, or if you could send me the files already edited, that would be great. Thanks!

    – Karan

  12. Guy .. Beautiful .. Amazing .. I’ll bookmark your website and take the feeds alsoI am satisfied to find so many helpful info right here within the post, we want develop more strategies in this regard, thanks for sharing. . . . . .

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s