Stephan's blog posts

"I may not have gone where I intended to go but I have ended up where I needed to be." — Douglas Adams

Drupal: unable to delete settings.php


After the upgrade to Drupal 6.x I ran into the problem that the new settings.php in the sites/default folder could not be overwritten due to a file permissions problem: 550 Could not delete settings.php: Permission denied.

I changed the file permissions to read and write (644) and tried again, no go.

Drupal: add administrative links to nodes


If you want to be able to quickly add, edit, or track a node, you can add some links to each node. I did this by creating a variable in phptemplate.php that can then simply be used in node.tpl.php.

Administrative links for nodes
Example of links you can add to a node.

Firefox 3.5 released

Mozilla released Firefox 3.5 on June 30. I was pleasantly surprised to see that most of my favorite extensions were automatically updated.

The only difficulties were with Tab mix plus, for which an update could not be found through the Mozilla site. However, development build is available from the Tab Mix Plus forum.

Redirect Remover is no longer supported, so I'll have to look for a replacement.

Google Notebook is another one I used but it is no longer supported by Google.

This was a smooth upgrade, especially with my extensions (compared to some other upgrades in the past). The existing configuration changes made with about:config are respected. Unlike IE8, which restored some settings in order to be "helpful" (or just plain annoying in the belittling Microsoft way).

Computer World reported a record download of over 8 million in the first 24-hours.

Drupal: show taxonomy term description on page


Edit: Drupal 7 displays the taxonomy description on taxonomy pages, no need to tweak templates. However, you can still use this post to add a class to the page title on taxonomy pages..

I wanted to display the taxonomy term description on taxonomy pages like (where n is the term ID).

It actually took me quite a while but I figured it out. You can use the function taxonomy_get_term(n) where n represents the term ID.

In page.tpl.php I added the following code just before the print $content statement:

IE8: default new tab is annoying

By default, IE8 opens a new tab in a way that is perhaps helpful to some but more than annoying for anyone who has ever used a browser with tabs before. It shows several options that are not very helpful at all.

IE8: default new tab

Drupal: sequentially number comments across pages


In comment.tpl.php the variable $id contains the comment sequence number, but only for the current page. Each page will start at 1.

In order to properly sequentially number the comments across multiple pages, you need to multiply the number of comments per page by the current page number, plus the comment ID. (The first page is 0.)

Just as I was thinking about this, I found a little gem on the Drupal site. I placed the following in my comment.tpl.php:

Cradlepoint CTR350 firmware update 2.4.0

Cradlepoint released firmware version 2.4.0 for the CTR350 mobile router, mainly adding support for a host of new modems.

Before you upgrade, make sure you save your current configuration (Tools tab, Admin, Save and restore configuration). Then perform the firmware upgrade (Tools tab, Firmware) and restore the previous configuration.