Archive for the ‘Weblog’ Category

Pedantic Hypertext Markup Goodness

Thursday, October 6th, 2005

The W3C’s online markup checker doesn’t throw errors on this yet, but URI’s are not supposed to have spaces in them, at least not in XHTML Strict. So code like this:

<a href="javascript:void window.open('#/email.php?p=#', 'etc.');">
...</a>

is no good. For those unpracticed in HTML, the URI is everything in the “href” part of the a tag, and there is a space between “javascript:void” and “window.open.” This error came to my attention thanks to Marc Gueury’s HTML Vaildator extension for Firefox, which uses the HTML Tidy program to check for web standards compliance.

These javascript-infused links are used for the E-mail and Print Post features, and the javascript causes the link to open in a new window/tab instead of the current window. Now, the classic, standards compliant way to open content in a new window is:

<a href="#"
onclick="window.open(this.href); return false;"
onkeypress="window.open(this.href); return false;">...</a>

This way uses mouse and keyboard event handlers to fire off window.open, instead of bundling it into the URI itself, spaces and all. This is more accessable for those who have javascript turned off. For those people, the link will now execute – before, they got nada – it just won’t open in a new window. So I changed the code in my template to this:

<a href="<?php bloginfo('stylesheet_directory'); ?>/email.php?p=<?php the_ID(); ?>" onclick="window.open(this.href, 'etc.'); return false;" onkeypress="window.open(this.href, 'etc.'); return false;">...</a>

for both the E-mail and Print functions (with appropriate changes for the latter) and volia, the blog is validating again/for real!

People! Please!

Monday, September 19th, 2005

To my fellow classmates and blogger.blogspot.blah users, please lend me your ears and enable anoymous comments to your blog! Sometimes – and I know this is hard to believe – sometimes people would like to leave comments to things YOU’VE written about arcane media theories, sometimes these comments aren’t spam, and sometimes these people don’t have a blogger account and have no need for a blogger.blogspot blog. And sometimes these people are me. I’ll probably break down and get one, but others should not have to suffer the same fate!

Home Improvements

Monday, September 5th, 2005

The template has been batted around a bit, with the content area having grown at the expense of the columns. The template author favored very wide columns, as seen here, that together are wider than the content area. In the example picture he only uses unordered lists, and I can tell you why; paragraphs get a little smushed. Default font sizes were also a little bizarre, and did not seem to have taken Owen Brigg’s Sane CSS Typography tutorial to heart. Hopefully the blog is more readable to everyone now.

The template itself is entirely fixed width: the page, the columns, the content, the header, all defined exactly in pixels, which I am not thrilled about, but what can you do? I don’t have the time to make my own template or sort through another 200 looking for the rare template that looks good, validates and stretches to fit different resolutions.

Speaking of validation, most of the little errors have been fixed, chiefly involving failure to add alt tags to images and then close their tags, the latter an innovation of the very specification the template author chose to build his template against, and the former an accessibility requirement since the dawn of the web. Sheesh.

Blog has been upgraded to XHTML 1.1, because changes were trivial, and now the CSS validates too.

Bless this Mess

Sunday, September 4th, 2005

As you are no doubt aware, the blog is up. Its a more-or-less default WordPress 1.5.2 install on top of an Apache webserver provided by 1and1 Webhosting. I have built a few websites by hand in XHTML 1.1 and CSS, and have dabbled a bit with Javascript, but this is my first time using any kind of CMS, which blog software kind of qualifies as.

So far I am impressed. I did a fair bit of research, and WordPress seemed to be the best of the free-as-in-speech breed. They promise basic setup in 5 minutes and it was essentially that easy, though theme selection took a bit, thanks to the cumbersome load times of most online directories. The current theme, whose credits you can check out in the footer, throws out some weeny little errors in validation, so I can look forward to aquainting myself with the theme-editing capabilities of WordPress in the near future.

That and I need a real domain name. Blahblahblah.onlinehome.us is hard as hell to remember, even for me. Too bad .tk addresses require a certain number of ad impressions a month to keep. Perhaps I’ll end up caving in and buying a domain name.