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"; } } ?> Jambands | YEMblog

    Jambands RSS

    May 20, 2011

    Live in Utica: WaterWheel Foundation Presents Utica Premiere [Jambands]

    March 24, 2011

    Cactus: The Dude of Life Sits In With Mike Gordon [Jambands.com]

    March 17, 2011

    Cactus: Mike Gordon to Perform at Jam In The Dam 2012 [Jambands]

    January 27, 2011

    Remasters: Phish Confirms Additional LivePhish CD Releases [Jambands]

    January 10, 2011

    NYE Stunts: Making Phish’s “Meatstick” Dance [Jambands]

    How did you get involved with the band and when did they first approach you about working with them on the NYE gag?

    About a month ago I got a call from a choreographer friend of mine who I’d met two years ago at the Stratford Shakespeare Festival. I hadn’t heard from her in about a year and a half and randomly I get an e-mail asking if I wanted to work with her on a gig, but I wasn’t allowed to know what it was until I signed a confidentiality agreement because they wanted to keep everything hush-hush. I really wanted to work with her so I said yes to whatever it was. And then the producers called me and had me go to their office and signed all of these confidentiality waivers. Then I flipped to the next page where it said “Phish New Years Eve Madison Square Garden,” which I was trying to get a ticket for anyway. So it was pretty crazy.

    Reviews: Phish @ MSG 01/01/2011 by Charlie Dirksen [Jambands]

    January 3, 2011

    NYE Run: Phish Opens 2011 at Madison Square Garden [Jambands]

    January 1, 2011

    NYE: Phish Revives New Year’s Stunt at MSG [Jambands]

    December 31, 2010

    MSG1: Opening Night For Phish @ MSG [Jambands]

    December 29, 2010

    NYE Run: Phish 12/28 Worcester Review by ZZYZX [Jambands]

    December 28, 2010

    Remembrances: NYE Runs Past w/ ZZYZX, Pt. 2 [Jambands]

    Today Jambands.com concludes its two-part look at Phish’s New Year’s Run past with David Steinberg, the original unofficial Phish statistician (aka Timer). The quartet opens its five-night New Year’s Run tonight at Worcester’s Centrum, now known as theDCU Center. The itinerary includes three nights at Madison Square Garden, featuring their first New Year’s Eve at the venue since their return from their first hiatus on December 31, 2002. TheMockingbird Foundation board member (a charitable organization setup by fans to distribute funds generated from the Phish community) was at the first Phish New Year’s Eve event (12/31/89), and has been back ever since.

    NYE Run: Phish Opens New Year’s Run w/ Snow-Themed Songs [Jambands]

    December 23, 2010

    Remembrances:  A Look Back at Phish NYE Runs, Pt. 1 [Jambands]

    RR: Yeah, the ’94 summer tour ended with a great show at Sugarbush in Vermont. Do you think the band also knew that a change in eras was taking place?

    DS: I don’t know. I think for them the change may have occurred when they hit the East Coast on that tour. If you look at the venues, they change massively. It’s like theatre, theatre, theatre, and, all of a sudden, it’s the Mann and Great Woods. After that Mann show—which was the last show I saw on that tour; the next time I saw them was Halloween—it just felt much different. Halloween was insane; people were just breaking into the venue. So, yeah, Madison Square Garden, while surprising, it did feel like where they were going.

    December 13, 2010

    Tour Recaps: Phish October Tour In Review [Jambands]

    December 10, 2010

    We Are Everywhere: Marcos Esquandolas & The Pizza Discount [Jambands]

    November 30, 2010

    Cactus: Mike Gordon Closes Fall Tour With Guests [Jambands]

    November 29, 2010

    Cactus: Jon Fishman Sits In With Mike Gordon Band [Jambands]

    November 22, 2010

    Guests: Interview – Stuart Bogie – Phish, Fela! & Antibalas [Jambands]

    November 17, 2010

    Halloween: ZZYZX – Inverting Loaded [Jambands]

    November 12, 2010

    Cactus: Gathering Moss with Mike Gordon in Montana [Jambands]

    SM: Are there any plans to incorporate Mike Gordon shows into the Phish Live download series? So fans can download a show directly after it’s performed?

    MG: We have been talking about the desire for it. I don’t know if we would get to the point of where we were providing every one but there has been some talk about making some available sooner. I don’t when or how we will do this, but we will.

    November 1, 2010

    Halloween: Phish Covers Waiting For Columbus – Recap [Jambands]

    Halloween: Phish Covers Little Feat [Jambands]

    Halloween: A History of Phish Halloween [Jambands]

    October 27, 2010

    Mossery: Mossery Participants Describe Their Experience [Jambands]

    Manchester: Review – Phish @ Verizon Wireless Arena [Jambands]

    October 25, 2010

    Reviews: Mike Gordon – Moss [Jambands]

    October 21, 2010

    Augusta: Review – Phish, Augusta, 10/19/2010 [Jambands]

    October 16, 2010

    Charleston: Dr. Jack McConnell Sits In With Phish [Jambands]

    October 15, 2010

    Interviews: Mike Gordon Can’t Stand Still [Jambands]

    “Can’t Stand Still” is a good example of how I’ve applied this new songwriting technique to [an old jam]. That song actually stemmed from this thing we were calling “The Meteor Jam.” [While Trey was in Saratoga Springs, NY in drug treatment from 2007-2008], Fish, Page and I created this mini-album for Trey’s birthday present, actually. It was 43, 43-second loops for his 43rd birthday. It was a jam session that we had carved into loops, and I used those for the basis of “Can’t Stand Still.” Trey could and can still use them if he wants, but he never really had to—it was just a gift. But I decided I would take a couple of those loops and work them into songs and “Can’t Stand Still” was one of them.

    October 13, 2010

    Broomfield: Phish Closes Colorado Run [Jambands]

    October 12, 2010

    Broomfield: More New Songs, Rare Covers From Phish [Jambands]

    October 11, 2010

    Broomfield: New Song & Old Trick Highlight Phish Last Night [Jambands]

    October 10, 2010

    Broomfield: Fourmile Canyon Revival Benefit Review [Jambands]

    The headliners of the show were String Cheese Incident. As the show began, it also ended with guests. Despite the online tension between some Phish fans and String Cheese Incident, it never felt like that the band ever felt any of that. When Trey sat in for “Rocky Mountain Way” and “Outside Inside” with the band, it just felt like another great sit in, an excuse to play more high energy music and hit yet another peak.

    October 8, 2010

    ACL: Phish Tries Out a New Song at Soundcheck [Jambands]

    September 30, 2010

    Lists: The Best and Worst Phish Guests [Jambands]

    6) Phil Lesh – last three songs and encore 9/17/99

    Phil also ran the risk of overstaying but ultimately two things worked in his favor. Everyone was still excited over the Warfield run a few months previous and the show – like Bob Weir’s appearance – was in the Bay Area. In addition to the music he played, Phil gets bonus points for actually jumping on the trampolines during “You Enjoy Myself.”

    September 15, 2010

    Charities: Lunch with Fishman and more  from Mimi Fishman Foundation [Jambands]

    September 14, 2010

    Jones Beach: Review – Phish @ Jones Beach [Jambands]

    September 10, 2010

    Alpine: Review – 08/15 Alpine Valley [Jambands]

    September 7, 2010

    ZZYZX: Review of the Western Run [Jambands]

    September 4, 2010

    Jambands: For Indie Rockers, Jambands No Longer a Shameful Word [ClickTrack]

    On Saturday, Vampire Weekend will headline at Merriweather Post Pavilion. It will be the New York-based indie-rock quartet’s first gig at the Maryland amphitheater, but for the band’s drummer, Chris Tomson, the show will mark an anniversary of sorts.

    “My first Phish show was at Merriweather Post Pavilion,” the 26-year-old explains over the phone, from his home in New York. “That was September 17th of 2000. Karmically, in some weird way, I feel pretty awesome about that.”

    August 30, 2010

    Deer Creek: Review – Noblesville Night 2 [Jambands]

    August 24, 2010

    Jones Beach: Traffic, Rainbows & Jumpers…Oh My [Jambands]

    August 19, 2010

    Noblesville: Phish @ Deer Creek Review – Night One [Jambands]

    August 16, 2010

    Berkeley: Phish @ Greek Theatre, August 6 [Jambands]

    Alpine: Phish Plays Rare ’80s Songs Again [Jambands]

    August 10, 2010

    Telluride: Phish Revives ’80s Cover [Jambands]

    Berkeley: Thoughts on the Final Two Nights [Jambands]

    August 7, 2010

    Fish & Cactus: Fishman & Gordon Join 7 Walkers [Jambands]

    August 6, 2010

    Interviews: Trey Talks About New Phish Material [Jambands]

    Berkeley: A New Languedoc For Trey [Jambands]

    July 8, 2010

    Camden: Review – Phish @ Susquehanna Bank Center [Jambands]

    July 3, 2010

    Charlotte: Phish Bust Out an Original Song After 23 Years [Jambands]

    June 28, 2010

    Merriweather: Phish Nods to Neutral Milk Hotel, Last Year’s Show [Jambands]

    June 25, 2010

    Camden: Phish’s Latest Zeppelin Cover [Jambands]

    June 23, 2010

    Great Woods: Dr Gabel and a Lit O Bit of Phish [Jambands]

    June 19, 2010

    Hartford: Phish’s Tweezer Reprise Reprise [Jambands]

    June 16, 2010

    Portsmouth: Phish Covers Tom Waits [Jambands]

    June 15, 2010

    Hershey: Phish: “Drowned” Again [Jambands]

    June 12, 2010

    Chicago: Phish’s Show of Life [Jambands]

    May 31, 2010

    Exile On Main Street: Exile Revisited by ZZYZX [Jambands]