A bit of Christmas cheer

The people in my condo really go all out for Christmas, so I walked around and took some photos of the decorations. The D90 still continues to impress and amaze me with its performance at high ISO settings. I simply used Aperture priority with the widest aperture and auto ISO with a maximum of 3200 when I took these shots.

DSC_1666

The D90’s video capability also came in handy.

Sticky Posts in WordPress 2.7

One of the new features in WordPress 2.7 is “sticky” posts, which will always appear at the top of the home page. The option is pretty well hidden, so unless you know where to look for it, you probably won’t find it.

In the edit or create post screen, there’s a publish options box which lets you specify the visibility for that post, with an ‘edit’ link next to it.

publish options.jpg

Click the edit link and it will expand the box to show the options, including a ‘sticky’ checkbox.

Publish Options Expanded.jpg

You can test for sticky posts in your theme using is_sticky() and change the appearance to highlight those posts.

In the theme’s index.php, alter the class of sticky posts with code similar to this:


    <?php while (have_posts()) : the_post(); ?>
       <div class="post <?php  if (is_sticky($post_id)) { echo 'sticky'; } ?>" id="post-<?php the_ID(); ?>">
 ...

Finally, add a ‘sticky’ style to the theme’s style.css, for example:


.sticky {
	background: #dde;
	padding: 5px;
}

links for 2008-12-03

  • While Obama is to be commended for wanting to cut the Pentagon budget, he should do more than just cut. He should cut intelligently, promoting innovative programs that are key to modern peacekeeping and state-building and scrapping those that are proven failed or outdated. A program such as missile defense, both an obvious error and a relic of the Cold War, should be first on the chopping block.
    (tags: obama policy)

iPhone developers can now give free promotional copies

Apple now allows developers to issue up to 50 promotional codes for each version of any application in the store. The codes allow the recipient to download a full copy of the application. Currently they can only be redeemed in the US app store.

This makes it a lot easier for developers to send out review copies. Until now, it was necessary to build an Ad-hoc copy of any non-free application, which required providing the device ID of any iPhone or iPod it will run on.

iTunes Connect
Uploaded with plasq‘s Skitch!

Adding more books to Coda

Coda is my favorite web development environment on the Mac, combining a syntax-aware editor, a visual CSS editor, and an FTP client that can sync local changes to the web server. Until I read this item at Dra Studio, I had no idea you could add custom books to Coda.

Adding books to Coda is very simple – simply click the ‘+‘ button at the bottom of the Books page and enter the book title, main URL, and a search URL. You can find URLs for some useful books to add at Dra Studio & SitePoint.

I find the WordPress documentation (codex.wordpress.org) especially useful when working on WordPress plugins or themes.

Coda
Uploaded with plasq‘s Skitch!