
When it comes to programming problem-solving, I usually do pretty well thanks to the internet; you can find an explanation and/or example of darn near anything if you choose your search terms carefully.
That’s usually all I need; it might take me a while to absorb whatever new technique or classes/functions I’m using, but the path is usually clear.
I’ve finally started getting my hands dirty with Drupal over the last couple of weeks, going through the process of actually building a site versus adding a couple of pages and menu links here and there to see how it works, and now poking around under the hood to learn how to extend it.
Adding a bunch of pages in a row using the standard interface is usually a pain in any CMS, and Drupal is no exception: Click to expand all of the option fields, click through another screen to attach the new page to a menu, try and remember the weight of the last item you added, repeat.
Half the problem when trying to learn a new language or platform on your own is finding a practical application for it. You never get very far with “Hello, World”.
I’m really surprised there are no Drupal modules out there facilitating the import of existing content and/or menu structures. At least, none that I have been able to find other than the excellent WordPress Migration Utility . I used that to move the last 5 1/2 years’ worth of blog entries over to Drupal.
So, there’s my first practical application: a module that imports either a page hierarchy, creating a menu and stub Page nodes, or possibly even importing actual content.
I’m not sure what the import format will be. The smart way to develop this would be to make the import tool pluggable, so other people could write drivers to import whatever format they need. I think that’s overly ambitious for the first version of this plugin, but I’m beginning to get a sense of how that could be accomplished without too much trouble in Drupal.
31 January, 2009 It took me a while, but I did ultimately build just such a module. It’s in the Drupal contributions repository, and it’s called Bones.
My Flickr photoset of the cigar box guitar I built last summer just got featured in a MetaFilter post.
I feel kind of lame knowing that I still haven’t re-set the neck in hopes of fixing the intonation, though.
When digging around for Drupal Forms API examples make sure you know which version of Drupal the examples you find are for; the differences between 4.x and 5.x are just subtle enough so as to be terribly confusing.
Finally, I found this discussion thread. For a clear, functional example see the second comment down by pwolanin, “Wrong code above, and 2nd point: form_id”. The code works, and the explanation of how the form_id is named is tremendously helpful:
For some reason this afternoon I’ve been thinking a lot about our temporary digs when Kim and I first hit California in 1996: the city of Brea in Orange County.
The things that stand out are cultural adjustment-type moments:
Sam Adams Honey Porter is back, at least for the time being, and I am pleasantly surprised to find that I like it just about as well as I did 10 or 11 years ago, which was probably the last time I had it.
I remember usually having a six pack of Samuel Adams’ Honey Porter or Scotch Ale in the fridge of my Racquet Club apartment, but after moving to L.A. I think I was either too poor to buy Sam Adams for a while, or too busy trying out other beers. By the time I got a hankering for Honey Porter again, they had stopped making it.
Late last year I heard that it was available again, but only in one of their variety 12 packs. I was pleasantly surprised to see a six pack of it last week, and today I finally gave in to temptation.
It’s not the best porter I’ve ever had —that honor would have to go to a bottle of Samuel Smith’s Tadcaster I had at Bishop’s Lounge about three years ago— but it’s good, and the nostalgia factor counts for a lot in my book.
Here’s hoping they start selling Scotch Ale by the six pack again.
I got to play some banjo on the porch last evening. It was the first time I’ve played out there this year, and the first time I had picked up my banjo in a few weeks.
I don’t think there’s a better match for porch picking.
I know that all I did in California was bitch and moan about the lack of seasons and weather, but I have had an assfull of this April. More snow on the way tomorrow, whee!
One huge peeve of mine is the addition of JavaScript that uses the body onload
event to trigger a focus()
call to put the cursor into the login field.
I know it’s well intentioned, and probably works fine for all those fortunate enough to have broadband access.
If you’re stuck with dial-up, however, you often find yourself filling out a login form while you wait for the rest of the page to load. I can tell you from repeated experience that it is DAMN annoying to be halfway through entering your password, only to have your cursor picked up and dropped back in the username field.
Why not spruce up that ‘onload’ call to first check and see whether the the username field is empty? If yes, by all means focus on it. If no, assume somebody’s already filled it in.