Welcome to ShooFlyBuzz, the company weblog. We use this space to talk about what’s happening with ShooFly, but more generally to talk about web design, the challenges we encounter, the tools we use, websites we like, and provide some training on the care and feeding of your own website.

If you want to send in feedback, leave a comment, send an email, or tweet @shooflydesign.

This has been a crazy year. A whole lot of client work, a new arrangement with, some unreleased projects that I can't quite talk about yet, and that's just in the ShooFlyDesign part of life!

Categories: - online training videos I'm delighted to announce that my new course, JavaScript for Web Designers, is now available in the online training library.

If you're a web designer comfortable with HTML and CSS, and want to learn how to add interactivity to your projects, this course will help you do that. You're not going to master the entire language and everything it can do in three hours, but it will get you rolling in a hurry, developing your intuition and understanding of using JavaScript on the web. Using this course as a foundation, you can move further into the world of writing code for web browsers, and making all kinds of cool stuff on the web.

There are many free videos available, so you can listen to the melodious sound of my voice and get a feel for the examples and teaching style. Check it out!


I'm working on a Drupal project that requires calculating some custom stats for each registered user. To get it working, I ran my SQL queries right in hook_user_load(), which is wildly inefficient; it's much better to run the queries once and cache the results for a while. Drupal has nice cache functions built-in, and I thought I should use them, but wasn't totally clear on how to do it based on the documentation.

Jeff Eaton of Lullabot wrote a really helpful article on how to do basic caching in Drupal 7, which is a good introduction, but didn't really explain how to cache a bunch of related, but separately calculated, pieces of data using a function you'd call repeatedly. Examples module is also great, and does include a cache_example module, but also didn't have an example that was right up my alley.

So, here's how to write a single function that can be called multiple times on the same kind of object. This is not what you'd want to do for users or other built-in entities (for those, you should use Entity Cache module). Thanks to Planet Drupal readers for the feedback and help clarifying this.


Last night, I spoke at a joint meetup of Hollywood WordPress and LA WordPress 101. I called it "Everything I Always Wanted to Know About WordPress (but only learned through experience)", but the main point was to give people who are new (or newish) to WordPress some tips and tricks on how to use it, and ways to proceed when they need to start customizing it.

This is my recording of the talk itself, basically a screencast of the slides. The organizers also shot video where you can see me, and if I get my hands on it, I'll update this post.

Download the slides here


When migrating into Drupal from a CSV file (i.e. a spreadsheet from Excel or LibreOffice Calc if you're an open source nut like me), you use the MigrateSourceCSV class. It works very well.

Depending on where the CSV file originated, though, you might get unexpected behaviors, like Migrate UI telling you there are thousands of source fields you need to map. If this happens, and you don't have that many fields, check the line endings on your CSV file. Open the CSV file in your text editor and check its settings. Today, I was working with a file with the following settings (shown in BBEdit's status bar):

Character set and line ending settings shown in BBEdit

As you can see, the character set was Western (Mac OS Roman), and the line endings were Classic Mac. That means the file originated in Excel for the Mac, and it causes Migrate to freak out. I changed these settings to UTF-8 and Unix-style line breaks, saved the file, and from then on Migrate was happy.

There's also a parameter you'll see in the MigrateSourceCSV documentation called embedded_newlines. It's supposed to help with weird row counts, so I thought maybe that would help this issue, but apparently that's not quite it. It's not a big deal to resave the CSV file anyway, so that's what I'd recommend just to be safe.


This is Part 1 in a series of posts on migrating a site from Squarespace 5 into Drupal 7. This is an overview of what we're doing and why, mostly discussing the format of the Squarespace 5 XML file, which is undocumented. My hope is to make the process of importing Squarespace data easier for everyone else.

The Mission

I'm working on a fairly large site (, currently running on Squarespace 5, migrating to Drupal 7. Squarespace is an excellent platform with many virtues, but it doesn't allow the level of customization that my client is looking for, so we're moving the site to Drupal. Now, of course you lose the built-in, high-availability hosting, and some of the very good polished UI that Squarespace gives you, so this move is not for everyone. But if you want control, and to have your blog, forums, and e-commerce wrapped up in a single package, Drupal is your friend. One example: my client wants users to have all their purchased products, forum posts, and comments available through their user profile. Squarespace can't do that, Drupal can.

This site has been active for several years now, and has a very active community of users, so the first big task was to import all of those items into Drupal. Fortunately, Squarespace 5 will let you export your entire website as XML. Note: it doesn't look like Squarespace 6 (the current version) supports full site export. There is a WordPress-compatible export that you could import into Drupal using WordPress Migrate (or, obviously, into WordPress), but it seems to cover only blog posts. This site is older, running Squarespace 5, so we can get everything.

Now that we have exported data, what can we do with it?


I gave a presentation at last night's LA Drupal meetup on migrating from Squarespace to Drupal. I'm writing a full blog post (maybe more than one) on the subject, but for now I want to post the slides.

Download Squarespace to Drupal: a migration adventure (PDF)

All the links in the PDF should be hyperlinked and clickable. There are also some XPath selectors and drush commands that might be useful. The full post on this topic is coming soon.


In my introductory WordPress course, in first video on WordPress security tweaks (the third video of the third chapter — it's one you need to have bought the course to see), there is some sample Apache configuration shown which is not included in the course files. This was an oversight on my part; we tried to provide everything you would need to save re-typing errors, and this one slipped through the cracks.



Subscribe to ShooFlyBuzz