Blog

19 September, 2007

Last night we had the Pre-DrupalCon Social near La Rambla. For me, it were a lot of new faces (it’s my first DrupalCon after all). Among them were the most infamous Drupal developers: eaton, webchick, jeff (well, all Lullabots really), chx, Heine and so on. Geeky stuff, good times! After some cosy chatting, we got to dinner. But apparently the venue, Muebles Ciudad, only offer Japanese food. So it was a shot in the dark for me, and the first time ever I had to eat with sticks. I finished much later than the rest, but at least I managed to eat something :P. I don’t think I’ll eat it again any time soon though. French fries … hmmmmm.

24 August, 2007

A couple of weeks ago, I agreed to work on the Panels Mini module, which would become part of the second version of Earl Miles’ outstanding Panels module. While working on that, I suggested to let modules implement styles for panels. (I was inspired by Nedjo Rogers’ Panelsblock module, which sort of gives you “tabbed Mini Panels” for Panels 1). All you then would have to do, is: pick the Panel Style in the settings for the Mini Panel (or whatever other Panels implementation chooses to support it) and then change the CSS to get exactly what you want. This should prove to be a real timesaver.

More about Panel Styles I’ve written 2 Panel Styles so far:

Carousel Panel Style and Tabs Panel Style. The latter might be included in Panels 2. Both were sponsored by Paul Ektov.
To write a Panel Style, you only have to implement 2 hooks, or 4 hooks if you want to offer configuration options. Hopefully that will result in many contributed Panel Styles!

10 August, 2007

Everybody recognizes Drupal 5’s shiny default theme. Because you can create a custom version just by choosing colors, it’s used at hundreds, if not thousands of Drupal sites.

Many people know it’s called Garland. Few people know that it was designed by Stefan Nagtegaal.

Unfortunately, both his MacBook Pro and his iMac got killed by a power surge. If you want to enjoy another killer theme for Drupal 7 (Stefan is working on the successor of Garland!) then please chip in and help him get a new iMac!

<embed allowScriptAccess=”never” src=”http://widget.chipin.com/widget/id/dc3474e2aa9e1072” flashVars=”event_title=New%20iMac%20for%20Stefan%20Nagtegaal&color_scheme=blue” type=”application/x-shockwave-flash” wmode=”transparent” width=”234” height=”60”>

Tags

9 August, 2007

For one of the projects I’m currently working on, we needed to be able to store monetary values. This seems utterly simple at first, but there are many details that need attention.

The obvious one: multiple currencies. Luckily, this was easily solved by using the excellent Currency module, which includes a Currency API module, written by Khalid Baheyeldin of 2BITS. The tricky part is the ability to read from and write to different number notations (and thus store the amount notation-independently). The number one thousand for example is written like 1,000 in the U.S., but it’s written like 1.000 in Belgium. In the U.S. they use a dot as the decimal separator, in Europe a comma.
The default decimal separator is the comma and the default digit group separator is the space, this is conform with ISO 31-0. A function to parse numbers (the most difficult part) is absent in PHP, one to format numbers however, is present.

29 July, 2007

Add these lines to your ~/.bash_profile if you’re using the Bash shell:

alias ddiff="cvs diff -u -F^f -N > "
alias dhead="cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout drupal"
alias dupdate="cvs update -dP"

Now you have three new commands at your disposal:

ddiff : Usage: ddiff patchfile.patch, creates a patch file.

dhead : Usage: dhead, checks out Drupal HEAD in the current directory.

dupdate : Usage: dupdate, updates the current directory recursively.

Update on August 10, 2011

While cleaning up my ~/.bash_profile file, I came across the following functions that I’ve used for many years and shared with several other Drupal developers. These are now obsolete, thanks to Drupal.org’s migration from CVS to git.