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

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.

Drupal: embed Environment Canada weather feed in node


Initially, I used the ecweather module to display weather data. However, I was not happy with the way it worked and the way it displayed the data and it was too much work to get it to my liking. For quite some time I have been using some PHP code in a node to display the text-only weather forecast for Environment Canada using their RSS feed.

If you look at my weather page, you'll see it consists of three parts: the current weather data, watches and warnings, and the five-day forecast.

First you need to obtain the proper RSS feed by selecting the location of your choice on the EC website. Then you need to add that to Drupal's aggregator, for example

Then you create a node with the following code. It basically extracts the last rows from the aggregator_item table.

All three parts are basically part of the same large chunk of PHP code on the node but I split it for easier digesting.

The reference in aggregator_item.fid refers to the feed ID. In the admin screen you can see the ID in the link for the RSS feed.

Roz Savage to embark on stage 2 to Tuvalu

Roz Savage's site

After having completed the first leg from San Francisco to Hawaii last September, Roz Savage will soon embark on the second leg of her journey. In about three weeks she will depart from Hawaii and head for Tuvalu.

Another vulnerability in Reader

Adobe published a security advisory regarding a vulnerability related to a JavaScript function. Affected are Adobe Reader and Acrobat 9.1, 8.1.4, and 7.1.1 and earlier. A fix is not yet available and Adobe recommends disabling JavaScript.