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/blog 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: Bugfix from Matthias Schutz regarding time_since. Version 1.5.9: Added function redefiniotion protection if people use the plugin in several places */ 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, $tablecomments, $tableposts; if(!function_exists('blc_clamp')) { function blc_clamp($min, $max, $val) { return max($min,min($max,$val)); } } function get_channel($col, $offset) { return hexdec(substr($col, $offset, 2)); } function channels($col) { $r = get_channel($col, 1); $g = get_channel($col, 3); $b = get_channel($col, 5); return array($r, $g, $b); } $max_time = $range_in_days * 24 * 60 * 60 ; function scale_channel($old, $new, $diff, $max_time) { $range = $old - $new; $c = round($diff/$max_time*($range))+$new; $c = blc_clamp(min($new, $old), max($new, $old), $c); $c_hex = str_pad(dechex($c), 2, '0', STR_PAD_LEFT); return $c_hex; } $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 ($tablecomments LEFT JOIN $tableposts ON (comment_post_ID = ID)) WHERE comment_approved = '1' AND $tableposts.post_status='publish' $ping ORDER BY comment_date DESC;"); $seen = array(); $num = 0; if($fade_old) { list($r_new, $g_new, $b_new) = channels($new_col); list($r_old, $g_old, $b_old) = channels($old_col); } 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 $tablecomments 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 $tablecomments 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($commenters[0]->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_hex = scale_channel($r_old, $r_new, $diff, $max_time); $g_hex = scale_channel($g_old, $g_new, $diff, $max_time); $b_hex = scale_channel($b_old, $b_new, $diff, $max_time); $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"; } } ?> Memorable Moments from Poker at Dave’s at Flopped the Nuts



    Memorable Moments from Poker at Dave’s

    (For the record: The house belongs to Dave and Sarah, and both were present. DJ gets top billing as he was the organizer.)

    To begin with, it was the poker game that almost wasn’t: I had said I’d be in if JT and EZ were in and that DJ should call me if any arm twisting was warranted. Then Dave talked to Erik, and EZ told him we were definitely doing it because he’d gotten a hall pass from the wife. I happened to be within earshot of Erik’s side of the convo, so I figured we were good to go. When I got to the house, I was the first one to pull up. Happily Wil came strolling out of the alleyway at the end of the block as I was gathering myself in the car. We popped up to the front door, beers in hand only to be greeted by Sarah with a “What are you guys doing here?”

    Yeah, we’re not so good at last minute communication, I guess. JT had sent an email that I’d missed saying he was out, so Dave figured I’d be out. DJ called Erik saying that there’d probably be no cards, and asked him to call Wil. EZ missed that call so Wil never got called, and nobody even thought to call me at all. Oh, and then Jeff came walzing in (he also lives in the same ‘hood as Wil and DJ+Sarah) — there was no thought to call him off the game either! We ended up with six players at the table, primed for good times…


    Game Highlights: (Details are fuzzy at best… We tend to consume more than a couple adult beverages at poker night… Also, the chronology of this list is completely out of whack…)

    • On the first hand, I got dealt a wired pair of nines. Another nine fell with the flop, and the night was officially started with a demonstration of Rule Nine. Excellent.
    • Fairly early in the game, I was big blind with a stunning 57 off-suit. After the flop it was down to Jeff and myself and I had four straight. I put out a small bet and Jeff called. The turn didn’t help me, but nothing happened to chase me away. The river filled my straight and I actually end up taking a nice chunk of Jeff’s stack.
    • Much later, after he’d made a nice little comeback, I caught Jeff in a semi-bluff as he went all in after an ace dropped on 4th street with a pocket pair of queens. Unfortunately for him, I held AQ, and my aces held up.
    • Jeff’s night finished on a comical note when, as Jeff was walking out the door, the battery on Erik’s new cell phone beeped because he was trying to discharge it. Eriks exclaimed aloud “FINALLY!” just as Jeff shut the door and then realized how that might have seemed to Jeff. Hilarity ensued as we teased him without mercy.
    • At one point, I was dealing and Dave got chased out of a hand. As he folded with disgust he told me to check out the cards: AK. I put the cards in the muck and told him “Those hardly ever work out for me.” After the had the entire table had a bit of a discussion about the troubles often brought by Big Slick.
      • On the next hand I was dealt AK suited. The flop had neither and ace nor a king — all I had was four flush. I raised and Wil called me. The turn was nothing, but I doubled my previous bet, and Wil called. The river also missed me, but Wil checked to me for the second time in a row. I stacked up a quadruple-sized bet and played with the chips for a while with Wil watching me intently. I was already committed to throwing the bet in, so nothing Wil said or did influenced me (At least not consciously — I’m not that sly.). Luckily, when I put it in, it was enough to chase Wil out. I showed my useless AK to Dave and the rest. Wil had a pair of jacks and would have won the hand.
    • While that hand may have been a blow to Wil’s ego, he definitely got the last laugh when DJ went all in holding trip jacks and a queen kicker. Wil’s hand? Trip jacks with a KING kicker! Ouch! Needless to say, it was a TV poker moment.
    • Final standings ($10 buy-in): Wil - $38, Jake - $25, Erik - $7


    No Responses to “Memorable Moments from Poker at Dave’s”  

    1. No Comments

    Leave a Reply