Skip to main content

Blogs

Flickr Slideshow Support in Drupal Content Fields

File under

Just released a patch to the Video Filter module that adds support for embedding Flickr slideshows in content fields. It’s pretty flexible. Just browse to a set or its slieshow, copy the URL, and add it as you would any other media type in Video Filter:

[video:http://www.flickr.com/photos/some_user_name/sets/56109963647105794/]

So far it’s just for the 5.x branch, but if the patch is accepted and there’s interest, I’ll gladly port it to 6.x.

Installing IE 6 and IE 7 on Ubuntu

If you develop or design web sites, there is simply no getting around the suckfest that is IE. On Windows, it’s difficult enough to run concurrent copies of the turd. But what are you supposed to do on Linux?

Installing the Vista Fonts on Ubuntu

File under

Having recently read In the Beginning was the Command Line, Neal Stephenson’s peerless deconstruction of operating systems (slightly more nuanced than the current “I’m a PC! I’m a Mac!” “debate”), I decided it was time to do what I’ve threatened to do for years: switch to Linux.

Getting a path to your subtheme

File under

Was working with a subtheme today and ran into a problem with theme_get_path(), which is supposed to return the path to the active theme (actually, it's slightly more complicated than that; the value you get back depends on the context in which you call it).

Unfortunately, theme_get_path() does not always work correctly for subthemes.

Assumptions and Errata: Two Quick Tips

First tip of the day: when reading any kind of technical book, one of the first things you should do is check the errata. This will save you time, hassle, and drywall repair costs.

Second tip of the day: don't assume. This is an infinitely more difficult tip to follow through on than the first, because most of the time, you don't even realize you're making an assumption.

How to explain RSS to your relatives

Over the past few weeks, as the number of parties I attend reaches its annual apogee, I've been spending a lot of time with some relatives who are not quite as technologically savvy as I am, but who spend a lot of time online and know their way around a web browser.

It just so happened that during the course of conversation, the concept of RSS feeds came up a couple of times. And I discovered that even though it's been around for many years now, RSS is something that the average person has a really hard time understanding. Most people know the familiar orange square, but they're not really sure what it means, or what to do with it.

Simple MySQL schema comparison on Windows

File under

If you do any database work, chances are you've run into the following situation: you've made some structural changes to a few tables on the local or staging copy of your database, and now you need to replicate those changes on your staging or production database. The problem is, how can you be sure that you make the same changes to each copy of the database, other than by comparing each table one-by-one (which is tedious and error-prone)?

The obvious solution is to run a diff on your schemas; and after looking at all the options out there, I've found that running a diff is indeed one of your best options. I also found another solution that has some real advantages over running diffs – a free web app called MySQLDiff.

An easier way to assign instance variables

File under

Ever find yourself doing something like this?

$q = "SELECT * FROM person WHERE id=$id";
$r = mysql_query($q);
$row = mysql_fetch_array($r);

$this->id = $row['id'];
$this->firstName = $row['firstName'];
$this->lastName = $row['lastName'];
...
$this->pantSizeAfterThanksgiving = $row['pantSizeAfterThanksgiving'];

A quick and dirty way to update old Firefox extensions

File under

What do you do when your favorite Firefox add-on hasn't been updated for the latest version of Firefox? Par example: one of my favorite add-ons is Statusbar Clock. Unfortunately, the folks over at Cosmic Cat Creations haven't updated their widget in well over a year.

The clicks, they do nothing!

Clearly, this little kitty has been put to sleep.

Case sensitivity in MySQL (do you really need it?)

File under

Not sure how this escaped my notice until now, but today I realized the default collation for MySQL columns is not case-sensitive. Among other things, this means that if you're searching for distinct values on a column with varchar, text, or any other non-binary data type, values that differ only in their cases (such as "apple" and "APpLE") are considered equal, and you won't get both values back. MySQL will return "apple" or "APpLE", but not both.

One guess as to how I discovered this. Heh.

Syndicate content