Date: 2008-11-02 11:52:02 Created: null
Ah, that's a bit more like it. The blob just became a normal image instead of a background in a DIV, and the stupid stylesheet additions are gone. The small pleasures of life ...
Later in the evening ...
Speaking of small pleasures, I've probably spent a few hours by now eliminating duplicated code. It started with a mild-mannered wondering how many lines of code the whole site could be, passed over the download of a trial version of a line counter and then dove straight into the depths of using CPD and slavishly plowing through the results.
Okay, so I haven't gone through all the results, and I don't think I will either because I went with the standard 75-token threshold, but I've done quite a few large ones and it's always fun to see your own code clean itself up and become just a bit more general.
Today I gave the blob the ability to look different depending on date and time. The solution's rather crude but it does what I want and should be constructed reasonably enough that I won't need to tear everything up if/when I come up with a better way of handling it. Ideally I'd like to be able to add new images and when to show them with a bare minimum of new code and not have a long line of if-clauses doing the dirty work. But hey ... it works and it was the quickest way to make it work with any time period I like.
In any case, the future of the blob looks bright, ugly plumbing or not!
Something I'm almost certain to change soon, however, is the way the blob's put in the acutal page. The way I do it right now I need to add to the stylesheet for each and every blob I add ... No, I have no idea what I was thinking when I did it ...
As you probably notice I've started adding some graphical ... flair to the site. My first reflex was of course to save the images in gif. But then I realized that using png instead makes for much better transparency. Even if it doesn't matter much right now I like knowing the images won't look horribly jaggy even if they end up over some colour I never thought of.
On the downside, file sizes are larger (apologies to any 28,8 modem visitors) and the transparency doesn't work even in the latest versions of IE. We'll see, perhaps it'll bother me enough that I do something about it.
Yesterday I started working on a nicer search page. The goal is to be nicer mainly in the code sense, the current solution is ugly, bloated and feels needlessly difficult to even think about. But it should pay off for actual users in the end too, the new search page will at least be more flexible and allow you to search among more than one type of content at once. I created a fancy query with a couple of joins which gives me all the results from all sources in one set, enabling me to throw everything out to the result page in the same way. But now, after realizing that made it rather hard to know where to link those results (is it a comment? Is it a page? Is it an exernal?) I'm seeing the light and benefits of using separate queries and presentation for each content type. Keeping it simple never hurts, trying to outsmart yourself (and/or your server) often does.
(Yeah, I marked this the 28th despite the news and time saying 27th, but they're GMT and I'm GMT +2 right now. You know how it is, the fun never ends ...)
The style sheet improvements on the development site continue. The style sheets with the rules for seasonal variation now contain only the exact rules unique for that period, all the repeated stuff goes into the basic sheet. No good reason for not doing so before, just lack of thinking about the matter I guess. Also made some nice use of inheritance and, thanks to Niclas, old crusty things like Netscape 4 now won't get to see the style sheets at all (how? Turns out they don't understand the @import directive, so using it instead of linking style sheets keep them from noticing them), thus presenting something rather more readable than before.
More fun in development land. Today I took the bold step of moving the menu with sub pages and externals to the right side of the main content area and make it work nicely with both recent Internet Explorer versions and high as well as low resolution screens. I've narrowed the main area a bit, which gives space for the menu on the right side even in 800 by 600 pixel situations. Things also stay nicely centered without running off in all directions even if you've got a super-wide browser window.
The Netscape 4 situation is the same as yesterday. Really, it would be nicer if it didn't read the style sheet at all. I wonder if that can be arranged somehow ...
Streamlined image handling wasn't the Next Big Thing after all. After a little bit of research and testing over the weekend my development version of the site validates as HTML 4.01 strict and has got rid of all those pesky tables I've used for layout in the past. I also went through my style sheets and made them a bit more managable. instead of three copies of the same style sheet with only a few colour values differing each sheet now only includes the actual differing rules and import the rest from a common style sheet. Much nicer, but I have a feeling I can make it all even smoother with some more reading up. We'll see. None of this has been uploaded yet, but it will be soon unless I think of some really good reason not to. It looks good in modern browsers and broken-but-totally-usable in Netscape 4 so I feel good about compatibility. At least for now.
Got my file uploading page to work today. Setting the right permissions was all it took, and the right (and relatively logical, too) combination was of course about the only one I hadn't tried. Now I just need to integrate the page a bit better into the rest of the site and I can actually start using it if I like. Might come in handy.
(But then, how often do you have web but not FTP access? I'm the only user, and using FTP doesn't exactly feel slower ...)
The next larger thing I'd like to do is streamlining image handling, especially uploading and perhaps mangling them into the sizes I like as well, and a page like this might be a good start.
Finally sat down and did some updating of the code behind the site today. It's very minor when counted in number of actual lines fixed, but I had no real idea how large or small it would be when I set out to get started. What I've done is stopped using the old and potentially less secure session variable handling systems of PHP and switched to the newer options. My webhost didn't require this, but they might one day and the unmodified (and much more up to date) installation of PHP and MySQL I've got on Pomum wouldn't preserve my session variables at all before. Now it does without needing the old register_globals. The site now works just the same on Pomum as on the webhost as well, no differences in code at all. I'm not sure it's ever done before, if it did it was only for a very short time. All's well, and hopefully the updates will continue. I've got some more ideas ...
There, fixed a little slash bug in the autolinker ... Anyone else want some?
I also did another change nobody but me should notice today, in making it easier for me to link externals to texts. And the RSS feeds went up a day or two ago of course ... And everything's been so easy it's almost a shame I didn't get around to it earlier. But that's the way things work ...