Drupal

15 June, 2008

I’ve been very quiet lately, which was especially noticeable on Drupal.org. Right now, I’m in the middle of my exam period (Computer Graphics exam next Wednesday), but as soon as I can (exams will be finished July 2nd), I will resume my Drupal work:

Tags

6 April, 2008

I’m late to the Mollom announcing party, because I was on a vacation. Nevertheless, I hope I can still interest some of you with a slightly different angle.

The major issue with spam prevention is that it often (currently virtually always) involves extra steps for normal users. And more steps means less participation. Less participation means less traffic. And less traffic means less popularity, revenue and whatnot. So clearly there is much to be gained to prevent spam without annoying normal users.

And this is exactly what Mollom tries to do: minimize spam and minimize annoyance. Additional benefits are that you no longer have to moderate content (nor users, because Mollom applies its magic on the user registration form as well), and – this one is pretty amazing IMO – ”improve the overall content quality”. Konstantin Käfer explained this pretty well:

Tags

3 March, 2008

API {#api}

The API of the previous version of HS was a beast. Well, not the API, but the implementations. This has been fixed in version 2 of HS: it’s now much more elegant and much easier. If you don’t have to alter any forms, you can easily implement all hooks in less than a hundred lines, probably even less. The content_taxonomy implementation for example, is about 75 lines if you don’t count the form altering. That should make HS much more attractive to other Drupal developers.

Support Hierarchical Select Dynamically {#support-hierarchical-select-dynamically}

One of the low-hanging fruits is to support HS dynamically (i.e. use hierarchical select form items when HS is installed, use normal selects otherwise).

If your module provides its own hierarchical structure for which you want to use HS, you’ll have to implement the hooks. Next, I assume you have something like this in your form:

3 March, 2008

What is Hierarchical Select? {#what-is-it}

For those who don’t know Hierarchical Select yet, or HS in short, this is a module that provides a new form element. If you’re new to Drupal, you may just have frowned upon reading that. A ‘form element’ in Drupal’s Forms API is something like a button, select or textarea element in HTML, or a GUI widget in a GUI.

Now, the goal of HS is actually very narrow: making selections in hierarchies (hence its name) really simple: improve usability. The prime example and candidate for this is of course Drupal’s Taxonomy module. The idea is to first select an item from the root level, then pick one of its children (if it has any), then one of the children of the selected child (if it has any), and so on.

New and Improved {#new-and-improved}

There are many new features in version 2 of Hierarchical Select (or HS in short):

19 February, 2008

At the end of 2007, my bank offered free personalized bank cards, meaning that you can put a photo on it. Only hours before the deadline passed (after this deadline, you’d have to pay, bah!), I thought about it. So I quickly started looking for something cool I could put on my bank card.

You’ve guessed it: I chose our beloved Druplicon! :)

Update

I did the impossible. I got chx to envy me:

kkaefer: WimLeers: that bank card is awesome!
WimLeers: kkaefer: :)
kkaefer: WimLeers: chx envies you ;)
WimLeers: kkaefer: really? :D
WimLeers: kkaefer: WOOT :P
chx: WimLeers: a DRUPLICON bank card!!!!!!
chx: my life is incomplete without a druplicon bank card.

Tags

4 February, 2008

My battle plan for Drupal 7 is simple: get as many performance improvements or performance-improvement-enablers from my Drupal page loading performance article into Drupal 7. From high to lower priority:

2 February, 2008

I already mentioned the CSS sprite generator in my article on Drupal’s page loading performance. More great news though: they open sourced it! See the blog posts by the authors, Stuart Colville and Ed Eliot.

It’s under the BSD license though, so it would never be accepted on Drupal’s code repository, which is a must. I contacted the authors, asking if they would be willing to dual-license it under the GPL.

The effects of such a module – if technically possible to generate CSS sprites completely autonomously – would be enormous. It would reduce the number of HTTP requests per page considerably: all CSS background images would be aggregated into a single image!
Even on “just” the Garland theme of a default Drupal 6 installation (this includes a logo and a small Drupal banner at the bottom), this would save 7 HTTP requests per page.

30 January, 2008
table.analysis { min-width: 40em; width: 85%; } table.analysis th { border-bottom: 1px solid #ccc; font-size: 0.92em; } table.analysis tr td:first-child { padding-left: 30px; background-repeat: no-repeat; background-position: 5px 50%; } table.analysis tr { padding-top: 6px; padding-bottom: 6px; } table.analysis tr.bad { background-color: #fcc; color: #200; border-color: #ebb; } table.analysis tr.attention { background-color: #ffd; border-color: #eeb; } table.analysis tr.good { background-color: #dfd; border-color: #beb; } /* table.analysis tr.bad td:first-child { background-image: url(images/articles/analysis-bad.png); } table.analysis tr.attention td:first-child { background-image: url(images/articles/analysis-attention.png); } table.analysis tr.good td:first-child { background-image: url(images/articles/analysis-good.png); } */ table.analysis caption { caption-side: top; text-align: left; font-size: 130%; color: #494949; font-weight: bold; font-family: Arial, sans-serif; } table.analysis caption a:link, table.analysis caption a:visited, table.analysis caption a:active { text-decoration: none; color: #494949; } table.analysis caption a:hover { text-decoration: underline; }

Introduction

Google dominates the search engine market for a large part thanks to its spartan, no-bells-nor-whistles interfaces. But also thanks to its incredible speed (which is partially thanks to that spartan interface, of course).

Since you’re reading this article, you’re probably a Drupal developer. It’s pretty likely that you’ve had some visitors of your Drupal-powered web site complain about slow page load times. It doesn’t matter whether your server(s) are shared, VPSes or even dedicated servers. Visitors that live abroad – i.e. far from where your servers are located – will face the same performance issues, but at even worse scales.
This article is about tackling these issues.

26 November, 2007

Is it also for you a routine to look up the documentation for Drupal hooks at api.drupal.org? If you also use TextMate and are sick of having to command-tab to your browser to get to the documentation, then you’ll have a much better alternative in about 15 seconds.

Go to Bundles → Bundle Editor → Show Bundle Editor. There, click the plus-button in the bottom left corner to add a new command. Set the input to None, the output to Show as Tool Tip and the scope selector to source.php. Copy/paste the command below and assign a shortcut — I use CTRL + D.