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
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
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
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.
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.
iPhone "Cannot Connect to Voicemail"
stplanken | August 28, 2011 - 09:03 | 37 weeks ago
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:
Drupal Block Refresh module caveats
stplanken | August 23, 2011 - 11:00 | 38 weeks ago
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.

