Advertising


content top round

Windows Live Writer (Beta)

A fantastic piece of software in Beta that is an excellent way to manage your blog (or blogs) from your desktop. The Wordpress crew did a great job when they redid the admin side (2.0+) and they added a rich-text editor, but it still has some quirks that just bug me. Yes, I’m soaking in it, er, I mean I’m using it to post here. And I really like it - I’ve always felt uncomfortable using a browser-based admin interface for a really long post. I’m always scared that it will hiccup and all of my work will be lost (after a particularly rage-inducing incident years ago). Windows Live Writer seems to me to be a spiritual successor to w.Bloggar, with obvious improvements. And that’s a good thing since the w.Bloggar project seems to be MIA. Add in the fact that this sucker has a spell-checker, and I’m sold. I hope they make it cheap enough that I can afford to pick up a copy when its released, because, unfortunately, I’m hooked.


Those Pesky Alternative Control Structures

I’m sure that if you’ve ever decided to build a theme in Wordpress, you’ve had to deal with the The Loop. The Loop is the structure that really is at the heart of the blog engine and looks something like this:

<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>

�.

<?php endwhile; ?>

<?php else : ?>

�.

<?php endif; ?>

(The dots, being the code you use to process each of the individual posts.)

Of course, this is all well and good, but if you’re a beginner to PHP, I’m sure you are a bit confused as to what you are seeing. What are those colons doing there, are where are the curly braces? The answer is that our example is utilizing alternative control syntax in PHP to make the code just a bit more readable. Other templating systems, such as Savant, use this inside templates to make it easier to read where loops and logic statements end. After all endwhile is easier to see at a first glance than a curly brace �}� when reading code mixed with HTML, which describe templates to a ‘T’.