Wednesday, October 18, 2006

What To Do When You Don't Know What To Do

One idea is to dive into something you know very little about, just for the fun of it.

Any of you who have been reading this blog for a while know that I have tried quite a few different layouts, and just recently I stripped it down to a very minimalistic style, with only a picture header as a personal touch. Except for the color choices, they are mine too. But I get very easily bored, and I want to fix the template all the time. Rather stupid, but I found a way to justify it this time. To really reflect the kind of person I am, I thought it would be cool to have a random picture in the header, and I was quite sure I could find something in my JavaScript book. Except for the fact I didn't want to use JavaScript. A Google search for "random picture header" sent me to PhotoMatt, and I immediately started some serious copying&pasting, while also preparing a few pictures for the folder which everything should go in. This is PHP we're talking about, which applies to my opening sentence, i.e. I know very little about it, so when it didn't work I really couldn't figure out why. I suspected it had something to do with Mozilla; I love Mozilla, but sometimes they're just handling things in their own way.

Sure enough, it had to do with how Mozilla handles image caching, and after reading comments on Weblog Tools Collection I found a very useful one from snuf, who directed me to A List Apart. Now why didn't I think of that? Should've remembered how good that site is. Anyway, more copy&paste, and then off with everything to my server, and the result is here. But like one of the comments said; it's not like the users are going to hit the reload button every fifteen seconds, it's more that they get a different picture each time they visit the site. Maybe not all that exciting, but at least I had some fun.

Now I just have to update the photos once in a while. But that's really one of the benefits with PHP compared to JavaScript, as you don't have to alter the code everytime you put new pics in your image folder. Neat. Just like programming should be.

2 comments:

Anonymous said...

Cool, I love it :)

(better not write anymore!!)

Karin said...

Thanks! (Even shorter. If I hadn't written "Even shorter"...)