<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d9878398\x26blogName\x3dTom+Conrad\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttp://tomconrad.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://tomconrad.blogspot.com/\x26vt\x3d-965072503759742139', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Tom Conrad

I've moved my blog to http://tomconrad.net. Visit me there.

Thursday, March 09, 2006

Pandora Sidebar

Over at Pandora we've just added a new feed mechanism that makes it easy for you to add Pandora to your blog sidebar. For example, I added these two lines to my blog template:

<link rel="stylesheet" type="text/css" href="http://www.pandora.com/styles/feeds/
songs-art-gray.css"/>
<script src="http://www.pandora.com/feeds/people/tconrad/
favorites.js?max=5"><
/script>


This automatically generates the sidebar listing my favorite songs that you see at the right on this page. Similarly, you can add a list of your stations using these two lines:

<link rel="stylesheet" type="text/css" href="http://www.pandora.com/styles/feeds/
stations-buttons-gray.css"/>
<script src="http://www.pandora.com/feeds/people/tconrad/
stations.js?max=5"></script>


To generate something similar for your page, click here and follow the instructions.

Update: We released a new version tonight that should make things work better in a wider variety of settings. In particular we're using CSS that is a bit more explicit about what should be displayed and how. We've also updated the mechanism we use for opening new windows that should fix some problems with popup blockers.

Please note: this blog has moved to http://tomconrad.net, please do not post comments here.
 

At 6:19 AM, Blogger SKI said...

good stuff tom...

however, before i would deploy, i
would want it to open a very small
window, about the size of the button,
with a "pause|play" and "exit"
button on it.

the huge pandora "loading..." window
looks "beta version" at best.

-ski

 
At 8:57 AM, Blogger Andrew Sherman said...

Ha! That was so easy!

Now how can I customize it so it says 'favourite' not 'favorite'? :-)

 
At 1:55 PM, Blogger deb said...

i'm confused. I added a My Stations list, but nothing happens when i click a link to a station... is something suppose to happen. Also, the test won't center correctly. ah well.

 
At 1:58 PM, Blogger Tom Conrad said...

d.m.

I think the problem may well be a popup blocker. Check to make sure that whatever blocker you're using doesn't stop the station from coming up.

Tom

 
At 2:06 PM, Anonymous iReeb said...

It doesn't work for me neither.
And it's not a popup blocker. :O

Neat thing, anyway :)

 
At 2:09 PM, Blogger Tom Conrad said...

Hi iReeb, if you send me a link to the page where you're trying to use it, I'm sure we can get it working. Might take a little CSS hacking.

Tom

 
At 4:16 PM, Blogger snowqueen said...

I cut and pasted it into my blog and it seems to be working fine. I had to allow the popup for the blog as I use Firefox. This is a fab programme! Especially useful for people like me who can't remember artists and song titles! Thanks!

 
At 6:44 AM, Blogger Nelson Rodrigues said...

The images of the albums don't center!

 
At 9:59 AM, Blogger Tom Conrad said...

We've learned the hard way that the CSS we're using needs to "zero out" some styles. Otherwise the element (for example, the album art) runs the risk just inheriting a style from the page. We're making that change tomorrow night (March 13). That should fix the album centering problem.

 
At 12:14 PM, Blogger simons_jamjar said...

A little fiddly, but should look great once uploaded. Thanks Tom!

 
At 1:21 PM, Anonymous Andy said...

When are you going to make an affiliate program? Currently I have my own "favorites" list that I have to alter by hand which links to itunes and makes me money from my music review website. I would rather use pandora's generated lists because it will stay current with what I'm currently listening to and that is simply awesome. But then I don't make money anymore.

Any chance Pandora will have an affiliate program soon?

 
At 6:05 AM, Anonymous iReeb said...

Works great now!

 
At 8:17 AM, Blogger letti said...

oh, i love this!!!! thanks for the codes..

 

Post a Comment

<< Home