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: 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.

MediaSmart Server: continuous crashes trashed my backups... twice

My HP MediaSmart Server has a problem with the network card, causing the entire server to blue screen when my router crashes. I am in the middle of researching some more professional routers that are — hopefully — more reliable. In the mean time the server crashed again, corrupting all my backups of one of the workstations — the second time in two weeks.

Linux and unhelpful GRUB error

I have been using Ubuntu since version 6 on an external hard drive. Not because I really have a need for it, but because I have it and want to keep it up to date.

New UPS for Home Server

This morning my new APC Smart-UPS 1500 arrived. I ordered this from Dell for Can$299.99. Dell dubbed this unit the DLA1500 but it is the equivalent of the APC model number SUA1500. The "D" undoubtedly stands for Dell.

Office 2007: customize Quick Access Toolbar

Prior to Office 2007 I enjoyed the familiar menu structure like a good pair of shoes you grow into. It has been a while since the ribbon was introduced with Office 2007 but I still sometimes feel lost accomplishing even the most basic task.

Excel 2000: easy switching between open workbooks