Site work

Spent a few hours cleaning up the statistics. The stats on the left of the home page and ridelog page are now dynamic and created by a function call to box_score(&theYear) in boxscore.php. The formatting is handled by css.

I removed the dynamic mi/km and mph/kph selection because I figured once you’ve installed things, it’s unlikely you’ll want to switch measurement systems. I may put in a converter into the admin panel or something. And probably a calculator so you can switch from one to the other if you need to for some reason.

Also added some stats at the bottom: number of queries and amount of time it takes the page to render. I’ll probably put in a few more stat w/r/t the DB, but I’ll have to modify the DB class to do that, which is something I’m trying to avoid if possible. I don’t like modifying incorporated code (ez_sql in this case), it makes upgrading a bear. Then again, it hasn’t been updated since Sept 2003, so it looks the likelihood of that seems small. I’d also like to modify this to use prepared, parameterized queries as well, but that’s further down the TODO list. I have previously used Manuel Lemos’ Metabase, but that’s really a heavy duty system geared for database independency with far more features than I really plan on using here. It also has more files to maintain that I want to deal with for this.

I found ezSQL because it’s what this blog software uses. I’ve already run into some name collisions in some places. I’m wondering whether there would be much performance impact in collecting all my common routines into a PHP class. My hunch is that it wouldn’t matter much since there is just about the same amount of parsing going on in both, and the class overhead, generally, seems small(ish) in PHP. I’ll have to think about that, though. ezSQL has a really nice way of cacheing system settings that I’m reading through and may implement. There’s still no nice way to localize text strings, however.

Comments are closed.