WordPress.org

Ready to get started?Download WordPress

Forums

Recent comments w/ portion of comment (52 posts)

  1. Daisyhead
    Member
    Posted 10 years ago #

    I did copy it verbatum. I haven't had a chance to try it again, but hopefully I was just doing something stupid and it will work fine.
    Thanks,
    Daisyhead

  2. Daisyhead
    Member
    Posted 10 years ago #

    Well, I just tried implementing this again and it worked this time. I was tired the last time I tried it, so it looks like it was user error.
    Thanks,
    Daisyhead

  3. Nick Momrik
    Member
    Posted 10 years ago #

    ;-)

  4. waterlily
    Member
    Posted 10 years ago #

    yay! this worked for me, too!!!

  5. junesix
    Member
    Posted 10 years ago #

    Sorry about resurrecting an older thread but I was wondering why all the post titles are stored in lowercase. Everything works fine except when I use $comment->post_title, the title is displayed in all lowercase. Something I missed?

  6. Anonymous
    Unregistered
    Posted 10 years ago #

    any plans to plugin-ify this hack?

  7. Nick Momrik
    Member
    Posted 10 years ago #

    Yes actually...I just redesigned my site and to change a few things to plugins was next on my list. It shouldn't take too long...I'll post back when it's ready.

  8. Nick Momrik
    Member
    Posted 10 years ago #

    It's done...along with a few other plugins for comments and posts.
    http://wordpress.org/support/10/5425

  9. junesix
    Member
    Posted 10 years ago #

    I'm an id10t. It was the stylesheet. Thanks for the great plugins MtDewVirus.

  10. Anonymous
    Unregistered
    Posted 10 years ago #

    Wooah! That was fast! I'll be trying this plugin out as soon as I get another thing sorted. Thanks!

  11. geotay
    Member
    Posted 10 years ago #

    Any way to include title of the entry in the output?

  12. ShelbyYY
    Member
    Posted 10 years ago #

    I can't begin to tell you how thankful I am that I found this post. (And I was just on the verge of mailing you, Ms. Daisyhead to ask you how to do it, too... too funny!) Brilliant hack, Dew, btw. I was thinking that I was going to miss seeing the recent comments in my sidebar (though, for WP I'd have happily just done without them...)
    Thanks again!

  13. ShelbyYY
    Member
    Posted 10 years ago #

    Maybe I am stupid. Maybe I am missing something.
    I am trying to use your (well, now they're plugins..) on my site, but I also use PHPCurrently, and PHPCalendar, which I got from codegrrl.com.
    Now, I don't know which thing is doing it, but it appears from the errors that I've gotten that the recent comments is trying to call from the wrong database. The errors say that none of the requests are able to be found in the db I set up for phpcurrently/phpcalendar. I'm really new to all this, so, please forgive the confusion.
    Thanks for any help in advance. :)

  14. gbarber
    Member
    Posted 10 years ago #

    Is there anyway to exclude a category or include only certain categories? I'm trying to exclude just one category from showing recent comments on the main page. Any ideas?
    http://www.playswellwithothers.net

  15. gbarber
    Member
    Posted 10 years ago #

    **bump**

  16. paul
    Member
    Posted 9 years ago #

    I got a copy of this from someone else, since MtDew's site is currently disassembled. I made a couple of small tweaks to make it more of a drop in item (specifically, I added a title/header, expanded the length of the comments, and made it output a list like the other sidebar items).

    --- recent_comments.php.orig Thu Jul 22 22:17:52 2004
    +++ recent_comments.php Thu Jul 22 22:17:47 2004
    @@ -8,13 +8,13 @@
    Author URI: http://mtdewvirus.com/
    */
    -function get_recent_comments($no_comments = 5, $comment_lenth = 5, $before = '

  17. ', $after = '
  18. ', $show_pass_post = false, $comment_style = 0) {
    +function get_recent_comments($no_comments = 5, $comment_lenth = 25, $before = '
  19. ', $after = '
  20. ', $show_pass_post = false, $comment_style = 0) {
    global $wpdb, $tablecomments, $tableposts;
    $request = "SELECT ID, comment_ID, comment_content, comment_author, post_title FROM $tablecomments LEFT JOIN $tableposts ON $tableposts.ID=$tablecomments.comment_post_ID WHERE post_status = 'publish' ";
    if(!$show_pass_post) $request .= "AND post_password ='' ";
    $request .= "AND comment_approved = '1' ORDER BY comment_ID DESC LIMIT $no_comments";
    $comments = $wpdb->get_results($request);
    - $output = '';
    + $output = '<li id="comments">Recent comments:<ul id="recent_comments">';
    foreach ($comments as $comment) {
    $comment_author = stripslashes($comment->comment_author);
    $comment_content = strip_tags($comment->comment_content);
    @@ -32,6 +32,7 @@
    $output .= '" title="View the entire comment by ' . $comment_author.'">' . $comment_excerpt.'' . $after;
    }
    }
    + $output .= ' ';
    echo $output;
    }
    ?>

    I'd like to merge the two presentations so that the post, the author, and the comment itself appear: do I post any changes here or is there a Better Way?
    PS: WordPress rocks!

  • Anonymous
    Unregistered
    Posted 9 years ago #

    Mt.Dew Virus really makes this work smooth - appreciate it!
    I'm trying to get the post title after the commenter's name, and tried to follow directions in the February comments here, but can't make it work. I do not know php:
    $output = '';
    foreach ($comments as $comment) {
    $comment_author = stripslashes($comment->comment_author);
    $comment->post_title
    $comment_content = strip_tags($comment->comment_content);

  • Anonymous
    Unregistered
    Posted 9 years ago #

    I have been using a variety of scripts like the one mentioned, (last one was the following version : http://www.scriptygoddess.com/archives/2004/07/08/recent-commenters-and-commented-on-posts/)
    ... but it renders my spamwords plugin useless - posts that are waiting in my moderation queue are shown as recently posted.
    I don't like that.
    I am not a coder, anybody knows some help?

  • Anonymous
    Unregistered
    Posted 9 years ago #

    Any help? Just show me an example would be enough :)

  • Beel
    Member
    Posted 9 years ago #

    This is the one I am using:
    http://mtdewvirus.com/wp-hacks/

  • lauoakle
    Member
    Posted 9 years ago #

    i was wondering, i am new with wordpress and i wanted to find out how to customize the recent comments hack so it shows the name comment then a link [go] at the end to read the rest of the comment. i did figure it out but it isnt XHTML valid. is there a way to fix it and still get it to validate?

    i've been trying to work on this for 2 days now and i'm running out of hair to pull out. lol

  • Nick Momrik
    Member
    Posted 9 years ago #

    There are new versions for the hacks.
    http://mtdewvirus.com/code/wordpress-plugins/

    Feel free to contact me if you have any specific questions about it.

  • 12

    Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags

    No tags yet.