Site Stuff

With the exception of the "Preview" button, my blog now renders identically in Mozilla and IE6.  This was way harder than it should have been, thanks to IE’s broken box model, which among other things includes an element’s padding in its width, making cross-browser pixel-perfect sites well-nigh impossible.  (How many hyphenated words can you use coherently in a single clause?)  The main thing here is that the amount of space between posts, and the amount of space above and below the body of each post, should be the same in both browsers.  I don’t expect it to look correct in IE5.x, because its box model is even more broken, but I also don’t have a system with that browser to test on.  (Steve says it renders like crap on IE5.x/Mac, but didn’t send me a screenshot, so I have no idea.)

In slightly more exciting news (if you’re a geek, anyway), the blog script itself can now also function as a calendar script, so that for example bands could use it to post concerts, teams could use it to post games, or more generally, groups could use it to post meetings/events.  From the user’s point of view this probably doesn’t seem much/any different from they way the blog is used on my site, but it’s actually very different internally.  Meetings need to be displayed in chronological order, instead of in posted-order, as my posts are.  For instance, today you might make a post about a meeting next month, but then tomorrow make another post about a meeting in 2 weeks.  The 2-weeks-away meeting needs to be displayed before the next-month meeting, even though it was posted later.  Furthermore, you probably want upcoming events to be displayed separately from past events.

Because of all that, the best implementation is probably to make the filenames be the dates of the events, instead of the number of the post, as on my site.  But I want a single script to function as either an event-blog or a normal blog; I don’t want to maintain two separate scripts, because that’s difficult and time-consuming, especially when 95% of the functionality is identical.  So, I added the event-blog functionality into the main blog script, and added a preference to the prefs file that allows one to choose whether the blog is a normal blog, or an event blog.  If it’s an event blog, then the posting form has extra fields where you enter the date and time of the event.  And at the bottom, instead of having a "list all posts" link, there are "past events" and "upcoming events" links.  This also required a lot of internal work that the user won’t see; for example, on a normal blog, the post after 327 is 328, but on an event blog, the post after 2003-12-31 is not 2003-12-32.  So there are now functions to calculate things like that in event-blog mode.

Back when the OAO site was still in existence, I turned my blog into an event blog for them to post concerts.  But I didn’t do it in the best way, by adding the functionality into the main blog script, because that would have taken a lot of time and effort.  It was quicker and easier to just modify it and forget about it.  But that meant that it was twice as much work to add new features later.  Now, it’s done correctly.

So, any bands or other organizations needing a calendar like this, you know who to call.

Posted by Anthony on reply

Reply to this message here:

Your name
Email
Website (optional)
Subject
search posts:

HomeCreate PostArchivesLoginCMS by Encodable