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 " [...]";
Interviews | YEMblog - Page 2
HT: Before a tour like this starts, do you set aside songs that will be every-nighters (Sand, Valentine, Cayman Review, etc.) and flag some songs as more rarities (The Way I Feel, Ether Sunday, Words To Wanda, etc.), or is that something that just develops organically on tour when writing setlists? Do you write setlists for this band?
TA: Organically is always the best bet. Despite some valiant attempts, setlists were a dead end last tour, again. I often try…I think i’m going to write one and then I hand Tony a list and he just laughs at me. Same thing with [TAB/Phish LD] Chris [Kuroda]. Some nights I’ll write some kind of list backstage, with Phish or with TAB, and Richard [Glasgow], our tour manager, will copy it and hand it to Chris right before we go onstage. The other guys on the light board tell me that just as he kills the lights, Chris always rips it up and throws it on the ground, because we never end up playing any of it. Over the last few years, I’ve finally come to realize that it’s utterly impossible to know what to open with or what we’ll play until we’re standing onstage. You just can’t tell what the vibe in the room is until you are standing out there. Why even bother trying? It never works.
How did you get involved with the band and when did they first approach you about working with them on the NYE gag?
About a month ago I got a call from a choreographer friend of mine who I’d met two years ago at the Stratford Shakespeare Festival. I hadn’t heard from her in about a year and a half and randomly I get an e-mail asking if I wanted to work with her on a gig, but I wasn’t allowed to know what it was until I signed a confidentiality agreement because they wanted to keep everything hush-hush. I really wanted to work with her so I said yes to whatever it was. And then the producers called me and had me go to their office and signed all of these confidentiality waivers. Then I flipped to the next page where it said “Phish New Years Eve Madison Square Garden,” which I was trying to get a ticket for anyway. So it was pretty crazy.
“We didn’t know [Phish] was going to cover our album,” said Payne, the keyboardist for Little Feat and one of the founding members of the band back in 1969. “They just played it and we found out the next day when our manager came up and told me. I thought it was a tremendous tip of the hat. It was kind of a handshake to our band because I tell people the influence is what is important about what we do as musicians and artists.”
“There are all kinds of balancing acts in being a bandleader,” Gordon articulates. “I definitely wanted a ‘real band’ sense, not just a bunch of sidemen. For me, it’s a deeper experience. Sometimes, I see some musician play with a bunch of backup people who aren’t supposed to express themselves, and I don’t like those concerts much. In my case, the question becomes, ‘How many songs should other people sing, or other people write besides me, or maybe we write together?’ There really are all these balancing acts, but I’m feeling really good about it. The biggest challenge for any bandleader is to bring out the talents of the people they are leading, and I think that’s definitely happening.”
“Ultimately, what Phish fans care about is Phish and only some of them will come out for these shows. But there is stuff I can do that I could never achieve with Phish. I love the creative aspect of it. It’s liberating because I get to sing a lot, write a lot of songs. I love sharing too, but Phish is ultimately playing Trey’s [Anastasio] material and I don’t mind doing that either because I’ve had some amazingly deep experiences on Phish tour. It’s great to be able to wear both hats.” – Mike Gordon
SM: Are there any plans to incorporate Mike Gordon shows into the Phish Live download series? So fans can download a show directly after it’s performed?
MG: We have been talking about the desire for it. I don’t know if we would get to the point of where we were providing every one but there has been some talk about making some available sooner. I don’t when or how we will do this, but we will.
“I knew it would be difficult this time. Usually it takes at least a week for me to get to feeling human again after a tour,” he says. “It doesn’t even have to be a grueling tour. … You just get revved up from playing and staying up late and traveling and the intensity that the music requires. But on top of that, I had my album come out and all these side projects having to do with the album — creative projects, videos, bonus tracks — and then, Phish had a Halloween album, which was a double album, so that took a lot of practice, and getting ready for this tour at the same time. And, having family time, like my daughter just turned 2 years old.”
The characteristically tight-lipped band is keeping mum about their final selection for this year’s big event, but bassist Mike Gordon (pictured) does have some words to say about it. “This has the potential to be the best one yet,” Gordon tells Spinner. “I’m really excited about it, to the point where I’m calling some of my friends and I’m saying, ‘Well, I don’t even have any more room on my guest list, but you’ve got to come somehow, because this is going to be the one.’ It just really feels right to me.”
Although Anastasio held fast against revealing which album gets the nod for Halloween 2010, he did offer a clue that might get fans chattering.
“This year,” he said, “this one’s for me. The one we picked, I’m going to get more out of this as a musician than I ever have before. Three songs into it, I called everybody and told them, ‘None of the other ones — I wouldn’t think, hopefully — will have nearly the effect on my playing this one’s going to.’ ”
How about getting the guys from phish involved, how did that go?
I spoke to our management company, who also manages Phish, to see if they guys in Phish might be willing to donate some signed items for an auction to raise even more money. Well, that conversation happened in the early afternoon, and by that night, Trey had said he would love to contribute in a bigger way: By actually showing up and playing.
It’s been 28 years since the members of the Tombstone Blues Band graced the Fairbanks High School Gymnasium with their ambitious covers and crackling 15-year old voices. Most folks probably associate the Tombstone Blues Band with that funny picture of Mike Gordon and his band mates – Kerry Keefe (vocals, bass, harmonica), Dan McBride (lead/rhythm guitar, vocals) and Bruce Diehl (drums) – but they were a pretty progressive band for a bunch high school kids, tackling Johnny B. Goode, Johnny Winter’s version of Bony Moronie, Riders on the Storm and Won’t Get Fooled Again.
You know, we pulled into Merriweather Post Pavilion and we suddenly remembered that there was a song called Walfredo that has a line in it about Merriweather Post Pavilion because we had played with Santana at Merriweather Post Pavilion in like 1991. We’re like “oh, we should learn it.” We get the recording and we learn it backstage and off we go. And that’s a lot of fun, so maybe we do it again.
MD: What did you learn from playing Exile On Main St.?
Jon: When Keith Richards says the blues guys were their heroes and everything they ever did was lifted from Chuck Berry and stuff, when you learn Exile On Main St., you really feel how true that is. They have managed not to over-intellectualize anything. They didn’t choke the life out of the music by doing anything fancy production-wise. The instruments sound good, they’re playing the shit out of the songs. No one’s going to accuse Mick Jagger of being overly technical, although he’s very aware of his technique. From everything I’ve heard, he’s a very cerebral guy, but he’s able to let go of all that and just play.
TA: I remember we played one show right before the last Hampton show [Providence Civic Center, 12-13-99]. We all came off stage and we had just played this horrible, non-grooving version of “Gotta Jibboo” and everyone was steaming around the band room, like gritting their teeth (laughs). Everybody wanted to say something, but we were all just kind of storming around, honoring the no-analyzing rule. Finally, there was just an outburst and everybody started yelling at the same time, “What the fuck,” you know? (laughs).
Last October, I interviewed Phish singer-guitarist Trey Anastasio about the Rolling Stones’ 1972 double album Exile on Main Street. His band was about to attempt something even the Stones had never done: On Halloween, the second night of Phish’s long-weekend party Festival 8 in Indio, California, they performed all four sides of Exile in sequence. I spoke to Anastasio at length for an essay I wrote in the free Playbill the group published for fans at the show. The mushrooming hoopla over the May 18th reissue of Exile — with previously unreleased recordings from the sessions — seemed like a good reason to retrieve some outtakes from our conversation, in which the guitarist went deep on his lifelong love for the album — and the surprises he found there as he learned to play the whole thing.
The four members of Phish — Trey Anastasio on guitar, Mike Gordon on bass, Jon Fishman on drums, and Page McConnell on keyboards — add unique ingredients to the musical stew. Anastasio is the bandleader, though all members can and do sing and front songs in concert. Their connection onstage borders on ESP, with a Möbius-strip quality that weaves and bobs amongst intricate melodies and time changes. Though Gordon and Fishman both do admirable jobs of holding down the foundation of the music, it’s McConnell who most often compliments Anastasio’s melodic work.
“But my solo career is extremely important to me in many ways, maybe even more important than Phish in certain ways because it’s a different kind of expression for me.”
Gordon’s musical life seems to be in order. One of the reasons Phish broke up was that it was consuming the band member’s lives. But five years away from the constant demands of nomadic touring have taught Gordon a few things.
“Now what I’m trying to do is time manage so there’s not too much of each thing, maybe more baby time and a little less Phish and less distractions and more just working on the stuff I want to be doing,” he said.
PR: How does playing solo differ from playing with a group?
MG: I am playing with the group. It’s a five-piece band. Playing solo with that group is different than playing with Phish. We have 27 years of experience together. With my own band, I don’t have as many years of chemistry, but that’s what makes it exciting. It’s something new to be discovered. There are different songwriters in the band. Unlike Phish, I get to sing most of the songs. There hasn’t been too many times I played completely solo. I have a lot of admiration for people that can do that. I would like to try more. The thing about playing in a group is it’s like getting the telepathy going. A solo artist doesn’t get that.
As for Phish, Gordon says it’s likely that the jam-band kings will head out for a tour this summer. “It’s looking like that kind of thing is in the talks,” he says. “We knew we wanted to wait until summer to do something. Nothing’s set in stone yet but I think it’s a promising thing.”
Q: What is it like playing to audiences that weren’t even born when Phish started?
A: It’s pretty cool, in the sense that I’m still alive and still doing it enough to get older and have younger fans. It can be funny sometimes when we’re playing a song that we heard a lot growing up and people assume it’s an original song because they’ve never heard it before. It’s nice that the demographic isn’t so narrow that there is only one type of person that comes to the shows.
“People are surprised sometimes,” Gordon, in a recent phone interview from his Burlington, Vt., home, says of his solo shows. “First of all, I’m singing all the songs, but I’m also talking between songs, which I never do at a Phish concert, and I’m jumping up and down a lot. … Fans definitely (see) a whole different side of Mike.
“One thing I like about Phish is that it’s the opposite of that. There’s someone else that’s the bandleader, the singer, the songwriter, the soloist, and because of that I get to get into this Zen state and play the bass lines and just concentrate on the bass. I get to really get wrapped up in that, and in my solo career I’m really trying to flex those other parts of my personality.”
And as for his other band’s upcoming plans? “It hasn’t been planned, but if I had to guess, I would say that we’ll probably do some stuff in the summer,” Gordon says. “Eventually, I think the idea is not just to keep playing old songs but really for Phish to reinvent ourselves just like we’re trying to reinvent the other aspects of our careers and find the uncharted territory. There’s been talk about trying to find ways to record differently than we have before and write differently, so that’s what excites me – the different possibilities.”
“No marriage could survive the amount of time these guys have spent together,” said Puterbaugh, laughing. “It was clear to me after getting to know them that their very deep bond of friendship is the key to the whole thing. They just like being around each other. Trey has often said that his favorite time with Phish is rehearsing with the other three guys, the joking, story swapping, brainstorming, just the four of them. They have a great chemistry.”
When visitors approach, the loops are triggered. It’s pretty trippy. But no more so than a Phish concert – or Minkin’s art.
“I often describe my mom as my biggest influence, partly because she’s always been into stretching limits,” Gordon said. “A typical day growing up would be coming across Mom using rollers to spread 10-gallon buckets of acrylic paints across giant canvases.
“About 20 years ago, we first thought about how cool it would be combine her visuals with my music,” he continued. “Since I was very little I liked the idea of combining the visual with the auditory.”
Relix: When do you remember hearing Pavement for the first time?
Trey Anastasio: We were playing in Portland, Oregon, I think it was the spring of 1994. I was wandering around town and came across this cool little record store and went in to look around. I asked the woman behind the counter if she had anything new that she liked, and she handed me Crooked Rain, Crooked Rain.
Trey talks fondly about watching the Broad Street Bullies teams as a 12-year-old kid and being there to see Reggie Leach score his 50th goal. “Despite all the concerts and all of the events, that I’ve played and that I’ve seen, I think that the Stanley Cup Flyers team owns that room. To me, it’s their room. Regardless of what was going on in there, that group of guys built that place. That period in time, the Broad Street Bullies, I was a young kid, I played hockey, I remember the parade. They were my all time heroes,” Anastasio said.
Q: Will you be debuting some new material on the tour?
TA: Yes, we’ll be bringing a lot of new material to the table. This band is sort of a breeding ground for Phish material. Songs like “Bug,” “Heavy Things,” “Backwards Down the Number Line,” “Sand,” “First Tube,” “Gotta Jibboo” — all these songs started out in the TAB band and then sort of made their way to Phish. For instance, last year we did “Alaska” with TAB and it ended up being performed with Phish. So it’s a process that seems to work.
AVC: You’ve done a lot of collaborations over the years in disparate styles of music, which seems like it could be hard, especially with a band like Phish.
SJ: It really wasn’t. Phish is such a good band; they just make stuff up as a jam band. The songs they did I had never heard of—I never followed the music. When I got in there with Sandra Williams—we’ve known each other since the early ‘90s, when we did our wedding band, and she also sings on my studio work—she came to me and said “Phish wants you.” The thing about them is they just want me to be myself. I had never heard these songs; we just did two rehearsals. She was my crutch. I just looked at her when to come in. I ad-libbed; I’m great at that. It was so much fun.
“We all love to go down there after Christmas — it’s warm, beautiful, and it’s just a nice place to play New Year’s,” says Trey Anastasio, principal songwriter, frontman and guitarist, on the phone from snowy Manhattan. “And it’s a particularly good venue for us — we just like the room.”
Were Phish or Dave Matthews reluctant for you to shorten their songs?
No, no, no. This is the confidence that I have. I can allow an artist to be musicians and I let them play and they let me produce. But I have to earn that right and I earn that right by explaining to them and by my actions.
You only earn any right by your actions. I wouldn’t produce anyone if they just thought, “Oh, we’ll have Steve Lillywhite because of what he’s done.” I would think they would want to say, “Steve, how would you be able to help us out?” I want to be able to sell myself.
Like many artists you did not start out this way. At Goddard College in Vermont, you began on a more structured path.
Yeah, I did a little bit of computer programming, but then I was always doing the Phish merch. Something started to click when I started doing the posters and stuff like that. It’s actually a combination of things. I have a son, and it was very helpful to do a job that I could work at night, and then take care of my son during the day. I parlayed that into full-time activity. My wife became a writer, too. She writes children’s books, and books for teachers. We decided to go it on our own at one point when my son was around 4, and we started our business.
What was it like to reunite with Trey, to write again, and did that begin when you sent what would become the lyrics to “Backwards Down the Number Line” to him on his birthday, September 30, 2007?
It really did. That was it, really. I was estranged from him because the program he was in didn’t allow for a whole lot of communication. For many reasons, his family and others were sort of shielding information about him, even from those who thought they were pretty close to him.
I know Trey said something at one point to the effect of, “I thought our scene was transparent. I thought our fans knew everything that was going on.” But I don’t think they necessarily did. For heaven’s sake as much as I was talking with them, I had no clue. When I interviewed Jon about Undermind, I remember he told me, “This is just beginning to reach its potential and we’re going to be around for many years to come…”
“It’s just a very nice vibe,” says bassist Mike Gordon. “And the music has been feeling really good as a result. I had no idea whether removing the party element would make it sterile or something — but the opposite happened, where it feels like we have extra consciousness left over to jam harder. It feels like a great era — it’s the beginning of the rest, like we’re in it for the long haul again.”
JW: Being so intimately involved in the musical process, how would you characterize the band’s current improvisation style compared to other eras? There is certainly a direct correlation to what you’re doing.
CK: I think the only way to answer that question is that it’s just so fantastic that we’re back. They’re playing so well. They’re making some mistakes like everybody is, but who cares? This is bonus. You know what I mean? I heard some people complaining the other day about the show in St. Louis and I just thought to myself, ‘Hey, c’mon. At least they’re here. Gimme a break.’ Complaining. Last year or two or three years ago, this was finished. Over. Done. So, here we are again. It’s just so special. I think the band’s feeling it. They just seem happier than I’ve ever seen. Everyone’s just so happy. It’s unbelievable. I just think it’s great. I think they have their stellar nights and they have their normal nights, just like any human beings. They’re trying their best every night. It’s just great that they’re up there trying. I love it.
DB- Somewhat along these lines, in the content of rehearsing songs with your band can you think of any songs that really surprised you once you revisited them and were inside them?
MG- I had a list of 56 possible songs I wanted to bring to the band. I weeded it down but I still probably brought too many when we were practicing a couple weeks ago. That’s probably when the process of surprise was happening because I practiced them a lot before I got to the band practice room to be able to know what they would feel like.
Are we going to get a 45-minute “You Enjoy Myself” or what?
No, but you are gonna get a “YEM,” and that’s what we’ve been working on for the past few months. It’ll be 13 minutes or something. My dream is to take this on the road, like Phish.
This is not as far-fetched as it sounds. Anastasio, 44, did not set out to be a rock star. He entered the University of Vermont as a composition student, eventually leaving its Über-traditional music department for the mentorship of a composer in the area, Ernie Stires. “I walked in and he said, ‘Write a two-part invention; here’s the theme, come back tomorrow,’ ” Anastasio recalls. “And when I came back he said, ‘This sounds terrible. Want to know why?’ That was his philosophy: Start writing today; if you’ve got an ear, you’ll know if it sucks.” This was in 1984, when Anastasio and four college friends were forming Phish. “I always dreamed of writing in an orchestral context,” he says. “But when you finish a piece, you want to hear it. So we played everything with Phish.”