Hubcaps, Streetlights, and Aliasing

I was driving back from dancing tonight and I noticed that the hubcaps on the car next to me appeared to be spinning slowly backwards. I figured this was probably aliasing due to 60Hz flicker from the streetlights. After a brief moment of confusion (no way were the guy’s tires spinning close to 60 times a second!), I realized that the hubcaps probably had some degree of rotational symmetry, and it wouldn’t be hard to figure out how much.

I know that we were both going around 50mph, maybe a little slower. I’m assuming that our wheels were about the same size; mine are 2.00 feet in diameter. That’s about a 6.28 ft circumference. 50 miles/hour = 264000 ft/hr = 73.3 ft/sec. So my wheels (and presumably the other guy’s as well) were rotating about 11.7 times/sec. If the wheels appeared to rotating slowly backward, the effective frequency must have been just a little under 60Hz, so I’m guessing that the other guy’s hubcaps had 5-fold rotational symmetry.

Who ever said math isn’t important?

Make Drupal act like a Content Management System

Before you say, “Drupal is a content management system!”, let me agree with you. It certainly does manage content, in roughly the same way that my “to do”/”to file” piles manage my paperwork. However, it lacks many features that I would consider critical for a CMS for a non-trivial website. Most fundamentally, it has no sense of hierarchy. Documents you create are just node/number. Files you upload all go in one directory (probably “files”). Any hierarchy in your navigation menus or URL aliases (which you will have to create manually!) exists only in your mind, not in Drupal. (To be fair, if you go to a document which has a menu item, it does highlight that as the “active” menu item.)

Out of the box, Drupal does come with support for categorization of documents, feed aggregation, and syndication. The default front page is a list of the most recently posted items. And, the two content types you can create are “Pages” and “Stories”. By now, this is probably starting to sound familiar: at its core, Drupal is a blogging engine…and not much more.

However, if you’re stuck using this product to create a non-blog website, it is possible to make it behave more like a fully-featured CMS through use of a few non-core modules. Specifically:

  1. Download and install these two modules.
  2. From Site Building→Modules, turn on “Category Menu”, “Category Pathauto”, and all dependencies
  3. From Site Building→Modules, turn off “Taxonomy” (Category replaces it)
  4. Under Site Configuration→Pathauto→Node Path Settings, set the Container and Category paths to “[categorypath]”
  5. If you haven’t already, under Site Configuration→Clean URLs, enable Clean URLs.

Now, create your content as type “Container”. (“Category” will also work, if you have already categorized pages that you’d like to show up as parts of the category page.) Two caveats:

  • When you’re setting the menu options for these items, do it under “Container information”, not menu settings. The latter will be overridden by the former.
  • This doesn’t solve the problem of a lack of hierarchy for uploaded files. Maybe there is a way to solve this; I haven’t really looked.

One other tip: the default input formats on a Drupal site leave something to be desired. If you want to be able to put in raw HTML, do this:

  1. Go to Site Configuration→Input Formats→Add Input Format
  2. Create a new format called Raw HTML with no filters selected
  3. Optionally, make it the default.