Fuzzy autocomplete

For a small number of taxonomy terms, a select box can be used where the choices are explicitly displayed to the user.  But for larger numbers of terms using a select box becomes problematic.  Using a textfield with autocomplete is an obvious option when there are a large number of terms but it can be discarded because it is not robust to variations in spelling.  This post shows how in Drupal 7 a fuzzy autocomplete can be used to increase robustness.

Understanding the node processor plugin for the Feeds module

In Drupal 6, the Feeds module has three types of plugins.  These are the fetcher, parser and the processor plugins.  The processor plugins that are supplied with the Feeds module are for data, nodes, taxonomy and users.  This article looks at the node processor.

If a feed is imported multiple times to allow the information in the feed to update the Drupal site, thre are three options under the node processor settings.  These are

Javascript Lint with Vim on Linux

Often when I use Javascript it is to improve functionality of a website and does not require many lines of code.  It is difficult to remember all the nuances of Javascript and often it is not worthwhile to try to write good Javascript.  But I have been writing longer Javascript scripts and wanted to try a lint for Javascript.  I had to search around before I could get something working so these are some notes so I do not have to search around for the information again.

Ordering Drupal hooks and callbacks

A while ago someone was testing me on my Drupal knowledge.  He inquired which hook gets called first, hook_form_alter() or hook_form_FORM_ID_alter().  I was a bit puzzled since nothing in the system api specifies that one is called first and wondered why he was not using other approaches that are in the api.  Hook_form_FORM_ID_alter() he crowed triumphantly.  I thought it strange to rely on the order of calling these two hooks since there is nothing that guarantees that the order will always be the same.  In fact, his claim is only true for Drupal 6.  The order is switched in Drupal 7.  And

Using CSS 3 effects

Some common effects used to make website more visually appealing are rounded corners, gradients and border shadows. I recently came across a theme that still implemented these effects by using extra divs and background images. There is plenty of information about creating these effects using CSS 3 but this article is more about why CSS 3 should be used now that recent browser releases all support them.

Rounded corners

For instance a common way to implement rounded corners:

Pages