Stan’s Obligatory Blog

12/28/2004

It’s bucketing down…

Filed under: — stan @ 11:18 pm

lake in our back yard
The rain is falling harder now, and for the first time in years, we are getting a little lake in the back yard. This is the first time we’ve had the lake since the El Niño of ‘97-’98. It’s impressive. We don’t get many thunderstorms here, but there’s lightning and thunder tonight.

A dreary day

Filed under: — stan @ 7:02 pm
tamales

Who says it never rains in California? Today was pouring down rain for most of the day. So I had to take my car to work instead of riding my bike. Trying to make the most of this, I stopped off on the way home so my car could get its every-other-year smog test. Like in an alien abduction, it got a probe up its butt and got measured. But all is well, and it passed.

And thus ended the dreary day.

More Wordpress geek stuff

Filed under: — stan @ 1:49 pm

A long time ago, I wrote a little PHP routine for our main home page to automatically add holiday decoration at the top of the page. I adapted it for Wordpress today. I made a file ‘wp-holidaydecor.php’ which queries the database to get the next holiday and its lead time. If there is a holiday coming up, it calls a function to insert an appropriate image from the ‘holidayimages’ directory. I had to hack the main Wordpress ‘index.php’ file and add one line:

< ?php include (ABSPATH . 'wp-holidaydecor.php'); ?>

I added this right after the ‘<div id=”content”>’ line.

The other part of this is the ‘holidays’ table I added to the database. I wrote a little Perl script that calculates the dates of the holidays and populates this table a year at a time. Right now, it’s filled through 2005.

Powered by WordPress