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

    SPAC RSS

    August 6, 2012

    Phish: 07/08/2012 You Enjoy Myself [VQ: A+, AQ: A+, Pro-Shot]

    July 24, 2012

    Official Video: Phish 07/06/2012 Sneakin’ Sally Jam > Ghost

    July 8, 2012

    Summer Tour 2012: Phish Tour Finale @ SPAC – Recap, Setlist and The Skinny

    July 7, 2012

    Summer Tour 2012: Phish SPAC Saratoga Springs Night Two – Recap, Setlist and The Skinny

    July 6, 2012

    Summer Tour 2012: Phish SPAC Saratoga Springs Recap, Setlist and The Skinny

    June 29, 2012

    SPAC: Jam_ON will simulcast July 7th Phish show + From The Archives

    June 27, 2012

    Venues: What You Need To Know About SPAC [PhanArt]

    August 7, 2011

    We Are Everywhere: Runaway Jim Wins at Saratoga [Phish.net]

    July 12, 2010

    Reviews: Phish at SPAC – June 19 & 20 [I Do Stuff…]

    July 6, 2010

    Phish: 06/20/2010 AC/DC Bag [VQ: B-, AQ: B+]

    YouTube Preview Image

    July 4, 2010

    Phish: Saratoga Jam > Swept Away > Steep [VQ: A+, AQ: A+, Official]

    July 1, 2010

    Phish: 06/19/2010 Show of Life [VQ: A+, AQ: A+, Official]

    June 23, 2010

    SPAC: Photos – Phish @ SPAC [Glide Magazine]

    Phish: 06/20/2010 Playlist Nearly Complete Show [VQ: C, AQ: B-]

    http://www.youtube.com/view_play_list?p=CCB55337FC42348D

    June 22, 2010

    SPAC: Photos & Review From Night One @ SPAC [Hidden Track]

    Speaking from my experience, the lot scene wasn’t anything out of the norm. I don’t know if all the “crackdown” hype was a scare tactic, but entering the Spa State Park lots (which are separate from the SPAC “main” lots), there was no searching of vehicles, no alcohol detecting lasers that I saw. I arrived at around 6 p.m. and traffic was moving well and once parked, you weren’t bothered.

    Phish: 06/20/2010 Brother [VQ: B, AQ: B]

    YouTube Preview Image

    Drug Arrests: Phish Shows Mellower Than in Past [Times Union]

    Phish: 06/20/2010 Gotta Jibboo [VQ: A-, AQ: B+]

    YouTube Preview Image

    Phish: 06/19/2010 DAUD Saratoga Springs, NY

    SPAC: Night One, Step Into the Tweeprise [Coventry]

    I spotted a guy with a FUNKY BITCH sign. The Joker had mentioned that Phish had turned into a request band, so it’s in everyone’s best interest to bring witty signs to shows in hopes of hearing your favorite (obscure) song.

    97 – Year of the Funk.
    98 – Year of the Cover.
    04 – Oxy Years.
    10 – Year of the Request.

    June 21, 2010

    SPAC: Phish Proves Less Is More at SPAC [Saratogian]

    Arrests: Booze Crackdown Nets Few at Phish [Times Union]

    SPAC2: Don’t Believe The Hype [Live Music Blog]

    SPAC2: Standard Fare [Phish Thoughts]

    June 20, 2010

    Follow @YEMblog For Live Reports From SPAC

    SPAC: Show With A Circus [TimesUnion]

    SPAC: Reviews – Phish at SPAC [Times-Union]

    Do not underestimate the endurance of the Phish fan.

    To hear Trey Anastasio tear through his fretboard on stage, here is some of what it takes: traffic jams that can stretch to hours, aggressive cooler searches by park police, steep parking fees and a sweaty dreadlocked throng in front of you at the bathroom. That is before you get to your seat and deal with the flying elbows of gyrating phans, many of whom, it is safe to say, would not make it to the final round of “Dancing with the Stars.”

    SPAC: Phish @ SPAC, Night One – Setlist and Recap [Hidden Track]

    Phish: 06/19/2010 LivePhish SBD Saratoga Springs, NY

    SPAC: Saturday Night SPAC Attack [Phish Thoughts]

    In a show book-ended with two more “Tweezer Reprises,” the band dropped a very Phishy affair in upstate New York last night to opening SPAC’s two-night stand. With a first set of early classics and a diverse second half composed of multiple segments, each carrying distinctly different vibes, Phish patched together an impressive evening of music. Suffering from a tad bit of choppiness, the second stanza did manage to maintain a flow from beginning to end, filled with this summer’s locked and loaded jamming, the band’s most promising debut this year, and one of the more exploratory jams of the summer.

    June 17, 2010

    SPAC: What You Need to Know About SPAC [PhanArt]

    The cops will be looking for drugs more than booze with the older crowd. They see you drinking, dip in a stick detector for alcohol, and then they can search you. Arcane? Yes. Illegal? Possibly. Outlandish and Insane? Yup.

    Hotels have been given a contact number to call if they suspect drug use. So be careful when you are pre-gaming at the hotel or getting back and trying to enjoy the post-show scene or get some sleep.

    SPAC: Poster Show Coincides With Phish Concert [Post-Star]

    June 16, 2010

    SPAC: Police to Harsh Phish Fans’ Mellow [Times-Union]

    SPAC: Police, SPAC Officials Crack Down on Drugs & Alcohol [Saratogian]

    Police say they’ll continue strict enforcement of alcohol and drug laws at this weekend’s Phish concerts at Saratoga Performing Arts Center.

    Police made about two dozen arrests and cited 145 persons for underage drinking, 18 for unlawful possession of marijuana, seven for disorderly conduct and six for possessing or consuming alcohol without a permit, at a pair of Dave Matthews Band concerts on June 4 and 5.

    May 28, 2010

    Contests: Win a Pair of Saturday SPAC Pavilions [100 Miles]

    This is the second year in a row that I’m riding 100 miles to raise money for MS research, and the second year that I’m giving away Phish tix to help!

    I have a pair of inside seats, section 5, row J for the Phish show at SPAC on 6.19 and I’m giving them away to someone who makes a donation to support my ride.

    September 3, 2009

    Phish: 08/16/2009 Cars Trucks Buses > Chalk Dust [VQ: B+, AQ: B+]

    YouTube Preview Image

    August 31, 2009

    SPAC: Ending With Joy [Phish Thoughts]

    August 28, 2009

    Phish: 08/16/2009 I Kissed A Girl [VQ: B+, AQ: A]

    YouTube Preview Image

    August 24, 2009

    Phish: 08/16/2009 Anything But Me [VQ: B+, AQ: A]

    YouTube Preview Image

    August 23, 2009

    Phish: 08/16/2009 Highway To Hell [VQ: A, AQ: A]

    YouTube Preview Image

    Phish: 08/16/2009 Cavern [VQ: A, AQ: A]

    YouTube Preview Image

    Phish: 08/16/2009 20 Years Later [VQ: A, AQ: A]

    YouTube Preview Image

    August 20, 2009

    Drug Arrests: Phish Concert Arrests Detailed [Times Union]

    Phish: 08/16/2009 The Moma Dance [VQ: A-, AQ: A]

    YouTube Preview Image

    August 19, 2009

    Phish: 08/16/2009 Llama [VQ: A-, AQ: A]

    YouTube Preview Image

    Drug Arrests: Police Arrests 22 at Phish Show [Post Star]

    Phish: 08/16/2009 Run Like An Antelope [VQ: B+, AQ: B-]

    YouTube Preview Image

    August 18, 2009

    Phish: 08/16/2009 DAUD Telefunken Saratoga Springs, NY

    Phish: 08/16/2009 I Been Around, Highway to Hell [VQ: A, AQ: A]

    YouTube Preview Image

    Photos: Phish @ SPAC by Mike Wren [State of Mind]

    Reviews: Phish / SPAC / 08.16 [JamBase]

    Reviews: Phish @ SPAC – The Golden Ticket [Coventry]

    Reviews: The Only Rule Is It Begins [Phish Thoughts]

    Phish: 08/16/2009 Harpua > I Kissed A Girl > HYHU > Harpua [VQ: B+, AQ: A]

    YouTube Preview Image YouTube Preview Image

    Drug Arrests: Three Officers Injured over Phish Concert Weekend [The Saratogian]

    The LSD episode occurred Saturday afternoon, the day before the concert, as an investigator and about six other police officers were attempting to arrest Todd Buchas, 30, of Snowberry Road, Ballston Spa, outside of the Saratoga Springs Public Library.

    Buchas was taken into custody after leading police in a short foot pursuit, during which he attempted to discard several items. Police said he was in possession of a small eyedropper container holding liquid LSD, some of which got onto the investigator, whom police would not identify. The investigator spent several hours at Saratoga Hospital Saturday recovering from the effects of the LSD.

    Phish: 08/16/2009 //Jam, Harpua > I Kissed A Girl > HYHU > Harpua [VQ: C+, AQ: C+]

    YouTube Preview Image YouTube Preview Image YouTube Preview Image YouTube Preview Image

    August 17, 2009

    Phish: 08/16/2009 I Kissed A Girl [VQ: B+, AQ: B+]

    YouTube Preview Image

    [VQ: B, AQ: B-]

    YouTube Preview Image

    Features: No Limit To Lure of Phish [Times Union]

    Steven Kwartin is still not bored with Phish. And the 52-year-old tax attorney from Hollywood, Fla., was just one head in a sea of at least 25,000 fans of the jam band who descended upon Saratoga Performing Arts Center for the final show of the newly reunited group’s sold-out summer show. Kwartin analyzes performances of the song “Tweezer” like some guys do a touchdown pass or a shortstop error.

    “It is my musical mental illness,” he said. “My parents don’t understand. My kids don’t understand. I am the missing link.”

    SPAC: Jam Began on The Roads [Times Union]

    Phish: 08/16/2009 LivePhish SBD Saratoga Springs, NY