Blogging For Fun & Profit. The HTML version could be a lot better. Is blogging for profit still blogging?
Beyond The Template Engine
Beyond The Template Engine. Any sufficently advanced templating engine approaches PHP in syntax and capabilities. Most are more trouble than they’re worth. (Disclaimer: I chose Smarty for a fairly large client project.)
Blog Comparison
Good comparison of different PHP blogging tools. I don’t really consider Drupal a blogging tool though, and efforts to make it one have all seemed a little strained to me. Use the right tool for the job. See also: Incomplete WP feature list and what’s new in 1.2.
Move to WordPress
The Move to WordPress, and a sharp design too. “No re-building, no muss and no fuss.” One of my favorite things about linking to all these WP sites is the beautiful permalinks they use, which used to be the realm of just the blogging elite and heavy tweakers.
hicksdesign
Move away from MovableType? Jon Hicks, a designer I respect a great deal, contemplates WordPress.
Scriptygoddess
Super Scripty Goddesses choose WordPress. Can’t wait to see the cool stuff Jennifer comes up with.
Torvalds Didn’t Write Linux
Think Tank Claims Torvalds Didn’t Write Linux, you couldn’t make this stuff up if you tried.
Drafts
Getting drafts right, because it’s the little things.
5-14-2004
Prom pictures that you were all asking for. Dig the outfits.
The Great Switch
Jeremy Shields on why he uses WordPress. “I really feel that WordPress has redefined the way a Weblog CMS should be”
Marc’s Voice
I wish I understood everything Marc writes because then I’d be a millionaire. But please, someone get that man a <blockquote>
!
Underscores are bad
Phil proves hyphens are cooler. This is—of course— how we do it in WP. I promise I’ll stop talking about WordPress in every post at some point.
WordPress in Hindi
WordPress in Hindi. It’s the first full localization I’ve seen and it gives me chills. Congrats to Pankaj.
MT Keywords
LibraryPlanet.com » MT Keywords to WP Slugs. Something is funky with the CSS on this site, slows my browser to a crawl.
On Asides
As you may have noticed on this page or in your aggregator my normal entries are now interspersed with smaller link and commentary entries represented in an unordered list. These fall in chronological order with my other entries and are real posts with permalinks, comments, categories, trackbacks, and pingbacks. I have been wanting to do this for a long time and there was a flood of entries when I first got this working. I fully expect to post in this category with a much higher frequency than my normal posts. I come across things all the time that I want to link so badly but I just don’t have the time to write an entry about. Now every interesting tidbit I come across is just a click of a favelet away from my readers. It’s liberating.
The format of a weblog dictates its writing. There is no getting around this. Ever since my redesign I’ve had these big important titles that—as a writer—are intimidating. Everything I write has to be worthy of its 32-point Dante banner. This was a deliberate to force myself to put more thought and effort into my entries and it has worked; some of my best writing has been since the redesign. It has been stifling as well. To express what I want to express these days I need something more dynamic.
This type of linklog is nothing new. I first saw it at Kottke and since have enjoyed it at Charles Gagalac’s site. Charles was the first person I know of to do it in WordPress. This inline style fits my requirements very well, the biggest being that I wanted to use my existing post taxonomy so a second weblog would have been inconvienent. I also get the benefit of a combined RSS feed and combined update pinging. More than all of that though, I don’t want to limit myself to one type of post in a new weblog, or in this one. I already have plans to use this feature to not only highlight interesting links, but comments I make on other sites, upcoming gigs I have, photolog updates, and various activities and writing I now have spread out over a half-dozen blogs. It’s a perfect application for WordPress‘ multiple sub-categories feature. Technically, the whole thing was very easy to implement.
First I made a new category all of these posts would be a part of, it was late and I couldn’t think of anything too clever, so I went with “Asides.” This may have been subconciously inspired by Movable Blog. So I created the category in WordPress, and it had an ID of 33. Next it was simply a matter of telling my template that if a post was in the Asides category to lay it out a little differently. I wrote a quick function, in_category()
that does this with no additional DB queries that is now in the WordPress CVS and will be in the 1.2 release. The function takes a single argument, a category ID, and it returns true if the current post is in that category. Here’s what I have in my post loop:
<?php if (in_category(33) && !$single) { ?>
<ul class="asides">
<li id="p<?php the_ID(); ?>"><?php echo wptexturize($post->post_content); echo ' '; comments_popup_link('(0)', '(1)', '(%)')?> <?php edit_post_link('(e)'); ?></li>
</ul>
<?php } else { ?>
So basically what this is saying is that if the post is in category #33 and we’re not on a permalink page to format it using that code, otherwise do our normal thing. We have a simple unordered list with a uniquely ID’d list item. (The ID is a throwback to about two years ago when I had a heavily hacked version of b2 with monthly archives. Can’t let those permalinks break.) I get the post content directly because I didn’t want to mess with the normal filters (like autop) applied to the_content()
. I run it through texturize to keep everything pretty. Then I have a simple comment link, and finally a link that only I see that allows me to easily edit any entry. This worked great, but you can see that I have a separate unordered list for each entry, which isn’t what I want; I want all consectutive aside entries to be part of a single list. This gets tricky because you have to start the list when the current entry is an aside but the newer entry and stop it when the next entry is not an aside. Tricky tricky, and I don’t want to think what would happen if someone decided to reorder my content. I had only allocated myself ten minutes for this entire project and I was at minute number eight, so it came time for ugly code:
function stupid_hack($str) {
return preg_replace('|</ul>\s*<ul class="asides">|', '', $str);
}
ob_start('stupid_hack');
I swear that’s the actual code in my template. Put it somewhere around the top of the template, it really doesn’t matter where. It’s a hack, but it’s been working great. Simon says it is “ugly as sin,” and that’s what I thought when I wrote it. Since then, however, it has grown on me a bit. It’s like the supermodel who goes out every day dressed to the nines relaxing at home in a bathrobe, slippers, and no makeup. I keep the pretty code elsewhere, here at home I’m a little more casual. Perhaps when I have a little free time I’ll put in the more complicated logic I described above but if it ain’t broke…
i let u b u
DomainKeys
DomainKeys could change email and the markup and CSS on that page is pretty decent. Hat tip: Jeremy Zawodny.
PHP is not always open
Shelley on encoded PHP in EE and a cat in peril.
Out Of The Rut
Out Of The Rut, Into The Groove from Virulent Meme. “Uh-oh, Advocacy!”
Olympus Ferrari
Ferrari digital camera in a gorgeous red. Hat tip: Nick Finck.