Login

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

Add comment counter to posts

stplanken | May 13, 2012 - 10:05 | 5 days ago

Drupal

If you want to add a comment counter to posts you could add that to the node template by using $node->comment_count but this sort of thing tends to get ugly. It's neater to add the counter to the node links.

Here is a snippet to add to template.tpl.php that does this.

PHP timezone errors in Drupal

stplanken | March 7, 2012 - 23:17 | 10 weeks ago

Drupal

I finally found a working solution for the annoying timezone errors reported by PHP 5.3.x in the Drupal 6.x logs. In my case, the errors are related to mktime() and date().

Siemens Sirius 3RW44 Soft Starter Function Block for Step 7

stplanken | January 13, 2012 - 20:24 | 18 weeks ago

Siemens Sirius 3RW44

Since I couldn't locate any examples to control a Siemens Sirius 3RW44 soft starter via Profibus DP in an S7-300 system using Step 7 — without PCS 7 or Soft Starter ES software — I decided to write my own reusable function block.

Since others may be running into the same problem, I decided to post the code here (project archive is attached). This allows communication over Profibus, which is far more advanced than reading and writing the standard 16 input/output bits.

Distance

stplanken | December 12, 2011 - 19:06 | 22 weeks ago

Distance

Distance

How I learned to mind my own business...

stplanken | October 27, 2011 - 14:29 | 29 weeks ago

Source unknown.

Tucker, 2003-2011

stplanken | September 18, 2011 - 23:05 | 34 weeks ago

Today was the day I had to put Tucker, my loyal German Shepherd, down. He was in pain and no medication in the world could reverse this. It was not an easy decision but a necessary one.

We rescued him in 2004 and it took me a while to figure out what made him tick. But ever since I figured it out, we bonded. He always accompanied me on long horseback rides through the Rocky Mountains and he loved riding in the truck bed.

Over the years, he has taught me a lot. Mainly about myself.

And for that, I am grateful.

Tags: Life

iPhone "Cannot Connect to Voicemail"

stplanken | August 28, 2011 - 09:03 | 37 weeks ago

iPhone voice mail error

My wife's iPhone 4 came new out of the box at the telecom store. Neither of us have visual voice mail, in which case the voice mail button should just dial the voice mail. It does on mine, but it did not on my wife's. Instead, it displayed an error:

Angular Momentum

stplanken | August 24, 2011 - 18:11 | 38 weeks ago

Angular Momentum
Source: XKCD.

Drupal Block Refresh module caveats

stplanken | August 23, 2011 - 11:00 | 38 weeks ago

Drupal

There is an issue with the Block Refresh module.

After installation and configuration I discovered that the auto refresh was not working. Firefox's Firebug extension showed that requests were made at the proper interval and data was actually returned, but the block's content was simply not being updated.

My iTunes gripes

stplanken | August 19, 2011 - 19:44 | 39 weeks ago

For me, iTunes is by far the worst software I have currently running on any of my computers. By far. It is such a contrast with the slick iOS devices from the same company.

Here are my iTunes gripes.

Current weather Sundre

Current Conditions: 1.3°C

Observed at: Sundre Airport 07:00 AM MDT Saturday 19 May 2012
Temperature: 1.3°C
Pressure / Tendency: 102.1 kPa rising
Humidity: 83 %
Dewpoint: -1.4°C
Wind: WNW 4 km/h
Air Quality Health Index: N/A