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

    Previews RSS

    August 14, 2012

    Leg Two: Postcards From Page Side – Statement Time For Phish

    December 26, 2011

    Previews: Phish to Close Out Year at Madison Square Garden [NorthJersey.com]

    December 17, 2011

    Previews: NYE Run Preview – What Can We Expect? [The Phish Experience]

    December 15, 2011

    Previews: Still Waiting – Two Weeks and Counting [Online Phish Tour]

    November 22, 2011

    Previews: Under The Covers Vol. 5 – MSG Preview 2 [OPT]

    November 8, 2011

    Columns: Under The Covers Vol. 4 – MSG Preview [Online Phish Tour]

    September 14, 2011

    Previews: Fairgrounds Ready For Phish Benefit Concert [BFP]

    “I am so proud that Phish will play this benefit tomorrow for Vermont,” Skelton, business manager of Pete’s Greens, wrote Tuesday in an email. “I let out a whoop when I heard the news, though I was not surprised to hear they would finally play here again and that the show would be a benefit. The band members care so deeply about Vermont and Vermonters. …

    Essex: Phish to Hold Concert to Benefit Flood Victims [CNN]

    Previews: What To Expect at Essex [Trouble In Transit]

    September 2, 2011

    Previews: End of the Road [Phish Thoughts]

    August 24, 2011

    Previews: Phish at Dick’s Sporting Goods Park [Reverb]

    1) They’re on the top of their game. Okay, so maybe not the “Rocky Top” (the mid-’90s are often pointed to as such), but the quartet is in a damn fine place. They got off to a shaky reboot in March of ‘09 but, since then, many shows have truly sparkled. My personal favorite was a bust-out-filled fest in August of ‘09 in Hartford, but the group’s last time in Colorado was stellar, too. The first night last October at the 1stBank Center killed, a thrashing “Chalkdust Torture” opening the festivities with a bass-heavy “Stash,” meaty “Ghost” and joyful “Slave to the Traffic Light” peppering the night. Set lists and downloads from this summer’s tour indicate that Phish is continuing to be true to form.

    August 15, 2011

    Previews: Phish at UIC Pavilion [Chicago Tribune]

    Phish: The quartet, decade-long rulers of the jam-band universe created by the Grateful Dead, tour relentlessly, but they always seem to be at their best whenever they play the UIC Pavilion, their multi-night stands inevitably inspiring a level of revelation that they don’t routinely achieve elsewhere, 7:30 p.m. Monday-Wednesday at UIC Pavilion, 525 S. Racine, $58; ticketmaster.com.

    August 6, 2011

    Previews: Phish @ Hollywood Bowl [LA Weekly]

    Previews: Outside Lands Integrates New Elements in 4th Year [San Francisco Chronicle]

    It’s the final days of preparation for the Outside Lands Music and Arts Festival and things are buzzing at the offices of Another Planet Entertainment, the independent Berkeley concert promotion company that produces the huge three-day concert in Golden Gate Park. With Phish, Muse and Arcade Fire topping a bill that boasts more than 70 acts spread across nearly a dozen stages, the organizers expect this year’s event to be the biggest yet.

    August 4, 2011

    Lists: Eight Reasons To Get Excited For Phish Tour [Hidden Track]

    The Return of 2.0 Epics

    Leading up to the first leg, we were perplexed by the lack of 2.0 opuses in the setlists since Hampton. One of the biggest tragedies of Phish breaking up when they did is that we never got to see A Song I Heard The Ocean Sing, Scents and Subtle Sounds and Waves develop. Thankfully, all three tunes were brought back during the first leg and we have high hopes that they will find their way into setlists this month.

    Previews: Jam Band Brings Love to Legion of Fans [Tahoe Daily Tribune]

    Venues: Summer Tour Leg II Venue Preview [Unplugged Musings]

    Previews: Six Questions For Phish – Second Leg Preview in Words, Charts and Graphs [The Barn Presents]

    1. Will new faces and new venues translate to new inspiration?

    This is the first significant run of shows that hasn’t sniffed the Eastern time zone since the return (excepting the three-nighter for Festival 8 in 2009).  Anybody who has seen Phish on both coasts knows that there are tangible differences in the audience dynamic, and while this can certainly alter the perception of the show… how much can it bleed over into the actual performance?

    Previews: A Preview of Phish Summer Tour Leg Two [Live Music Blog]

    8/5-8/6 ~ The Gorge Ampitheatre
    It’s called breath-taking for a reason. Walk over the hill, shed a tear, then let Phish take you on a journey amongst the cosmos. Never has a venue evoked such a strong reception from this author. In 2009 at the Gorge, Phish played arguably the best jams of their return year. There aren’t many replay-value (RV) shows from 2009 but the “Bathtub Gin,” “Sneakin’ Sally,” “Light,” and “Rock and Roll” from 2009 all evoke the “This is what I follow the band for” reaction. It had the same quality of 2003 and earlier gems in ’97 and ’98. I’ll take another stretched out “2001″ second set opener! With the band at peak form, and most likely rehearsing as they did for the Bethel run (some of which contained the best jams of the first leg), I wouldn’t bet against these shows taking on a different feel than your average “opener.” There are very few things one can count on — Death, Taxes and Phish at the Gorge. How about another “Hood” in the dark or maybe a fog machine “Steam” for it’s West Coast debut?

    August 2, 2011

    Previews: What The Second Leg Will Hold [Online Phish Tour]

    August 1, 2011

    Previews: Getting Ready For The Gorge [Phish Thoughts]

    Wide-Open Improvisation—During June and Super Ball, Phish’s improvisational prowess truly defined their music for the first time this era. This summer has carried the feeling of an arrival; a culmination of the last two years. With the band finally able to visit enchanting music planes regularly, what better place to kick off leg two than the Gorge? A venue that is virtually synonymous with patient, open jamming, the Gorge has brought out the best in Phish throughout their career and will provide an engaging backdrop for the beginning of the summer’s final twelve shows. Ever since the band’s inaugural visit to George, Washington, in 1997, they have played exclusively top-notch shows amidst the amphitheatre’s stunning surroundings. And with Phish coming off a fire-filled festival that was littered with innovative jams, one can only expect Phish to continue pushing new musical frontiers.

    June 8, 2011

    Interviews: Jon Fishman Talks Influences [Washington Examiner]

    Phish’s success can be credited to many factors.

    Certainly, world-class musicianship is one. But it’s also important to realize that the free and easy jam band sound comes from a true study of music of all sorts.

    “Everyone goes through phases of snobbery in their lives,” said Jon Fishman, Phish’s drummer and, of course, the namesake of the band. “Early in my life, I had favorites musicians and musicians I didn’t care for. As our careers professed, we are now the older guys on the block … and we inevitably want to [get to know and appreciate] many other musicians.”

    May 27, 2011

    Previews: Summer Is Here – A Personal Account [OPT]

    Previews: Summer Tour Leg One – Preview [Phish Experience]

    Bethel: Sullivan County Sets Stage For Phish Fans [RecordOnline]

    May 26, 2011

    Previews: Phish’s Appeal Puzzling [Poughkeepsie Journal]

    May 24, 2011

    Previews: State of Phish – The Phans [Online Phish Tour]

    May 20, 2011

    Previews: 2011 Summer Tour Leg One Preview [Gone Phishin’]

    May 16, 2011

    Previews: What Might Bethel Bring? [Phish Thoughts]

    May 11, 2011

    Previews: Where Is Phish Heading? [Phish Thoughts]

    So Phish can jam again. I think we call can agree on that, though the frequency of such excursions leaves something to be desired. But further than that, what I’d like to see develop this summer is a newstyle of jamming—a new context in which to take risks. Now that things are back to where they need to be, its high time the band hone in on a style and begin to explore it.

    May 10, 2011

    Previews: Summer Tour – What Lies Ahead [Online Phish Tour]

    May 3, 2011

    Previews: Phinally, Phish Plays This Month [OPT]

    April 26, 2011

    Previews: Phish’s August Gorge Gigs to Prove Who First Bridged Hippie/Hipster Divide [Seattle Weekly]

    April 19, 2011

    Previews: One Crazy Summer [Phish Thoughts]

    March 3, 2011

    Previews: Mike Gordon and Crew to Play The McDonald [OregonMusicNews]

    March 2, 2011

    Previews: Ready For Phish Summer Tour [OPT]

    December 27, 2010

    NYE Run: The Calm Before The Storm [Whatever You Do…]

    November 19, 2010

    Cactus: Interview – Mike Gordon to Perform @ Bluebird [Indiana Daily Student]

    October 21, 2010

    Amherst: Preview – Coming Full Circle With Phish [Berkshire Eagle]

    Amherst: Town Plans For Phish Invasion [Amherst Bulletin]

    Amherst: Mullins Center to Smell Phishy This Weekend [Daily Collegian]

    October 18, 2010

    Previews: Big Phish Favoring Small Ponds [Press Herald]

    October 15, 2010

    Previews: Returning to South Carolina [Online Phish Tour]

    October 12, 2010

    Previews: Jam Giants Reel in a 2-Night Big One [City Paper]

    Every jam band aficionado has a Phish story. Mine began at summer camp with the first thing my cabin counselor said to me: “Have you heard of the band Phish?” By the week’s end, the whole cabin was ecstatically dropping to the ground and shaking á la Animal House‘s basement party when the “laugh and laughing fall apart” refrain of Phish’s “Sparkle” came on.

    October 10, 2010

    Previews: Now Tour Really Starts [OPT]

    October 8, 2010

    Fourmile: Phish, Local Stars Join In Benefit [Longmont Times]

    October 7, 2010

    Previews: Phish – Legends of the Fall [Hidden Track]

    Phish kicks off its Fall Tour on October 10 with three gigs at the 1st Bank Center in Broomfield, Colorado and I have to admit I am not quite sure what to expect on several fronts. And there’s something sort of exciting about that. There also something extra special about Phish in the Fall as they have proven throughout the years, including 2009 when they tore apart the Northeast in late-November after a glorious performance of the Rolling Stones’ Exile on Main Street at Festival 8 in Indio, CA.

    October 6, 2010

    Previews: Fourmile Canyon Revival Benefit [Hidden Track]

    October 4, 2010

    Previews: Fall Tour Forecast [Phish Thoughts]

    September 15, 2010

    Previews: What About Austin? [Phish Thoughts]

    September 14, 2010

    Previews: How Will Fall Tour Compare to Summer Tour? [OPT]

    August 25, 2010

    Previews: Phish to Visit Charleston in October [City Paper]

    Broomfield: Phish Expected to Make Big Splash [Daily Camera]

    August 13, 2010

    Alpine: Jamband Fans Descend on Alpine [WCToday]

    August 9, 2010

    Telluride: It Begins – Welcome to Phish [Telluride Photography]

    August 8, 2010

    Telluride: What Phans Need to Know [Daily Planet]

    August 7, 2010

    Telluride: Phish Up the San Miguel [Denver Daily]

    Telluride: Few, The Proud – Those With Tickets [Daily Planet]

    August 5, 2010

    Previews: Wade’s World – Open Door to Classic Tour [Hidden Track]

    The stage is set. The time is now. After an amazing first leg full of as much surprise as there was predictability, The Phish have left the door wide open for a classic second leg which is the same amount of shows as Summer Tour ‘96. The venues alone tell a story worth listening to and they haven’t played a note yet.

    July 30, 2010

    Previews: Phish Summer Tour 2010 – Leg 2 [Hidden Track]

    If Phish comes out and continues to kill it, playing their standards with extra awesomeness and sprinkling in well-played bust outs and new covers, they will fill arenas this fall/winter and sheds again next summer. If they come out and resort back to their “standard” approach to shows, they could again see a quick and steady dropoff in interest and ticket sales.