coding

Google Fonts for Drupal... The Hard Way

Manual typesetting

Image credit: Willi Heidelbach

I may have turned into a Drupal curmudgeon. The signs were already there... I don't install WYSIWYG editors unless I have to. More and more I choose to write code rather than install a module.

I had been using the Google Fonts module and I wanted to switch fonts. There was a problem with the new font for some reason—I spent about 30 minutes troubleshooting before I gave up and decided to just do it manually.

How to Fix Drush Make Error on the *New* D7 Drupal.org

UPDATE: This bug on drupal.org has been fixed. I'll keep this article published, but it will no longer be listed on the front page.

Drupal.org is now (as of Halloween 2013) on D7. This is good news with improved features, especially in the issue queues. However, something happened with the upgrade that broke my drush make. There's something different in the project information on drupal.org. (See: https://github.com/drush-ops/drush/issues/234 if you'd like more info.)

Writing a Simple Drupal Module


A while back I had an idea to do a simple Drupal Module to take Environment Canada's weather RSS feed and automatically it to Twitter. I didn't see anything in the Drupal contributed modules, so I decided to write my own. (A proof of concept is running on the website: http://canweather.com.) The logic is quite simple:

  • Read an item from the RSS feed.
  • Record that I have read that item.
  • Process the text to decide whether to post the item, and make any changes (eg. truncate long messages).
  • Post the text to a Twitter account.

Creating a CCK Custom Field

Last week I was updating a CCK custom field from Drupal 5 to Drupal 6. The D6 module updates are pretty simple, the catch is that CCK migrated to version 2 with D6. Unfortunately, the documentation for the CCK API is not as complete as the API documentation for Drupal core.

I got stuck on some of the naming, specifically around formatter functions. There's a blog post by Jennifer Hogdon that really helped sort out all the confusion: http://poplarware.com/articles/cck_field_module

A few other resources

CCK for developers: http://drupal.org/node/101742
CCK hook documentation: http://drupal.org/node/342987
Updating CCK modules from 5.x to 6.x: http://drupal.org/node/191796

Subscribe to RSS - coding