Snippet: node type specific CSS files

Published on Fri, 2009-01-02 - 21:45

I just wrote a fun little bit of code for answering a question on our Danish Drupal community site.

The user in question wanted to add different CSS-files, depending on the type of the node used as the main page content, and I just wanted to share a little bit of code demonstrating how much can be a achieved very easily with Drupal's very flexible theming system.

So with no further ado, here it is:

Tags

Preparing for Drupal 7 by changing the way to make parameters for db_query.

Published on Sun, 2008-11-16 - 19:49

After attending DrupalCon in Szeged and following the new database stuff, I thought a bit about how to make the transition easier when Drupal 7 comes out.

I didn't think that it was anything special, but Robert Douglass encouraged me to share it, so here you are:

I figured out that you can actually use the Drupal 7-style of arguments to db_query right now (more or less).

Tags

Drupal and Varnish HTTP accellerator

Published on Fri, 2008-10-17 - 15:03

For many reasons, it's a good idea to have a HTTP accelerator/reverse proxy on your webserver to take some of the burdens of HTTP and cache away from Apache and PHP. Squid is most commonly used for this purpose, but after hearing about fellow Dane Poul-Henning Kamp's creation, Varnish, I decided to try that out before messing with that many-armed monster, Squid.

Tags

Drupal database performance: MySQL and PostgreSQL compared.

Published on Mon, 2008-10-13 - 03:13

As a long time open source user and a chronic challenger of own assumptions, I often test out the alternatives to my current prefrences. While I used Linux, I tended to switch desktop environments every two months or so. I tried out all the e-mail clients, all the browsers, all the VCSes, and even (almost) all the text editors. Before settling with Drupal, I tried out all the CMSes I could find.

I'm starting my own Drupal shop

Published on Wed, 2008-10-01 - 00:26

So, I'm finally able to break the news. I've been planning this since before DrupalCon, but there's been a lot of things needing to get done before I could take the final step and do it.

I am, as of half an hour ago, a registered independent business owner in the kingdom of Denmark. I am not alone in this. I have a very good friend and mentor backing me up and guiding me every step of the way – and for that I'm grateful.

Tags

My six months with Mollom

Published on Tue, 2008-09-23 - 09:09

As many Drupallers know, Mollom has been out for a while now, six months in fact, and I just wanted to share my enthusiasm about it.

I had the pleasure of speaking a bit with Dries about it in the shuttle bus back from Szeged, and it seems that Mollom's future is truly exciting.

Before Mollom, I've been using spam.module and Akismet with varying degrees of success, and when Mollom first came out, I wondered why we needed another Akismet, but decided to try it out to support Dries.

Tags

Thank you, DrupalCon

Published on Sun, 2008-08-31 - 23:26

So, DrupalCon is now over. I'm sitting here in the shuttle bus to Budapest with Dries, Webchick, Addison Berry, Tiburon and Drew. It's been an exciting week for me, so many new friends and so much new knowledge.

Of all the 503 participants, there were only a precious few I had met in real life before, so it was all a bit daunting, but now I'm really glad I went.

Tags
Subscribe to Mikkel’s blog