Viewing 7 replies - 46 through 52 (of 52 total)
  • 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: https://mtdewvirus.com/
    */
    -function get_recent_comments($no_comments = 5, $comment_lenth = 5, $before = '

    • ', $after = '
    • ', $show_pass_post = false, $comment_style = 0) {
      +function get_recent_comments($no_comments = 5, $comment_lenth = 25, $before = '

    • ', $after = '
    • ', $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!

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

    I have been using a variety of scripts like the one mentioned, (last one was the following version : https://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?

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

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

    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

    Thread Starter Nick Momrik

    (@mtdewvirus)

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

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

Viewing 7 replies - 46 through 52 (of 52 total)
  • The topic ‘Recent comments w/ portion of comment’ is closed to new replies.