Planet Drupal

Printing debugging info for forms

During development, it's useful to quickly find information about form elements. Quickly is the key word here, and adding a dpm in a hook_form_alter then removing it becomes tedious.

Here's a very simple module to add debug information to the title attribute of all form elements:

A recipe for extending Views handlers without subclassing

One of my long-standing gripes with Views is the inability to alter the behaviour of existing Views handlers (e.g. fields, filters, etc.) without having to subclass the desired handlers to add new functionality. While the subclassing approach is fine when the functionality targets a new field type, it is not ideal if the change required should affect existing fields, across different types of handlers.

I was recently commissioned to create a module that displays tooltips on field headers, regardless of field type.

Loading Facebook embeds via AJAX in a CTools modal dialog

oEmbed is a simple and popular protocol for embedding external media in web pages. It supports many types of content, including images, videos, and even "rich" content (i.e., HTML snippets). Unfortunately, the current Facebook embed mechanism does not work so well when the embed code is loaded dynamically on a page, e.g.

Introducing Views Share

One of the technologies that made a lasting impression on me, as a young programmer, was Microsoft OLE. To give my own applications the ability to embed documents created in other applications, and vice-versa, was mind-blowing!

Quick idea for a Google Doc node with in-place viewing and editing

I've often wished document editing were more user-friendly in Drupal. So I came up with this very half-baked idea to embed the viewing and editing of a Google Doc in a node field.

Diaries of a module maintainer, part 1 - Gardening the issue queue

I've been maintaining a growing amount of modules over the years. I am starting to document my observations, habits and challenges, in the hope they'd be useful to other Drupal coders.

Psychology of this coder

I devote time and energy to the development of a module. Since I consider myself a software craftsman, each module is a creation of mine - an artifact to which I try to imbue functional and aesthetic values.

Ingesting the Facebook stream using Feeds and OAuth 2.0 (updated for Drupal 7)

Now that Twitter 1.1 and Feeds are buddies, time to move to other data sources. Next up: Facebook. Using trusty Feeds and friends, I was able to ingest my own Facebook home feed. Here's how to replicate this:

For the impatient, attached is a feature that should get you set up quickly.

Consuming the new Twitter 1.1 API with Feeds and friends

Update: This post now contains a feature that you can import in D7 to see the Twitter feed in action.

The new Twitter 1.1 API kicked in recently, which meant a new cycle of maintenance for anyone consuming their data programmatically. My own Feeds + Views demo site streams #drupal, using Feeds and complementary modules.

Arabic music notation in the browser

I created a bare-bones content filter to add musical notation to Drupal content, using the VexFlow / VexTab music engraving library. Here's a little sample, also showing my fork of the original library to handle basic Arabic musical notation (quarter tones and special scales):

tabstave notation=true tablature=false clef=treble key=Rast notes C/4 D/4 E%@/4 F/4 | G/4 A/4 B%@/4 C/5

Feel free to fiddle with the music snippet above.

Syndicate content