Plugin Name: Brian's Latest Comments
Plugin URI: http://meidell.dk/archives/category/wordpress/latest-comments/
Description: This shows an overview of the recently active articles and the last people to comment on them. Original idea and code fixes contributed by 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")
function clamp($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.
$ping = "";
$ping = "AND comment_type<>'pingback' AND comment_type<>'trackback'";
$posts = $wpdb->get_results("SELECT
FROM ($wpdb->comments LEFT JOIN $wpdb->posts ON (comment_post_ID = ID))
WHERE comment_approved = '1'
ORDER BY comment_date DESC;");
$seen = array();
$num = 0;
$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.
$seen[$post->comment_post_ID] = true;
if($num++ > $num_posts)
$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."'
ORDER BY comment_date DESC
$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);
$title = " title=\"Last comment was ".time_since($comment->unixdate)." ago\"";
$title = "";
echo $prefix."".stripslashes($post->post_title). "".$count." \n";
foreach($commenters as $commenter)
$title = " title=\"Posted ".time_since($commenter->unixdate)." ago\"";
$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 ", ";
if($count > $num_comments)
echo " [...]";
Editor’s Choice | YEMblog
It was really funny. So Trey called my dad and my dad couldn’t do it. And he was like, ‘This might sound really funny but I have this daughter who lives in New York and she sings too and she might be a good fit.’ And I can’t believe it, because they actually took him seriously. They actually followed up on it. First, Trey’s manager called and asked me to send over some music and a bio. And then I remember, freshman year in my dorm room getting a call from Trey – no big deal (laughing).
In a scene that would make Will Ferrell proud, the Burlington Free Press reports that roughly 1,600 cowbell-playing revelers lined Church Street in Burlington to form what Ben & Jerry’s claims is the World’s Largest Cowbell Ensemble. The ice cream makers put the event together to celebrate the 15th anniversary of Phish Food and to raise funds for Vermont Flood Recovery through the WaterWheel Foundation. Those assembled rang their cowbells along with four tunes performed by a band fronted by Phish drummer Jon Fishman, one of which was Blue Oyster Cult’s (Don’t Fear) The Reaper, natch.
With this summer’s Phish dates just announced, the excitement in the fan community has skyrocketed, as everyone has begun to plot and scheme their own summer plans. On the heels of a triumphant year of game-changing music for this era, 2012 is filled with anticipation to see what is next for the band. Will they delve deeper into abstract jamming—a hallmark of 2011—or will they veer off that road? All that remains to be seen, but the one thing we know for sure is where the shows of the first leg will take place. Aside from Bader Field, this tour is comprised of venues that hold a significant amount of Phish lore. But let’s forget about the band for a moment, and take a look at the places where the magic will happen. Below are some tips from personal experience that might enhance your enjoyment at each stop along the way.
Tonight, Phish front man Trey Anastasio continues his first-ever symphonic tour at Heinz Hall in Pittsburgh, where he’ll be backed by the Pittsburgh Symphony Orchestra. PSO staff has been trying to prepare Phish fans by providing an email filled with information about what they can expect at the venue in hopes the crowd won’t be as raucous as those who hooted and hollered at last Thursday’s tour opener. The DJs for Pittsburgh radio station WDVE’s morning show had fun with the email and interpreted it for “hippies.”
With its latest stunt in what has become an annual tradition, Phish played Madison Square Garden in New York City for a sold-out four-day run that included New Year’s Eve. The final show featured a few visual and rigging tricks dreamed up by Tony Award-winning scenic designer David Gallo, working alongside the band members, with lighting by longtime Phish collaborating LD Chris Kuroda
Hello and Happy New Year! Type II is back this week with a fresh episode and it should be no surprise that we are reviewing the MSG New Year’s Eve run. After just a few days to gather our thoughts, Scotty and I sat down with guests Charlie Dirksen and Dave Calarco for almost two hours last night. With lots to talk about, we debate the best and the worst of what has become some of the most anticipated shows each year. Of course, we offer up some of the tastiest clips to supplement our discussion. And whether you are a “jaded vet” or just saw your first shows, we are sure you will enjoy this blast from the hose.
I’ll do anything with my dad. He might even be my best friend.
One thing I haven’t done with him in a long time is fishing. He loves the sport and is very good at it. In fact, he went fishing today. It’s the first of January.
What I love is Phish. You see where I’m headed. When my dad offered to join me at the Dec. 30 Phish show at Madison Square Garden in New York, I didn’t know what to think. Did he really want to go? Did he just want to tag along so I wouldn’t be driving home from New Haven at 3 a.m. by myself? Whatever the reason, it was a touching gesture that I took him up on.
“I wrote a letter to the band at this time (around 1990) but never sent it. They were the world’s highest-grossing touring act, and I was a college kid thinking nothing would come of it,” Blumenthal said in an email. “So I rewrote the letter for an up-and-coming band, Phish. I proposed to Phish that we make a digital experience based on their music. I got a letter back from Trey Anastasio saying, ‘Sounds great, let’s talk more about it,’” he said.
Gordon and friends saved the best for first, exploding with a monster first set that featured, in its 90-plus minutes, a chunk of nearly an hour with no pause in the proceedings. Songs flowed together with great ease, segues varying from the quick and deftly executed to slow builds that almost miraculously twisted from point A to point B. Afterwards, the second set felt like a prolonged warm-up; there was plenty of thrashing rock & roll energy, but it seemed the fireworks had already exploded. (Along the way, Alanis Morissette’s “Hand in My Pocket” was recast as a Southern rock tune that could have been a Black Crowes outtake.)
Continuing a trend started last New Year’s Run, Phish is once again teaming up with Nugs.net to offer Pay-Per-View broadcasts of all four NYE Run shows set to take place at Madison Square Garden on December 28-31. If you look at the LivePhish page for the MSG shows, you’ll see a link for a $55 four-day pass marked as “Live Video.”
Set between the abstract psychedelia that stretched from 1994-1996 and the cosmic rock that formed between 1998 and 2000, this phase marked the largest upending in Phish’s career since they graduated from playing Grateful Dead and Wilson Pickett tunes in the 80s. The inspiration for this transition came while performing the entirety of Talking Heads’ Remain in Light on Halloween ’96, gradually taking hold over the following year, and finally coming to fruition during the fall of ’97.
That leads me to my next question – what advice would you give to up and coming bands?
Put on a great live show and make each performance interesting. Gain an audience by becoming a great live act and then those fans will buy your studio efforts. You don’t need to be a jam band to change your setlist every night. And don’t undervalue Spotify. Ask your fans to add your music to their shared playlists. I’ve discovered plenty of acts that way in 2011.
“There’s so much about this that you wouldn’t believe,” Gordon said. “It’s great because the two parts of my career inspire each other: Phish is going great; it’s inspiring and musically it’s incredibly fun, and there are a lot of perks. But I don’t get to write most of the material. I do get to contribute songs, but there’s only so much space to develop them.”
Set 1: Kill Devil Falls, Cavern, Foam, Guelah Papyrus, Chalk Dust Torture, Whole Lotta Love, Chalk Dust Torture, Ha Ha Ha, Walk Away, Wolfman’s Brother, Undermind , Bathtub Gin, The Squirming Coil
Set 2: Tube, Possum, Tweezer, Heartbreaker, Tweezer, Ramble On, Thank You, Tweezer, Stairway To Heaven, Halley’s Comet, Also Sprach Zarathustra, David Bowie, Show of Life, Backwards Down the Numberline, Good Times Bad Times
Phish: 10/29/2010 Entire Show Atlantic City, NJ [VQ: A, AQ: A+]
Set 1: The Star Spangled Banner, My Soul, AC/DC Bag, Ocelot, Sample In a Jar, Light Up Or Leave Me Alone, Sugar Shack, Timber (Jerry), Bouncing Around the Room, Axilla, Rift, The Moma Dance, Cities, 46 Days
Set 2: Punch You In The Eye, Sand, Carini, Prince Caspian, Corinna, Piper, Theme From the Bottom, Golgi Apparatus, Slave To The Traffic Light, Fluffhead
Since winding up his fall tour, the Phish guitarist has been making a daily commute from his New York City home to Bridgeport, Connecticut’s Tarquin Studios, recording with his band and members of the National and Mates of State for the last month. Peter Katis, who owns the suburban studio and has produced a string of indie rock albums there.
What’s particularly of interest from this new report is than in addition to using members of the current version of TAB, Big Red has enlisted members of the National and Mates of State to add the new sessions. Well Trey wanted to do something “totally out of left-field for him,” and from the sounds of things he’s accomplished that. No word on when we can expect to hear the fruits of this Katis/Anastasio collaboration. For more on Peter Katis, be sure to check out our Tracks of the Trade feature on the producer.
This week on the podcast join Scott, Eric and myself as we review the highly anticipated release of Phish’s Hampton Winston/Salem ’97 7-CD Box Set. Everyone and their brother has probably already listened to this. A few times. Every blogger has already written a review. Polls are up. Debates are occurring. But as any seasoned listener of the program should expect, we bring you a little bit of “all of the above”, with some choice clips thrown into the mix. What were the cast’s favorite moments? Never any spoilers here, hit play or go download in
After an ear-bending series of artistic advances for three years previous, 1996 had proven an anticlimactic period of retrenchment. The next year was a thrilling advance, with two small-venue European tours injecting a fresh sense of spontaneous musical intimacy to the band’s interplay, paired with the psychedelic free-rock chops it had been honing since the early ‘90s. And by now Phish’s nascent interest in rhythm-based jamming had matured into a headlong infatuation with funk-rock. Guitarist and primary songwriter Trey Anastasio later described the style, aptly, as “cow funk” — the result of four white guys from Vermont getting heavily into James Brown records, while experimenting with slower tempos and meditative, deep grooves. (Alas, it inspired a seemingly unending parade of flaccid-funk groups that mistook dynamic stasis for the pocket.)
Brian Bavosa: Your band played two shows in November, how did it go?
Mike Gordon: It was a whirlwind of activity getting ready and hitting the road for our first weekend in six months. There was a certain smoothness of intention which felt great in the first set – like instead of the music playing itself, our souls played themselves, or at least mine did. That may sound strange but that’s how it felt. There was a relaxedness and a tightness despite it being fresh, and it was also great to have a few new songs, including an epic cover and a new original, Sideways. That one in particular felt smooooth – it’s almost reggaeish, and yet dimented enough such that I don’t know what it is… A simple, haunting little ditty about the world on its side. Or something… Very cool to rehearse something and try so many subtle variations of groove and approach – tight vs. loose, repeating vs. improvised – and then remembering that it’s only on stage that the final element walks in the door – the magic.
Being manipulated is unpleasant, to say the least. It’s terrible to find that someone you thought you could trust has actually been working you over. Far more insidious, though, is that rare master of illusion who is so skilled in the art of deceit that you begin to doubt your own perceptions. To be used is infuriating, but to have your mind used against you is truly maddening. That madness is expertly depicted by Mike in “What Things Seem.”
5125: The number of days we lived without pristine soundboards of the classic Hampton/Winston-Salem ’97 run since the shows were played.
0: The number of days we’ll live without them from here on out.
That’s right, the wait is finally over: three of the greatest shows in Phish history have now been officially released. And while we’re mostly thinking about how meaningless we now realize life to have been up until this point, we can’t help but let one other thought run through our heads: which of these three juggernauts is the best?
In the middle of Phish’s summer tour in 1999, I sat in a camping chair in the morning on the lot of Camp Oswego, which was a two-day Phish music festival. It was early, but I was already soaked from sweat because the oppressive heat and humidity that defined that weekend. I took another pill to alleviate the pain from the multiple injuries I’d sustained. I wondered what the hell I was doing there. I should have been at home in bed if not the hospital. For the first time in my dedicated Phish fan-dom, I doubted my commitment and effort to traveling to see this band. I mean, I love Phish, but this was ridiculous.
If you were at Trey’s Webster Hall shows in 2006, you heard a string quintet conducted by Don Hart back the guitarist for my favorite of the songs he wrote during the breakup – Goodbye Head. Those Webster Hall takes of the tune rank as the best in this writer’s opinion and showed the potential for a full orchestra version.