“If you can fly a Sopwith Camel, you can fly anything”

PHP Squad - two cheerleaders in a convertible wearing PHP tops… programmer’s equivalent.  6502 assembler.

Not that I could easily do that these days.  But it’s been a good thing to know, as I can debug most languages.  Except Erlang.  Some things ARE too strange to touch.

When I changed the blog theme to Thematic, the “Leave a comment” option disappeared.  Now, one of the tenets of the open source community is that you can fix your own bugs.  Not that many people do, as it often involves downloading/installing weird open source compilers, and growing a shovel beard.

Fortunately (?) as PHP is interpreted, I was able to find the offending bug with WinGrep.
And here it is:

hooks-filters.php:
// Display comments link and edit link
// comments open mean the blog post is accepting posts.
if (comments_open()) { 
    postcommentnumber = get_comments_number();
    // postnumber is number of posts.  If more than 1, display “x comments”;
    if (postcommentnumber > ‘1′) {(display “x comments”;)}
        // if 1, display “comment”;
        elseif (postcommentnumber == ‘1′) {(display “1 comment”;)}
                // no comments, so display Leave a comment.
                elseif (postcommentnumber == ‘0′) {(display “Leave a comment”;);

The bug?  postcommentnumber was returning “-1″.  I don’t know why, but I suspect it’s probably Disqus related.

And while I don’t particularly like PHP, I can debug it.
As the bug is fixed, you are welcome to “Leave a comment”.

Bookmark and Share

Semi-regular web-link clearance

Got VB6 Investments- Wondering where to take them? (Mike Ormond’s Blog)
DOS Command Script: Use Date/Time in File Names (Bill Lin’s Blog)
Cookbook, Guide Can Assist in Windows 7 Application Compatibility Tests
Greening your PC
How long will users wait?
The 100% Easy-2-Read Standard

Foxmarks
Foxmarks is a free add-on for your browser that syncs and backs up your bookmarks across multiple computers and more.

Shutterstock
”Shutterstock is the largest subscription-based stock photo agency in the world. Every day we add thousands of photographs, illustrations, and vectors to our outstanding collection of premium, royalty-free images”

Windows Mobile specific (from the Enterprisemobile blog)

Windows Mobile Troubleshooting – How to log like an expert
Windows Mobile 6.1.x Upgrades and Build Levels – Dec 15, 2008
Writing custom GPOs for SCMDM 2008

Bookmark and Share