Dougal Campbell's geek ramblings

WordPress, web development, and world domination.

CSS: The One True Layout

I had recently been using Alex Robinson’s 3-column CSS technique called “ordered columns, float-margin/float-margin” for some website designs. But he has superceded that with the One True Layout. OTL combines methods for source-ordered columns, techniques for equal-height columns, and “vertical grids” to provide a flexible method of creating complex page layouts, while maintaining a minimum of markup clutter. Plus you get to keep your content sections in a logical sequence.

Check out the examples for an idea of what you can achieve. In particular, look at the Nested Rounded Corners example. Then look at the table version at the bottom of the page. Note the difference in the source order. The table version forces you to reorder the information in ways that wouldn’t make sense if you were trying to decipher the HTML source (I’m speaking of all the “block N top” and “block N bottom” elements). The OTL version keeps related bits of information together in a straightforward flow.

This is going to take some time to properly absorb…

via: webgraphics

Sorry for the downtime

Whoops! I made a change to my template code yesterday and broke the site without realizing it. I thought I had verified that the code was working, but I must have pulled the page from my cache. It’s back now (duh, as you can see)…

Snoopy PHP Webclient Security

There is a security advisory out regarding a Snoopy PHP Webclient vulnerability. Since WordPress uses Snoopy internally, we immediately double-checked to be sure that WP isn’t affected. It’s not.

WordPress uses Snoopy internally to fetch RSS feeds for display in the
Dashboard. But by default, all the URLs are hardcoded, and thus not vulnerable to the bug mentioned above. The only way that a WordPress site could be affected is if it had some sort of plugin that allowed users to supply custom feed URLs to the system, and the site had users that the admin could not trust (and who had enough access to provide their own feeds to the plugin).

Finally joined the Tivolution

We finally got a Tivo. I bought an 80hr model off of eBay for $150. It arrived about two weeks ago, and I finally installed it last weekend. We set up some of our favorite shows as Season Passes and put Bruce Campbell in my actor wishlist (hey, I forgot that he was an extra in Darkman!).

We’re just starting to get used to it. One of Susan’s favorite features is the Guide (“You mean I don’t have to watch that stupid TV Guide Channel anymore? If I had known that, we would have gotten Tivo years ago.”), and we’ve taken advantage of the ability to rewind live TV shows a couple of times.

The next big step will be getting it on our home network. Then we could use listen to music, do online scheduling, view photo slideshows, or use TivoToGo to copy shows to our laptops for viewing while out of town. I’m also hoping that we can get a second unit for our family room one day, and then we’ll be able to use the multi-room viewing features.

Then the next thing after that is to get a better television. Our current TV sucks a bit. The image isn’t bright enough, and we can’t seem to get it any brighter, and I can’t get the Tivo remote to talk to it. So, maybe we’ll pick up something bigger and better at the big after-Thanksgiving sales.

IE7 and the demise of CSS hacks

As mentioned previously here and elsewhere, Microsoft is working on Internet Explorer 7, which will have greatly improved CSS support. The IE7 team has posted an article about the demise of CSS hacks and broken pages, warning that the hacks often used to target CSS specifically to work around old IE bugs may be unnecessary under IE7 when in strict mode. So, IE will finally have improved support for standards, but all of our old hacks could cause breakage in the new browser. As Monk would say, “it’s a blessing and a curse.”

The recommended workaround is to use IE’s conditional comments feature to load a stylesheet with rules specifically for IE6 and older. For example you might put something like this in the <head> of your document:


<link rel="stylesheet" type="text/css" href="compliant.css" />
<!--[if IE lt 7]>
<link rel="stylesheet" type="text/css" href="ie-rules.css" />
<![endif]-->

This would load the compliant.css file for all browsers. Then, the conditional comment would load the ie-rules.css file only for Internet Explorer with a version less than 7. All other browsers (including IE7) would ignore this comment. [Note, however, that this hack doesn’t apply to the specific Slashdot example used in the IEBlog article. Read the comments to see why.]

Note that this only applies if you are using IE-specific hacks in standards-compliance mode. This includes hacks which target rules to only work in IE (like my favorite, the star html hack), or rules that only work in compliant browsers (like the child selector hack). And it may not be necessary in all cases anyhow, depending on how you are using those rules (the main problem is probably going to be that the star html hack won’t work in IE7 even in quirks mode). Theoretically, if you are using quirks mode, then you can probably just continue using your old hacks. However, I think most of us would probably prefer to keep to the standards whenever possible.

My tug boat

My Tug Boat (view full size and look at the name on the side)

I bet you never knew that I had a tug boat in Alaska, did you?

Thanks to my friend Akash, who spotted this when he was on an Alaskan cruise this summer.

Oh, and for those of you who haven’t read my About page, my first name is “Ernest”. “Dougal” is my nickname.

Software taxes

Most states charge sales tax for “products”, but not for “services”. So, if you go to the store and buy a can of beans, you are charged tax. If you hire a lawn service to cut your grass, you are not.

Due to the way that commercially sold computer software is typically licensed, most states didn’t charge sales tax on it. Until fairly recently, anyways. I vaguely remember grumbling about it about ten years ago when Alabama changed their tax codes to allow for sales tax on software. After all, according to the software publishers, you don’t “own” software, you only license the right to use it. This makes it closer to a service than a product. But, heck, it’s only a few percent, so it’s not worth raising a ruckus about, is it?

Well, maybe it is. Ed Foster digs deeper into the issue in his article about Paying Taxes on Software, and explains some pitfalls that most of us have never considered. In particular, the software license model affects how businesses handle their tax accounting. There may even be an argument for turning the tax burden back around onto the producer, not the consumer.

“If the software is licensed, then the originating company owns it and they can pay the property taxes on it,” wrote one reader. “I have to pay property tax on all the computer hardware and software used in my business virtually forever or until I declare it obsolete and no longer used. This is subject to audit by an agent of the county whose audit is accepted by the IRS as valid. If I rent a car as a business expense, the property taxes are paid by the owner, not me, except as incidental through my rental payments. It would serve these software developer thugs right to have to pay property tax on every sale they make to every end user in every state. If they refuse, then the software is automatically recognized as owned by the buyer, not leased.”

See also Ed’s article on how a typical EULA attempts to negate your right of First Sale. Granted, as pointed out by one of the commenters, the U.S. Code deals with First Sale exemptions for possession of copyrighted works “by rental, lease, loan, or otherwise, without acquiring ownership”. But the questions raised about whether or not the purchase price of software is eligible for depreciation calculations are still worth debate.

Also, consider that commercial media such as music and movies are treated similarly. You do not “own” your copy of “The Matrix”. Your purchase of the DVD just buys you the right to watch your licensed copy. This is one of the loopholes that the entertainment industry attempts to hang you with just because you want to copy MP3 versions of a CD onto your iPod.

Helping Hurricane Victims

Do you wish that you could help a victim of Katrina or Rita? Do you have items that you think they need, but you aren’t sure where to send them? If you knew what somebody needed, would you like to be able to get it directly to them?

The Been There Clearing House is “an informal clearinghouse in which individuals offering in-kind donations and individuals in need can connect.” You can read the stories of those affected by the recent storms, donate or request goods, or adopt a family.

These stories are starting to get less media coverage now (except for some of the finger-pointing), but there are still many, many people who need help. Please spread the word about the clearinghouse. And be sure to visit the site and see if there’s something you can send to someone in need.

When Emily (one of the clearinghouse founders) contacted me about converting their site to WordPress, I really wanted to help, but I wasn’t sure how. I forwarded her request to the wordpress-hackers mailing list, and she quickly had a couple of volunteers helping with the move. I’ve been able to help with a couple of minor details since then. It’s good to know that the WordPress community has a part in getting help to people who need it.

Woof!

We’ve been talking for a while about getting a dog. We had been leaning towards a golden retriever, but now we’re looking into maybe getting a border collie, due to their smaller size, and because they’re just darned cool. We know that, generally speaking, border collies tend to be very active. But we’re hoping to locate one that has a more laid back personality.

We figure that the pet that best matches us would be an indoor dog. But he (or she?) will be able to get daily exercise, because we’re sure that our oldest daughter would love to take him outside after school for walks or for chasing frisbees and such. Plus, Susan and I will want to take him for walks, because we could use the exercise ourselves.

We’ve been checking with local animal shelters and rescue groups (via PetFinder, PetsUnlimited, etc), but every time we find one that we think might be a good match, we find out that he’s already been adopted. And we’re also a little put-off by the paperwork and fees that these places are asking for. Some of the rescue groups have adoption fees that are higher than purchasing an AKC registered puppy from an independent breeder. And as Susan said the other day, we didn’t fill out that much paperwork when we brought our baby home from the hospital! When we were growing up, “pet adoption” meant that when a stray showed up in your yard, you fed it. There were no questionnaires, adoption fees, or home inspections — if he stuck around, he was yours.

So. If anyone has any leads on a border collie (can be a mixed breed) in the Atlanta area that needs a good home and matches what I’ve described above, get in touch! We’d prefer a dog that’s probably 2-5 years old, not a puppy. He will also need to be good with children. In fact, one of the reasons we want to get a dog is for our son, Jamie. He has had pet therapy before, and reacted very well to it. He loves animals, and the ones he’s met love him, too.

Photo Galleries

A while back, I asked for recommendations for photo gallery software. I still haven’t picked one (I’ve been using Flickr in the meantime), but I’ve been keeping my eye on Plogger as a strong contender. But today I ran across another good one: zenphoto. Both projects are working on WordPress integration, so I can’t wait to see where these projects go.

Sample default setups: Plogger, zenphoto

I heard about zenphoto via: Broken Kode