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"; } } ?> YEMblog » 2009 http://yemblog.com Visit YEMblog.com for a daily look at Phish-related information from around the web. Offering news, audio torrents, videos, auctions, photos and much more. Thu, 17 Oct 2013 22:34:49 +0000 en-US hourly 1 http://wordpress.org/?v=4.1.19 One Week Only: Watch 85 Minutes Worth of Pro-Shot Footage From Bonnaroo ’09 [Hidden Track] http://yemblog.com/one-week-only-watch-85-minutes-worth-of-pro-shot-footage-from-bonnaroo-09-hidden-track/ http://yemblog.com/one-week-only-watch-85-minutes-worth-of-pro-shot-footage-from-bonnaroo-09-hidden-track/#comments Wed, 16 May 2012 18:21:13 +0000 http://yemblog.com/?p=22065 One Week Only: Watch 85 Minutes Worth of Pro-Shot Footage From Bonnaroo ’09 [Hidden Track]

    ]]>
    http://yemblog.com/one-week-only-watch-85-minutes-worth-of-pro-shot-footage-from-bonnaroo-09-hidden-track/feed/ 0
    Phish: 06/09/2009 Nearly Entire Show [VQ: A, AQ: A, Multi-CAM] http://yemblog.com/phish-06092009-nearly-entire-show-vq-a-aq-a-multi-cam/ http://yemblog.com/phish-06092009-nearly-entire-show-vq-a-aq-a-multi-cam/#comments Sat, 24 Mar 2012 20:05:25 +0000 http://yemblog.com/?p=21934 Phish: 06/09/2009 Nearly Entire Show [VQ: A, AQ: A, Multi-CAM]

    Set 1 –

    Click here to view the embedded video.

    Set 2 –

    Click here to view the embedded video.

    Set 1 : //Kill Devil Falls, The Moma Dance, Sample In A Jar, Stash, Dog Faced Boy, Gumbo, Tube, Lengthwise, The Divided Sky, When The Cactus Is In Bloom #, Bold As Love
    01:16:55

    Set 2 : Backwards Down The Number Line, Ghost, Fast Enough For You, Halley’s Comet, Maze, Alaska #, Theme From The Bottom, Golgi Apparatus $, Possum $, //Loving Cup
    01:30:54

    Notes:
    // No footage till 00:03:58, filled with graphics
    Mistake on screen says SBD, this is FOB Schoeps source listed above
    # 1st Time Played
    $ God Damn w00ks
    // No footage, filled with graphics

    ]]>
    http://yemblog.com/phish-06092009-nearly-entire-show-vq-a-aq-a-multi-cam/feed/ 0
    Phish: 03/07/2009 Mike’s Song / Weekapaug Groove [VQ: A-, AQ: A, CK5] http://yemblog.com/phish-03072009-mikes-song-weekapaug-groove-vq-a-aq-a-ck5/ http://yemblog.com/phish-03072009-mikes-song-weekapaug-groove-vq-a-aq-a-ck5/#comments Thu, 08 Mar 2012 14:32:31 +0000 http://yemblog.com/?p=21741 Phish: 03/07/2009 Mike’s Song / Weekapaug Groove [VQ: A-, AQ: A, CK5]

    Click here to view the embedded video.

    Click here to view the embedded video.

    ]]>
    http://yemblog.com/phish-03072009-mikes-song-weekapaug-groove-vq-a-aq-a-ck5/feed/ 0
    Phish: 08/01/2009 ENTIRE SHOW [VQ: A, AQ: A+, TH 2-CAM] http://yemblog.com/phish-08012009-entire-show-vq-a-aq-a-th-2-cam/ http://yemblog.com/phish-08012009-entire-show-vq-a-aq-a-th-2-cam/#comments Sun, 11 Dec 2011 17:54:16 +0000 http://yemblog.com/?p=20748 Phish: 08/01/2009 ENTIRE SHOW [VQ: A, AQ: A+, TH 2-CAM]
    Set 1: AC/DC Bag, The Curtain With, Mound, Gotta Jibboo, Guyute, Punch You In The Eye, Tube, Alaska, Run Like An Antelope
    Set 2: Rock and Roll– Down With Disease– Free, Esther, Dirt, Harry Hood
    Encore: Sleeping Monkey, First Tube

    Click here to view the embedded video.

    ]]>
    http://yemblog.com/phish-08012009-entire-show-vq-a-aq-a-th-2-cam/feed/ 1
    Phish: 07/31/2009 Entire Show [VQ: A, AQ: A+, 4-CAM] http://yemblog.com/phish-07312009-entire-show-vq-a-aq-a-4-cam/ http://yemblog.com/phish-07312009-entire-show-vq-a-aq-a-4-cam/#comments Fri, 09 Dec 2011 21:08:50 +0000 http://yemblog.com/?p=20696 Phish: 07/31/2009 Entire Show [VQ: A, AQ: A+, 4-CAM]

    Click here to view the embedded video.

    Click here to view the embedded video.

    Set 1:  Runaway Jim, Chalk Dust, Bathtub, Time Turns Elastic, Lawn Boy, Water In The Sky, Stealing Time, Split

    Set 2: Drowned > Crosseyed > Joy, Tweezer > BDTNL, Fluffhead > Piper > ADITL

    Encore: Suzy > Reprise

    ]]>
    http://yemblog.com/phish-07312009-entire-show-vq-a-aq-a-4-cam/feed/ 0
    Trey Anastasio: Trey w/ New York Philharmonic 09/12/2009 You Enjoy Myself [VQ: A-, AQ: A-] http://yemblog.com/trey-anastasio-trey-w-new-york-philharmonic-09122009-you-enjoy-myself-vq-a-aq-a/ http://yemblog.com/trey-anastasio-trey-w-new-york-philharmonic-09122009-you-enjoy-myself-vq-a-aq-a/#comments Thu, 03 Nov 2011 23:06:39 +0000 http://yemblog.com/?p=20301 Trey Anastasio: Trey w/ New York Philharmonic 09/12/2009 You Enjoy Myself [VQ: A-, AQ: A-]

    Click here to view the embedded video.

    ]]>
    http://yemblog.com/trey-anastasio-trey-w-new-york-philharmonic-09122009-you-enjoy-myself-vq-a-aq-a/feed/ 1
    Phish: 12/02/2009 Chalkdust Torture [VQ: A, AQ: A+, Angle: On-Stage] http://yemblog.com/phish-12022009-chalkdust-torture-vq-a-aq-a-angle-on-stage/ http://yemblog.com/phish-12022009-chalkdust-torture-vq-a-aq-a-angle-on-stage/#comments Wed, 02 Nov 2011 14:16:28 +0000 http://yemblog.com/?p=20282 Phish: 12/02/2009 Chalkdust Torture [VQ: A, AQ: A+, Angle: On-Stage]

    Click here to view the embedded video.

    ]]>
    http://yemblog.com/phish-12022009-chalkdust-torture-vq-a-aq-a-angle-on-stage/feed/ 0
    Phish: 11/01/2009 Secret Smile [VQ: A, AQ: A+, Multi-CAM] http://yemblog.com/phish-11012009-secret-smile-vq-a-aq-a-multi-cam/ http://yemblog.com/phish-11012009-secret-smile-vq-a-aq-a-multi-cam/#comments Thu, 29 Sep 2011 17:22:32 +0000 http://yemblog.com/?p=19843 Phish: 11/01/2009 Secret Smile [VQ: A, AQ: A+, Multi-CAM]

    Click here to view the embedded video.

    ]]>
    http://yemblog.com/phish-11012009-secret-smile-vq-a-aq-a-multi-cam/feed/ 0
    Phish: 06/02/2009 Possum [VQ: B+, AQ: A] http://yemblog.com/phish-06022009-possum-vq-b-aq-a/ http://yemblog.com/phish-06022009-possum-vq-b-aq-a/#comments Thu, 29 Sep 2011 16:52:39 +0000 http://yemblog.com/?p=19822 Phish: 06/02/2009 Possum [VQ: B+, AQ: A]

    Click here to view the embedded video.

    ]]>
    http://yemblog.com/phish-06022009-possum-vq-b-aq-a/feed/ 0
    Phish: 03/08/2009 Down With Disease [VQ: A, AQ: A+, Remastered] http://yemblog.com/phish-03082009-down-with-disease-vq-a-aq-a-remastered/ http://yemblog.com/phish-03082009-down-with-disease-vq-a-aq-a-remastered/#comments Tue, 08 Mar 2011 18:25:33 +0000 http://yemblog.com/?p=16188 Phish: 03/08/2009 Down With Disease [VQ: A, AQ: A+, Remastered]

    Click here to view the embedded video.

    ]]>
    http://yemblog.com/phish-03082009-down-with-disease-vq-a-aq-a-remastered/feed/ 0
    Phish: w/ Bruce Springsteen 06/14/2009 Mustang Sally [VQ: B-, AQ: B+] http://yemblog.com/phish-w-bruce-springsteen-06142009-mustang-sally-vq-b-aq-b-3/ http://yemblog.com/phish-w-bruce-springsteen-06142009-mustang-sally-vq-b-aq-b-3/#comments Tue, 08 Feb 2011 16:15:22 +0000 http://yemblog.com/?p=15595 Phish: w/ Bruce Springsteen 06/14/2009 Mustang Sally [VQ: B-, AQ: B+]

    Click here to view the embedded video.

    ]]>
    http://yemblog.com/phish-w-bruce-springsteen-06142009-mustang-sally-vq-b-aq-b-3/feed/ 0
    Cactus: Mike Gordon 10/03/2009 DAUD Buffalo, NY http://yemblog.com/cactus-mike-gordon-10032009-daud-buffalo-ny/ http://yemblog.com/cactus-mike-gordon-10032009-daud-buffalo-ny/#comments Mon, 13 Dec 2010 01:57:26 +0000 http://yemblog.com/?p=14829 Cactus: Mike Gordon 10/03/2009 DAUD Buffalo, NY

    ]]>
    http://yemblog.com/cactus-mike-gordon-10032009-daud-buffalo-ny/feed/ 0
    Cactus: Mike Gordon Band 09/22/2009 DAUD Nashville, TN http://yemblog.com/cactus-mike-gordon-band-09222009-daud-nashville-tn/ http://yemblog.com/cactus-mike-gordon-band-09222009-daud-nashville-tn/#comments Tue, 16 Nov 2010 16:14:51 +0000 http://yemblog.com/?p=14392 Cactus: Mike Gordon Band 09/22/2009 DAUD Nashville, TN

    ]]>
    http://yemblog.com/cactus-mike-gordon-band-09222009-daud-nashville-tn/feed/ 0
    Phish: 06/09/2009 Ghost [VQ: A, AQ: A, Angle: CK5] http://yemblog.com/phish-06092009-ghost-vq-a-aq-a-angle-ck5/ http://yemblog.com/phish-06092009-ghost-vq-a-aq-a-angle-ck5/#comments Tue, 07 Sep 2010 14:59:47 +0000 http://yemblog.com/?p=12878 Phish: 06/09/2009 Ghost [VQ: A, AQ: A, Angle: CK5]

    Click here to view the embedded video.

    ]]>
    http://yemblog.com/phish-06092009-ghost-vq-a-aq-a-angle-ck5/feed/ 0
    Phish: 06/09/2009 When The Cactus Is In Bloom [VQ: A, AQ: A, Angle: CK5] http://yemblog.com/phish-06092009-when-the-cactus-is-in-bloom-vq-a-aq-a-angle-ck5/ http://yemblog.com/phish-06092009-when-the-cactus-is-in-bloom-vq-a-aq-a-angle-ck5/#comments Sun, 05 Sep 2010 02:32:14 +0000 http://yemblog.com/?p=12869 Phish: 06/09/2009 When The Cactus Is In Bloom [VQ: A, AQ: A, Angle: CK5]

    Click here to view the embedded video.

    ]]>
    http://yemblog.com/phish-06092009-when-the-cactus-is-in-bloom-vq-a-aq-a-angle-ck5/feed/ 0
    Phish: 08/07/2009 DAUD New Source George, WA http://yemblog.com/phish-08072009-daud-new-source-george-wa/ http://yemblog.com/phish-08072009-daud-new-source-george-wa/#comments Sun, 05 Sep 2010 02:17:33 +0000 http://yemblog.com/?p=12860 Phish: 08/07/2009 DAUD New Source George, WA

    ]]>
    http://yemblog.com/phish-08072009-daud-new-source-george-wa/feed/ 0
    Phish: 06/09/2009 Bold As Love [VQ: A, AQ: A, Angle: CK5] http://yemblog.com/phish-06092009-bold-as-love-vq-a-aq-a-angle-ck5/ http://yemblog.com/phish-06092009-bold-as-love-vq-a-aq-a-angle-ck5/#comments Sun, 05 Sep 2010 02:14:38 +0000 http://yemblog.com/?p=12855 Phish: 06/09/2009 Bold As Love [VQ: A, AQ: A, Angle: CK5]

    Click here to view the embedded video.

    ]]>
    http://yemblog.com/phish-06092009-bold-as-love-vq-a-aq-a-angle-ck5/feed/ 0
    Phish: 08/05/2009 DAUD Mountain View, CA http://yemblog.com/phish-08052009-daud-mountain-view-ca/ http://yemblog.com/phish-08052009-daud-mountain-view-ca/#comments Sun, 05 Sep 2010 02:13:12 +0000 http://yemblog.com/?p=12854 Phish: 08/05/2009 DAUD Mountain View, CA

    ]]>
    http://yemblog.com/phish-08052009-daud-mountain-view-ca/feed/ 0
    Phish: 06/09/2009 Tube [VQ: A, AQ: A-, Multi-CAM] http://yemblog.com/phish-06092009-tube-vq-a-aq-a-multi-cam/ http://yemblog.com/phish-06092009-tube-vq-a-aq-a-multi-cam/#comments Thu, 02 Sep 2010 21:11:03 +0000 http://yemblog.com/?p=12821 Phish: 06/09/2009 Tube [VQ: A, AQ: A-, Multi-CAM]

    Click here to view the embedded video.

    ]]>
    http://yemblog.com/phish-06092009-tube-vq-a-aq-a-multi-cam/feed/ 0
    Phish: 06/09/2009 Sample In A Jar [VQ: A, AQ: A-, Multi-CAM] http://yemblog.com/phish-06092009-sample-in-a-jar-vq-a-aq-a-multi-cam/ http://yemblog.com/phish-06092009-sample-in-a-jar-vq-a-aq-a-multi-cam/#comments Wed, 01 Sep 2010 16:15:59 +0000 http://yemblog.com/?p=12812 Phish: 06/09/2009 Sample In A Jar [VQ: A, AQ: A-, Multi-CAM]

    Click here to view the embedded video.

    ]]>
    http://yemblog.com/phish-06092009-sample-in-a-jar-vq-a-aq-a-multi-cam/feed/ 0