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

    Jambase RSS

    January 6, 2012

    NYE Run Recap: Phish | Madison Square Garden [JamBase]

    September 7, 2011

    Denver: Night One Review and Photos [JamBase]

    June 28, 2011

    Watkins Glen: HeadCount and Phish Team Up For SBIX Contest [JamBase]

    June 23, 2011

    Charlotte: Phish / Charlotte / Review [JamBase]

    June 21, 2011

    Alpharetta: Review and Photos – Phish Alpharetta 2011 [JamBase]

    March 10, 2011

    Photos: Trey Anastasio – Chicago – 02/27 [JamBase]

    February 23, 2011

    Radio: Phish and Zero on Dead to the World Today [JamBase]

    January 10, 2011

    MSG Run: Phish MSG Run Review and Photos [JamBase]

    November 9, 2010

    Cactus: Mike Gordon / Free Show / Haight-Ashbury [JamBase]

    November 1, 2010

    Manchester: Dave Vann’s Phish Photos [JamBase]

    September 2, 2010

    Webcasts: Trey Anastasio Band Free Re-Broadcast [JamBase]

    August 11, 2010

    Telluride: Phish / 08.09 / Telluride Photos [JamBase]

    August 9, 2010

    Compilations: Phish Featured on Jerry Jams Tribute Album [JamBase]

    12. Phish – Terrapin Station (8/9/1998 – Virginia Beach Amphitheatre, Virginia Beach, VA) *

    * previously unreleased, exclusive to Jerry Jams

    August 6, 2010

    Berkeley: 08/05/2010 @ the Greek – Photos [JamBase]

    June 22, 2010

    Photos: 6/15/2010 > 6/20/2010 by Dave Vann [JamBase]

    Follow @YEMblog & Keep Tabs on Phishtwit.com & JamBase/Phish For Reports From Great Woods

    June 15, 2010

    Follow the action from tonight’s show @YEMblog & via PhishTwit & Jambase/Phish

    June 13, 2010

    For Reports From Tonight’s Show: @YEMblog, PhishTwit and JamBase/Phish

    May 10, 2010

    Page McConnell: Super Bad Sunday – Page Videos [JamBase]

    April 14, 2010

    Contests: JamBase Hosts Special 4/29 Midnight Screenings of Phish 3D [JamBase]

    JamBase is proud to be giving away tickets to an exclusive midnight screening of Phish 3D on Thursday April 29. You can enter the contest for several different cities at: www.jambase.com/phish3dmovie.

    February 22, 2010

    Reviews and Photos: 02/19 – Trey Anastasio – Chicago [JamBase]

    Summer 2001: Phish was on hiatus. Trey Anastasio was on the road with his solo band, and everyone agreed that he seemed revitalized and giddy onstage. There must have been something about the freedom/ego trip of playing with a band that carried his name that got the juices flowing for Trey, and it boded well for the return of fresh Phish. Here we are almost nine years later, during a mere half-year break from the day job, and that giddiness is back. Talk to anybody walking out of a Winter 2010 Classic TAB show and you’re going to hear the word “energy.” And probably something like “off the charts.”

    February 18, 2010

    Photos: Trey Anastasio @ Terminal 5 – 02/16/2010 [JamBase]

    January 10, 2010

    Miami: Phish in Miami 12/28 – 12/31 [JamBase]

    If someone had told me the song of the night, and maybe the run, would be the mid second set “Get Back on the Train,” I would have laughed, and laughed hard. But, hot damn, that’s exactly what Phish dropped on us, an exploratory, type-II jam that left behind all semblance of the normal choo-choo-honky-tonk-steam-locomotive theme that the song normally embodies. My mind raced to compare it to something, but this was “one of a kind,” a la the “Fee” from Virginia Beach in the summer of ’99.

    December 6, 2009

    MSG: Phish / 12/04/2009 Review [JamBase]

    December 5, 2009

    MSG: Phish / 12/03/2009 Review [JamBase]

    The Talking Heads’ “Cities” was another extremely welcome treat and again saw the band deliver on some very relaxed funk before an absolutely slamming “Free.” I’ve said it before and I’ll say it again, “Free” is the quintessential Phish song – lyrically, stylistically and spiritually. Gordon owned this tune, like always. “Halley’s Comet” followed and the slight flub didn’t even matter as the Garden was bouncing to the line, “I’m going down to the central part of town.” MSG is not only the central part of town, but might be the central vortex of the world’s greatest city.

    December 4, 2009

    Check out Phish Tweets and Twitpics from Fall Tour at JamBase

    Phish: Review – MSG – 12/02/09 [JamBase]

    December 3, 2009

    Check out Phish Tweets and Twitpics from Fall Tour at JamBase

    December 1, 2009

    Check out Phish Tweets and Twitpics from Fall Tour at JamBase

    November 30, 2009

    Check out Phish Tweets and Twitpics from Fall Tour at JamBase

    November 26, 2009

    Check out Phish Tweets and Twitpics from Fall Tour at JamBase

    November 24, 2009

    Check out Phish Tweets and Twitpics from Fall Tour at JamBase

    Cincinnati: 11/20&21/2009 Reviews and Photos [JamBase]

    The most consistently thrilling trend in modern Phishdom is the band’s ability to reach what amounts to a set-capping peak, then come right back with an even stronger blast. Still riding high on the “Elastic” vibe, the band built an engaging “Gotta Jibboo,” a steady swell of intensity as Trey gradually cranked his noodle to 11. The jam hit its natural peak, but Trey was not finished; he rallied the troops for a further few bars of ebullience before the warm-n-fuzzy coda. Then, to push the set from good to great, “Fluffhead” for dessert.

    November 23, 2009

    Check out Phish Tweets and Twitpics from Fall Tour at JamBase

    November 22, 2009

    Check out Phish Tweets and Twitpics from Fall Tour at JamBase

    November 20, 2009

    Check out Phish Tweets and Twitpics from Fall Tour at JamBase

    November 19, 2009

    Photos: Fall Tour Setlists and Photos – Detroit [JamBase]

    Check out Phish Tweets and Twitpics from Fall Tour at JamBase

    November 3, 2009

    Festival 8: 11/01/2009 Review and Photos [JamBase]

    October 31, 2009

    Festival 8: Night One Review and Photos [JamBase]

    “Punch You in the Eye” opened up the second set, with the line “where palm trees dipped and seagulls swerved,” drawing a huge response as lighting director Chris Kuroda splashed color upon the trees behind the stage. “Down With Disease” was on fire, bringing some of the most intense jamming of the night with Trey busting out celebratory licks on his Languedoc guitar. Morphing into “Prince Caspian” out of “DWD,” things again slowed a bit, but featured a McConnell led, Wild West-esque, bobble outro before a slamming “Wolfman’s Brother,” which was funky and stripped down featuring a concise Trey and Page led duel. Although a short version of “Wolfman’s,” it was still one of the night’s strongest numbers.

    Festival 8: 10/30/2009 Photos [JamBase]

    September 16, 2009

    Reviews: Mike Gordon / 09.08 / Brooklyn [JamBase]

    September 8, 2009

    Joy: Review – Phish: Joy [JamBase]

    August 28, 2009

    Joy Box: Party Time Tracklist and Festival 8 Design Contest [JamBase]

    August 21, 2009

    Joy: Backwards Down The Number Line on iTunes [JamBase]

    August 18, 2009

    Reviews: Phish / SPAC / 08.16 [JamBase]

    August 16, 2009

    Reviews: Phish / 08.14 / Hartford [JamBase]

    Reviews: Phish / 08.15 / Merriweather Post [JamBase]

    The passage was navigated gracefully as Fishman kick-started “Harry Hood” with a dark and foreboding underbelly. Gordo and Trey broke off some ridiculous stutter-step dynamics during the intro, dipping into rugged dub-step breaks between the reggae upstroke. The band took several chances during “Hood” as well, and though the ride was a little bumpier than the progressive mind-fuck that preceded, it still delivered an endorphin release at its apex. Clearly having earned it, Mr. Keyboard Player Page McConnell commandeered the sometimes wavering ship to close the second set, and lovingly steered it to shore with a serene “Oh! Sweet Nuthin’.” The recently revisited Velvet Underground gem was a warm and comforting muse to conclude a decidedly bipolar second set.

    August 12, 2009

    Reviews: Phish – 08/11 – Chicago [JamBase]

    August 9, 2009

    Photos: Phish @ The Gorge – Night Two [JamBase]

    Reviews: Phish – The Gorge Night Two [JamBase]

    Reviews: The Gorge – Night One [JamBase]

    Videos: Saturday Eye Candy – Phish Covers [JamBase]

    August 7, 2009

    Reviews: Phish @ Shoreline – Kayceman/Dennis Cook [JamBase]

    “Time Turns Elastic” – Time turns boring. Like many of their new ones, there’s a really strong jam at the end, but the set-up is too formulaic, almost like they are covering themselves in a way. Put it back in the oven, I bet it bakes into something nice, but it’s not ready yet.

    August 4, 2009

    Reviews: Phish @ Red Rocks – Night One [JamBase]

    Reviews: Phish @ Red Rocks – Night Two [JamBase]

    Reviews: Phish @ Red Rocks – Night Three [JamBase]

    Reviews: Phish @ Red Rocks – Night Four [JamBase]

    June 26, 2009

    Venues: Georgia Theatre – Rising From The Ashes [JamBase]

    There’s Tipitina’s in New Orleans, the Exit/In in Nashville and the Georgia Theatre in Athens, GA. Not necessarily the biggest and shiniest venues in town, but hallowed buildings loved by all who’ve been inside and cultural centers where music fans convene on a nightly basis to enjoy live music in a welcoming environment amongst friends and neighbors. These are the places where everyone from the bartender to the intern working the ticket booth could talk your ears off for hours about the bands coming to town. These are not just the places you go to see your favorite band but the kind of place you go just because it’s the thing to do.

    June 22, 2009

    Reviews:Phish / 6.20.09 / Alpine Valley [JamBase]