Business Card: bowen@dwelle.org
Smoothbeats.com
KALX Berkeley    WSUM radio

WFMU radio

Let’s geek out a little. Liz was asking about social networking aggregators (she was, I swear), and I bet there are a bunch, but FriendFeed is the big one right now. As soon as I checked it out and set up my feed, I noticed that while there are a few of the online music services listed, there wasn’t a way to publish what I was listening to on my iTunes. However, since I already have Brandon Fuller’s awexxxome Now Playing iTunes Plugin installed, and that publishes to my own blog, I figured there had to be a way to hook Now Playing to FriendFeed. Sure enough, there is a “Ping” function built in to Now Playing that sends an HTTP POST to a given URL with the the now playing info. A quick download of the FriendFeed php API, and now a few lines of php bridge the gap and publish what’s playing on my PC to FriendFeed. Incredibly, it turns out that the FriendFeed API uses the same fieldnames that arrive in the Now Playing POST. That never happens. require_once("~/lib/friendfeed-api/php/friendfeed.php"); define( 'FF_NICKNAME', 'XXXXXXXXX' ); define( 'FF_REMOTE_KEY', 'XXXXXXXXXXXX' ); if ($_POST['title']) { $friendfeed = new FriendFeed( FF_NICKNAME, FF_REMOTE_KEY ); $entry = $friendfeed->publish_link( 'Now Playing: '.$_POST['title'], $_POST['link'] ); }

Ruby on Rails looks neat. I’ve been playing with it the past couple of days. The latest version has built-in AJAX (async JScript) integration. One thing I haven’t been able to find is documentation for built-in functions like link_to and link_to_remote.

I integrated the Fade Anything Technique with Robby’s AJAX random number generator to make the updated number fade in. The only trick was finding the right callback hook in link_to_remote. I found the answer by googling link_to_remote and finding the :complete method that I used below:

< %= link_to_remote "Generate Random Number",
:update => “myrandom”,
:complete => “Fat.fade_element(’myrandom’)”,
:url => { :action => “myrandom” } %>

Are link_to and link_to_remote documented anywhere?

Firefox rocks. ExtensionsMirror is helpful. Here’s something that appears to be missing:

I usually keep my cookie prefs on “until they expire”, meaning that I accept cookies without prompting. However, I’d like to be able to have Firefox prompt me to accept cookies if the site is in a list that I define. I’ve checked out Cookie Button and the other cooke extensions, but I don’t see that anyone has dealt with this yet. C’mon all you XPI hackers! Btw, I’d prefer a context menu item vs. a button (I hate buttons).

Jan 24

Picasa 2 sure is neat. The interface is so slick, and it seems to do just about everything the right way. With one big exception — I want to be able to integrate Picasa with WordPress, as I did with iMatch. I want my captions, etc to be preserved, and I want to be able to create a blog entry for each photo, so I can reference them in other posts.

If I ever have time, I’ll have to have a look at the XML output from Picasa; some others are thinking the same thing. The thing about this XML is that I’d have to write some code on the PC to parse the XML, upload the images, and create entries in the WordPress database. Granted, that’s what I did with iMatch, but if one was to do that, it would be nice to have access to Picasa’s database, instead of having to word off of a static export file.

For some reason I couldn’t find a good WordPress post bookmarklet, so here’s mine. was already set up to accept post_title and content; I added support for feeding the referring url into the trackback url field. This requires a small change in bookmarklet.php and edit-form.php.

Even though WP Comment Auth seems to work, I still end up having to “moderate” WordPress comment spam. The Three Strikes plugin works like SpamAssassin to automatically reject comments that score above a certain threshold. I applied couple of hacks noted by others to send notification when a comment is blocked, and also to display the comment before it’s rejected, in case it is in fact legit. Here’s my version of the plugin.

A while back I thought about adding image thumbnails to the WordPress edit screen to make it easier to browse image asset posts… It turns out that this is just one line of code at the end of the post loop in edit.php: \n"; }

I got a little carried away with programming today… I’ve been working on improving the functionality of the AdMonsters site, part of which involves finding a decent mailing list manager that can be integrated with other basic site functionality. After looking at mailman, majordomo, Sympa, EzMLM, and a bunch of others on SourceForge, the conclusion is that they all basically suck. My web host uses mailman, but it can’t be customized or integrated, nor can subscribers or email be stored in a database. There is some discussion of that in mailman v3, but that doesn’t exist yet. Same for all the others, more or less. They’re also all more complicated than necessary.

After all that, I stumbled on Siesta, which looks a lot simpler, more modern, and can be run in a hosted environment. It has a ton of perl module dependencies, so it took a little while to get going… but it works. I was able to add database storage of archived messages by building a little wrapper for Email::Store — now published as my very own module on CPAN. It should appear here as Email::LocalDelivery::Store before long.

All of that took until about 3pm. At which time my new Thinkpad X40 showed up ;-) IBM blew it, they changed the shipping dates on me too often, so I cancelled that order and called MP Superstore. They have no customer service to speak of, but they do have low prices — and, more importantly, they actually have the thing in stock. It’s amazing that IBM themselves can’t ship for 3 weeks and some grey-market reseller can get it here in 2 days.

I haven’t done much with it yet, but the thing is pretty amazing. Very thin and light. Only issue so far is the Bluetooth setup is a little confused… I’ll get that sorted tomorrow. And I’m trying to convince Encarta that there is a CD, when of course there isn’t… Aha – did it. A little regedit work took care of it.

I made a neat mailto bookmarklet that uses the page title as the Subject, and puts the URL and any selected text into the Body. It was tricky because Javascript wanted to interpert the %0D%0A (crlf) too early, so I had to escape the %’s as %25, i.e. %0D%0A -> %250D%250A -> %22%250D%250A%22 (when surrounded by double quotes).

Now that I have a growing number of image “asset” posts in WordPress, some basic gallery functions are useful. I added a new rewrite rule, and created gallery.php to display groups of images for a given category:

E.g. http://www.dwelle.org/archives/gallery/michigan/

Since each image is a blog post, viewers can leave comments, just like on Flickr.