WordPress Post Thumbnail Generation

Posted by & filed under WordPress.

Information about the WordPress 2.9 post-thumbnails feature and how to enable it, as well as some example code that uses the post thumbnail if it exists, or else falls back to the first image found in the post. You can build upon this code to use some sort of generic pic if neither is found. This technique is very useful for building a news homepage showcasing excerpts from each story.

Git “not uptodate. Cannot merge.” Errors

Posted by & filed under Web Development.

These errors when going a “git pull” can be very confusing. They indicate that there are local changes that would otherwise be obliterated, and you are prevented from continuing unless you commit your changes, move or delete the file before doing a pull, or the workaround provided on this page…

Using the Return Key to Submit a Form

Posted by & filed under Javascript/YUI/jQuery.

Using Prototype we can capture the return key (and other key presses) to replace the usual form submission with our own Javascript functions. This is useful for invoking some Javascript-based error checking on the form prior to submission when the user presses their return key, or invoke a search triggered by the return key. Code samples included.