August 30, 2004

August 26, 2004

August 25, 2004

Quotations Page updates

Filed under: — 4:12 pm

I’ve been working on a gradual redesign and update of The Quotations Page for a while now. Last month I put the new layout online. It looks almost the same as the old layout, but it’s more flexible and the code is less messy. It still uses tables, but far fewer of them, and it won’t be hard to update to a table-free version in the future. I also made some usability improvements, like displaying 30 quotations on each author’s page instead of 10.

Today I rolled out another new feature: Each quotation has its own permalink page. Now other sites and discussion forums can link to a single quote, and I can add features specific to a quote, like the email-to-a-friend feature I also launched today. We can also add notes and cross-references for specific quotations (example).

Thanks to Apache’s mod_rewrite, PHP, and MySQL, the net result is that the site contains 20,700 new HTML pages of content. I’m eagerly awaiting Google and Yahoo crawling through all of them, and less eagerly awaiting finding out what this does to the server’s performance.

The icons next to each quote are from Dan Cederholm’s Stockholm set, which I highly recommend. They’re positioned using a floated <div> layer, which isn’t perfect but at least displays the same in IE and Mozilla.

It’s a start. My quotations site has many more changes on my to-do list: a new search engine, some personalization features, a new design and color scheme, cleaning up the code, and getting it to validate. I’m hoping to finish all of these in time for the site’s 10-year anniversary in November.

August 24, 2004

August 23, 2004

August 20, 2004

Moving to WordPress

Filed under: — 4:10 pm

Since talking to Matt at SXSW, I’ve been considering moving my weblog to WordPress, and today the deed is done. This has taken a couple of weeks to accomplish, mostly because was previously running my own homemade software. While rolling my own was a great learning experience, moving to WordPress wil let me focus my programming efforts on my other sites, and focus my attention here on the content.

Modifying the templates and CSS to get the appearance I wanted was easy, although I ended up needing a couple of WordPress plug-ins: EZStatic for the static About, Archives, and Contact Me pages, and Nick’s Recent Posts plugin for the sidebar list of posts. WordPress has a nice plug-in architecture and I had no trouble making minor changes to both of these to fit my needs.

While WordPress includes convenient import scripts for Movable Type and other popular weblog platforms, the price of being a rebel was having to write my own PHP scripts to import the content. This only took about an hour since WP has a logical database scheme. I tested my scripts by converting my wife’s weblog a couple of weeks ago, and they worked fine here too.

One major change: I’ve moved the Quick Links (formerly Quickies) from the sidebar, where nobody noticed them, and mixed them in with the regular posts. This has the unfortunate side-effect of highlighting how many days I post nothing but quick links. I’m hoping I’ll be inspired to post more regular entries from now on to avoid looking silly. The quick links were implemented using code loosely based on a technique posted in the WordPress forums, inspired by Matt‘s original Asides concept.

August 18, 2004

August 17, 2004

August 16, 2004

August 12, 2004

August 11, 2004

August 10, 2004

Object-oriented PHP and PEAR

Filed under: — 11:46 am

Despite being pretty familiar with object-oriented programming, I’ve managed to do all of my work in PHP so far without using objects. My reasons included PHP’s minimal support for objects in earlier versions, the ease of non-object-oriented PHP, and the fact that I wasn’t programming anything terribly complicated.

I decided to introduce myself to objects in PHP and found PEAR, the PHP Extension and Application Repository. This is a nice library of pre-made PHP packages to solve various problems. I don’t know why I always looked at the CPAN libraries first thing when starting a project in Perl, but never considered doing the same with PHP.

PEAR includes a few tantalizing packages: the Mail class can probably solve my never-ending problems with PHP’s email features. There’s an interface to the Google API. And a ready-made database abstraction layer. I’ll definitely be spending some time exploring PEAR and kicking myself for reinventing various wheels.

(c) 2001-2007 Michael Moncur. All rights reserved, but feel free to quote me.
Powered by WordPress