Michael Heilemann.
If you have Dunstan's Time Since installed, this plugin uses it for the title="" attributes on the comments and posts. (For WordPress 1.5) Author: Brian Meidell Author URI: http://meidell.dk/ Version 1.5: Now works without LOCK TABLE and CREATE TEMPORARY TABLE priviledges. Version 1.5.1: Can't remember what I did here Version 1.5.2: Fixed count select statement to not include spammy comments Version 1.5.3: Properly excludes track- and pingbacks Version 1.5.4: Excludes posts that are not published, even if they have comments Version 1.5.5: Fade old comments, fixed bug that wreaked havoc with Time Since Version 1.5.6: Bugfix from Jonas Rabbe (http://www.jonas.rabbe.com/) pertaining to timesince Version 1.5.7: Bugfix so old colors can be darker than new colors (stupid oversight), thanks to http://spiri.dk for spotting it. Bugfix where single digit hex would cause invalid colors, thanks to http://www.wereldkeuken.be/ for the fix. Version 1.5.8: Updated to work with WordPress 2.1 alpha by M. Heilemann. */ function blc_latest_comments($num_posts = 5, $num_comments = 6, $hide_pingbacks_and_trackbacks = true, $prefix = "
  • ", $postfix = "
  • ", $fade_old = true, $range_in_days = 10, $new_col = "#444444", $old_col = "#cccccc") { global $wpdb; function clamp($min, $max, $val) { return max($min,min($max,$val)); } $usetimesince = function_exists('time_since'); // Work nicely with Dunstan's Time Since plugin (adapted by Michael Heilemann) // This is compensating for the lack of subqueries in mysql 3.x // The approach used in previous versions needed the user to // have database lock and create tmp table priviledges. // This uses more queries and manual DISTINCT code, but it works with just select privs. if(!$hide_pingbacks_and_trackbacks) $ping = ""; else $ping = "AND comment_type<>'pingback' AND comment_type<>'trackback'"; $posts = $wpdb->get_results("SELECT comment_post_ID, post_title FROM ($wpdb->comments LEFT JOIN $wpdb->posts ON (comment_post_ID = ID)) WHERE comment_approved = '1' AND $wpdb->posts.post_status='publish' $ping ORDER BY comment_date DESC;"); $seen = array(); $num = 0; if($fade_old) { $max_time = $range_in_days * 24 * 60 * 60 ; $r_new = hexdec(substr($new_col, 1, 2)); $r_old = hexdec(substr($old_col, 1, 2)); //$r_min = min($min, $max); //$r_max = max($min, $max); $r_range = ($r_old-$r_new); $g_new = hexdec(substr($new_col, 3, 2)); $g_old = hexdec(substr($old_col, 3, 2)); //$g_min = min($min, $max); //$g_max = max($min, $max); $g_range = ($g_old-$g_new); $b_new = hexdec(substr($new_col, 5, 2)); $b_old = hexdec(substr($old_col, 5, 2)); //$b_min = min($min, $max); //$b_max = max($min, $max); $b_range = ($b_old-$b_new); } // print "ranges: $r_range, $g_range, $b_range
    "; // print "r: ".(0.5*$r_range+$r_new)."
    "; foreach($posts as $post) { // The following 5 lines is a manual DISTINCT and LIMIT, // since mysql 3.x doesn't allow you to control which way a DISTINCT // select merges multiple entries. if(array_key_exists($post->comment_post_ID, $seen)) continue; $seen[$post->comment_post_ID] = true; if($num++ > $num_posts) break; $commenters = $wpdb->get_results("SELECT *, UNIX_TIMESTAMP(comment_date) AS unixdate FROM $wpdb->comments WHERE comment_approved = '1' AND comment_post_ID = '".$post->comment_post_ID."' $ping ORDER BY comment_date DESC LIMIT $num_comments;"); $count = $wpdb->get_var("SELECT COUNT(comment_ID) AS c FROM $wpdb->comments WHERE comment_post_ID = $post->comment_post_ID AND comment_approved = '1' ".$ping); $i = 0; $link = get_permalink($post->comment_post_ID); if($usetimesince) $title = " title=\"Last comment was ".time_since($comment->unixdate)." ago\""; else $title = ""; echo $prefix."".stripslashes($post->post_title). "  ".$count."
    \n"; foreach($commenters as $commenter) { if($usetimesince) $title = " title=\"Posted ".time_since($commenter->unixdate)." ago\""; if($fade_old) { $diff = time() - $commenter->unixdate; $r = round($diff/$max_time*($r_range))+$r_new; $r = clamp(min($r_new, $r_old), max($r_new, $r_old), $r); $g = round($diff/$max_time*($g_range))+$g_new; $g = clamp(min($g_new, $g_old), max($g_new, $g_old), $g); $b = round($diff/$max_time*($b_range))+$b_new; $b = clamp(min($b_new, $b_old), max($b_new, $b_old), $b); $r_hex = str_pad(dechex($r), 2, '0', STR_PAD_LEFT); $g_hex = str_pad(dechex($g), 2, '0', STR_PAD_LEFT); $b_hex = str_pad(dechex($r), 2, '0', STR_PAD_LEFT); $colstr = " style=\"color: #".$r_hex.$g_hex.$b_hex.";\""; } if($i++ > 0) echo ", "; echo "comment_ID."\"$title>".stripslashes($commenter->comment_author).""; } if($count > $num_comments) echo " [...]"; echo "".$postfix."\n"; } } ?> Relix | YEMblog

    Relix RSS

    August 31, 2012

    Interviews: Reel Time – Trey Anastsaio Talks Traveler [Relix]

    August 25, 2012

    Drugs and Phish: David Calarco, aka Mr. Miner – A New Plane of Consciousness [Relix]

    March 21, 2012

    Symphonic Tour: LA Philharmonic Member Talks Trey [Relix]

    January 20, 2012

    From The Archives: Too New To Be Known – Phish Oct. 89 [Relix]

    December 17, 2011

    Guest Spots: The National Welcomes Trey Anastasio To The Stage [Relix]

    November 15, 2011

    Lists: Seven Significant Musical Hiatuses [Relix]

    November 10, 2011

    Interviews: A Carefree Mike Gordon Preps For Tour [Relix]

    July 11, 2011

    Interviews: Chris Kuroda Still Shines (Part Two) [Relix]

    The other thing is I always assume that [the members of Phish] can’t sit still for as long as they think they can and something will pop up within this world, whether it be a Trey tour or maybe some Phish dates will come in the future where there’s not supposed to be any. I’m not saying that will happen, but that’s happened plenty in the past. It always seems to work itself out without me having to exert too much energy trying to find the next thing.

    July 8, 2011

    Interviews: Chris Kuroda Still Shines [Relix]

    Trey has some human qualities that I know very few people have. And the way he treats people and talks to people and explains himself to people. It’s such a gentle, delicate, amazing way that somehow commands a ton of authority in a very unconventional sense. It makes you want to do whatever he wants you to do, as impossible as it sounds.

    July 6, 2011

    Interviews: Tom Marshall Gathers Steam Pt. 1 and Pt. 2 [Jambands/Relix]

    TM: (laughs) Well, it’s funny. I have recently seen some stuff on line from young kids, young fans, first time fans, and they get on Phantasy Tour, and a lot of them write good things about Phish lyrics. It has always been my style to be a little bit ambiguous, not the most obvious thing that you would think about, or think what a song is about. If that is what people like about Phish—normally, it is the jamming, the unpredictable nature of live shows, but, the lyrics are part of it. I’m noticing that first time fans are getting it. I think that’s great. I see a lot of “What Are Your Favorite Lyrics?” threads from users I don’t recognize on Phantasy Tour. You know, every now and then, I’ll check them out.

    The place has gotten a little negative for me, and it is always the people who stay home, who don’t go to the shows. They see it on paper, and they tear it apart like “oh, this was a terrible show,” and they weren’t even there. Whatever. I’m so not worried about that. And neither is the band, I’ll have you know. In fact, of the four band members, the only one who ever might have a chance of ever getting on Phantasy Tour, I would think, is Mike. For almost six or seven years, Trey doesn’t get online and doesn’t read reviews at all. Do the math.

    May 17, 2011

    Watkins Glen: What Should We Call The Super Ball IX Newspaper? [Relix]

    March 29, 2011

    Audio: Page McConnell Sits In w/ Particle – 2002 [Relix]

    March 15, 2011

    Contests: Win Tickets and Free Bowling for Mike @ Brooklyn Bowl [Relix]

    March 10, 2011

    Features: A Musicologist Geeks Out With Phish [Relix]

    March 3, 2011

    Trey Anastasio: Reviews – Trey Anastasio in Denver [Relix]

    January 12, 2011

    NYE Run: Phish on NYD at MSG – Review [Relix]

    November 22, 2010

    Audio: Stream (Another) Idea by Mike Gordon [Relix]

    October 19, 2010

    Contests: Win an Autographed Bass From Mike Gordon [Relix]

    Mossery: Live Blog From The Mossery [Relix – JamGal]

    October 13, 2010

    Contests: Doctor’s Orders – Coral Sky Essay Contest [Relix]

    August 31, 2010

    Interviews: Trey Anastasio Reflects on Summer Tour [Relix]

    You know, we pulled into Merriweather Post Pavilion and we suddenly remembered that there was a song called Walfredo that has a line in it about Merriweather Post Pavilion because we had played with Santana at Merriweather Post Pavilion in like 1991. We’re like “oh, we should learn it.” We get the recording and we learn it backstage and off we go. And that’s a lot of fun, so maybe we do it again.

    August 16, 2010

    Berkeley: Phish @ the Greek, Night Three [Relix]

    August 7, 2010

    Berkeley: Phish @ the Greek – Night One [Relix]

    August 6, 2010

    Interviews: Trey Shares Thoughts on Covers [Relix]

    May 6, 2010

    Memorabilia: Posters Rescued From The Flood [Relix]

    April 13, 2010

    Influence’d: Sneak Peak – MGMT on the Cover of Relix [Jambands]

    Andrew VanWyngarden on seeing Phish at Madison Square Garden in December

    I was a big Phish fan growing up and went to lots of shows. We actually got to meet Trey at one of the Madison Square Garden shows last fall. The first few songs I was really taken back, and then the new songs I couldn’t get into as much. I thought “Foam” was really cool but “Time Turns Elastic”—that song was awful…

    January 19, 2010

    Trey Anastasio: Artists on Pavement [Relix]

    Relix: When do you remember hearing Pavement for the first time?

    Trey Anastasio: We were playing in Portland, Oregon, I think it was the spring of 1994. I was wandering around town and came across this cool little record store and went in to look around. I asked the woman behind the counter if she had anything new that she liked, and she handed me Crooked Rain, Crooked Rain.

    December 8, 2009

    Fall Tour: Phish Revisit Exile Moments [Relix]

    November 24, 2009

    Recaps: Phish in Cincinnati and Syracuse [Relix]

    November 2, 2009

    Games: Phish – The Crossword Experience [Relix]

    September 11, 2009

    Auctions: Phish Memorabilia to Benefit Mimi Fishman Foundation [Relix]

    August 9, 2009

    Exhibits: Phish Exhibition in Presque Isle [Relix]

    June 11, 2009

    Reviews: Phish & Fishman Rarities in Asheville [Relix]

    June 1, 2009

    Reviews: Phish’s Fenway Destiny [Relix]

    Last night in Boston’s Kenmore Square, Phish delivered its debut performance at Fenway Park, just a few miles from the Paradise Rock Club where the group played one of its most important early gigs outside of Vermont, more than 20 years earlier.

    April 23, 2009

    Interview: Excerpt For Relix Cover Story on Phish [Merry Swankster]

    Out of context files: “Less intoxication and debauchery and more family” – Mike Gordon, Phish bassist

    ” We had all seven kids there for the first time ever. It is part of the new vibe: Less intoxication and debauchery and more family,” says Phish bassist Mike Gordon in the June issue of Relix. “We’re people to have dinner with rather than to party down with and that doesn’t make for a less intense relationship or even a less intense jam. Maybe it’s more intense in a sense because we’re not clouded and can better sense the subtleties of what’s happening in our relationship.”

    April 15, 2009

    Influence’d: A Hipster Tribute to Phish [Relix]

    With hipster elite like MGMT, Vampire Weekend and Yeasayer citing Phish as an influence, it seems appropriate that over 100 indie, freak folk and noise-rock artists have re-interpreted Phish’s coveted Gamehendge saga to create the 82-minute Gamehenge ’09. Described as a “kaleidoscopic joyride through bizarre sound demi-genres,” the hipster tribute to Phish will include performances by Larkin Grimm, Towering Heroic Dudes, Teeth Mountain, Antique Brothers and King Crab, among many others.

    March 10, 2009

    Reviews: Mike Greenhaus Night 1, 2, 3 [Relix]

    January 7, 2009

    Tom Marshall: Backwards Down The Number Line [Relix]

    December 2, 2008

    25th Anniversary: Phish – Too New To Be Known [Relix]

    November 13, 2008

    Download: Free Funky Bitch From At The Roxy MP3 [Relix]

    November 11, 2008

    New Book: Phish – The Biography [Relix]

    October 31, 2008

    Polls: What Album Should Phish Cover Next Year? [Relix]

    October 21, 2008

    Review: Trey Anastasio w/ Classic TAB in NYC and Wallingford [Relix]

    September 30, 2008

    Comeback: Phish Reunion Rumors Continue To Swirl [Relix]