Kimler Sidebar Menu

Kimler Adventure Pages: Journal Entries

random top 40
Filed in:Web Dev
CSS·XHTML·The Web

Computing Tips

February 11th, 2005  · stk

My (ever growing) repository for useful computing tips, organized by category. I hope that you find many of them useful.

Browsing

  1. Expand ALT text (MSIE Only) - You probably already know that when a picture fails to load (the file name is wrong, or missing, etc.), the alternate <alt> text is displayed. A lot of times, it's cut off.

    What you may not know is that there's a browser setting that fixes this behavior.

    Tools -> Internet Options -> Advanced Tab -> Accessibility -> (check the "Always expand ALT text for images")

    Another default setting that was dropped through the cracks.


xhtml (Strict)

  1. Opening Links in a New Window: Using frames, it's as simple as specifying the target window for a link. Today, with CSS & XHTML, it not that simple. The "target" attribute is obsolete in XHTML strict and nothing has been offered up as a replacement. So how do you open a link in a new window?

    This is one of those areas where the idealism of standards and the needs of the real World collide. There is no panacea, only tradeoffs.

    The method I've been using, involves the javaScript "window.open()" function, but provides a backdoor for visitors who have javaScript turned off or have a pop-up blocker in place. The code:

    <a href = "pg-noJava.html" onclick = "window.open ('pg.html'); return false">
    or

    <a href = "pg.html" onclick = window.open(this.html); return false">

    This approach is valid-XHTML, and many browsers will execute it. However, they may neglect to pass along the referrer (the tradeoff). This method results in a new window for many older browsers too, provided that javaScripting is turned on.

    If you include a javaScript "window.close()" function, inside the new window, to return the viewer to the main site, you might need two pages (one with the close() and one without), unless you use a PHP script to decide whether to show the close() or not.

    The "return false" keeps the originating page from loading the linked page, IF the javaScript is sucessfully executed. And if the javaScript cannot be executed (for whatever reason), the visitor is linked to a non-java page, degrading to a regular link, loading into the same window.

    EVERYONE gets to see the page.


Site Admin

  1. .htaccess file

    We got our domain in Dec04. For the first month, we just moved files from our old domain. The 2nd month, we made some changes. After the 2nd month, we noticed that anyone can anonymously browse our directories. Ack! :( This is NOT what we want.

    The place to change this is the ".htaccess" file, which controls directory behavior and works in a cascading style. (Control them individually, by placing a .htaccess file in that directory -OR- control them in a cascading, directory-tree-fashion, via one file, sitting higher up in the tree.)

    The second method is what we are currently employing. Our single .htaccess file is in the top-level directory and looks like:

    # Turn on XbitHack for Server-side includes
    XBitHack full

    # Look in htm/html files for php commands
    AddHandler application/x-httpd-php .htm .html

    # Turn OFF external access to directory indexes
    Options -Indexes

    We don't use SSI now, preferring PHP include statements, which makes parsing PHP important (the second bit). Turn off external directory browsing by turning Indexes off (-Indexes). A browse now results in a 403 message, which we can customize.

    Type randsco.com/openDirectory/ in your address line, to see what having Indexes on (+Indexes) looks like. Then try randsco.com/media to see the Indexes off (-Indexes) behavior.

    For more information on what you can do with the .htaccess file, read these:

    Have a look at the effect of turning Indexes off. First, type randsco.com/openDirectory into your address box. THIS is what it would look like if you have Indexes ON. Then, type randsco.com/SlideShow into your browser address box. Instead of an index listing, you will get a 403 "Forbidden" message.

(Permalink)
Views: 4411 views
Leave a Comment · GuestBook
default pin-it button
Updated: 24-Nov-2007
Web View Count: 4411 viewsLast Web Update: 24-Nov-2007

Spring in January?

February 6th, 2005  · stk

It's tough to complain when temperatures get to nearly 50°F(10°C) at the end of January, in Edmonton (but watch us)! My father, who lives in northern California, said that Edmonton was actually warmer than where they are (but only in the morning as their temps climbed into the 70's, later in the day. Not here. We've generally been below freezing most days and it's not uncommon to be at or below 0°F(-17°C). We had one bad cold snap, where the news shows were warning that with wind-chill, it was getting to be below -49°F(-45°C) and that exposed skin would freeze within minutes. Advice - stay indoors.

Schools don't have 'snow' days in Edmonton (if they did, all the kids would be pretty dumb ... or ... they'd never have a summer vacation because they'd have a LOT of days to make up)! Nope, they have 'too-cold days' (don't know what they're officially called), but school is closed when it gets too cold. The bad part? Ski resorts are closed when it gets too cold too! So, the kids are stuck indoors, waiting for tolerably cold weather.

Because it's our first winter in Edmonton, we're pretty aware of the weather. We're pretty much housebound, especially with Alex, because she just can't handle that kind of bitter cold. We ARE getting stir crazy. Thank God it's sunny a lot, not that Rachel would notice though, because she's usually sequestered in some classroom, or laboratory, or the hospital. Alex crawls onto the chest that's in front of our big picture window and looks out at the wintry scene, chirping at the birds, which stop by to eat seeds from the suet that's hanging from the eaves. "Cheep, cheep," she says, smearing a slobbery hand against the glass, excited to have spotted a bird. It's difficult to imagine birds staying the winter, but the Magpies, Red-Breasted Nuthatches, Black-Capped Chickadees & Sparrows are all here (playing 'King of the Suet'). The cat finds looking out the picture window a bit frustrating, seeing 'prey' only inches from his nose. He has a distinctive, "ack, ack, ack" sound he makes when he spots birds and we just figure that he's more annoyed because he feels obligated to chase the birds when, in truth, he wished they'd just go away so he can nap.

The cold means having the car on the block heater, which (fortunately) we haven't had to use very often. However, the cold and snow is a deterrent to go out, so on really cold or snowy days, we just stay home, unless we absolutely must go somewhere. Rachel walks a couple of blocks to catch the bus, which takes her to the light-rail & a 40-minutes later, she's at the University. The snow means having to shovel and it's MUCH easier, now that we bought a real 'snow shovel'! The walkways are easy and it's nice to get outside. I work up a sweat, doing it, so it's not a cold task. However, the driveway along the side of the rental house is narrow and is difficult to clear. There's no room to pile the snow, so I've been using a 109-liter plastic trash can to move it to the back yard. My record: 36 trips! That's a LOT of snow!

There is a trick to shoveling, we've learned. You've got to get it BEFORE anyone has walked on it. Once it's compacted, it can be really glued to the cement. If that happens, the walk is uneven, or worse - (if the temperatures are right) - it will melt and turn to ice. Nothing short of a chisel, a blow-torch (or precious warm sunshine) will level the walk again.

The recent warm spell, though much enjoyed, caused its share of headaches. There were enough warm days to melt a lot of snow, but far from ALL of the snow. So, by day the roads were slushy, wet & dirty. At night, they were deathly slick ice-rinks. Rachel has fallen hard, more than once, making her way down the dark sidewalk at before 7AM, on her way to catch the bus. The walk around the block that Alex made? It took an hour, mostly because of Alex's curiosity with EVERY dog we met, but also because SHE slipped and fell a lot. Warm days meant slick sidewalks and chilly-cold puddles. Poor Alex was soaking wet when we arrived back home, sore from falling & her hands red and raw from trying to get up. Still, we both needed to get out and the air temperatures were pleasant (in the sun).

The cold is back again (and more snow). Shoveled yesterday and again today. This California boy complained to Rachel, "At least in California, you'd get a break from yard-work in the winter. Mow in the spring and summer, rake leaves in the fall, then watch football all winter long! Here? Mow for three weeks in the summer, rake leave starting in August, and then shovel snow the rest of the year!" She didn't laugh.

If we think that the winter is hard on us, well, all you have to do is think about poor Tuxedo. This poor "born & lived in British Columbia all his life" cat, has (until this year) probably seen snow for all of 20 days of his entire life. And now, not only does he have -45°-weather to deal with, but finding a snow-free spot to do his 'business' is neigh to impossible! (He takes advantage of the cleared walks, by gingerly backing up to the snow (without his paws into it), hanging his rear-end over the snow! It's a sight. If the walks are snow-covered, he dances around (it's gotta be cold on the paws) venturing off the path, using one of my deep footprints as a potty spot. We built him a small, pillow-lined and waterproof box that he uses to stay out of the weather. Generally though, he's not out that long.

As if this poor cat doesn't have enough to contend with by dealing with the snow, the house is hardly a haven for him, with Alex squealing and chasing him around. We used to let him hang out in the large basement, because we generally discourage Alex from wandering down there alone. He became the invisible cat, because the only time we saw him was at dinnertime. And sometimes, we shut the basement door, just to enforce the 'upstairs rule' with Alex. Oops. Guess poor Tuxedo needed to go out and there wasn't anyone to ask. (Or he just decided, "The heck with going out, I'll just find a spot HERE.") Either way, we discovered a couple of 'presents' in the far corner of the room (by olfactory senses FIRST) and have had to institute an "upstairs rule" for BOTH Tuxedo and Alex. Besides, we figure that the best way for them to adjust to each other is put them in the same space. So now, Tuxedo has his 'cat bed' right beside Alex's highchair (smack dab in front of the heater register, which he LOVES). "It's not so bad," he figures, "Alex likes cheese. I like cheese. Alex is clumsy. I am quick!"

We're all having a tough time with our first Edmonton winter. The big question? When's spring? April? May? Answer: not soon enough!

(Permalink)
Views: 9774 views
1 Comment · GuestBook
default pin-it button
Updated: 15-Sep-2006
Web View Count: 9774 viewsLast Web Update: 15-Sep-2006
Filed in:CSS
b2evo·XHTML

CSS Photo-Caption Zoom

January 31st, 2005  · stk

Finally ...

On the left is a demonstration of the original version of photo-caption zoom. It's a pure-CSS, XHTML-valid, image/caption zoom method. Move the cursor over the image and it will 'zoom' (pop, explode, magnify) to reveal a larger image with a caption. There are a number of image rollover techniques, but this is the first that combines an image with a caption. It looks nice and saves page real estate, sitting as a small thumbnail, until the reader decides otherwise. Most important, the method is practical and easy to implement.


PZ3 Update: 10-Mar-2007 - Fixes for an IE7 bug (multiple right-floated images) & a work-a-round for IE6 and IE7 in quirks-mode.

Added July 2006: PZ3 is here! It's more robust, lighter and REPLACES PZ2. Compared to PZ2, PZ3 is easier to use, needs 72% less code, overcomes a pesky IE z-index problem and can use an infinite range of image sizes (image size is specified in the XHTML, not the CSS). Like PZ2, Photo-Caption Zoom version 3 overlays text. (See demo on the right).

Added Oct 2005: I've developed a more robust "version 2" (named "PZ2"). It adds functionality (and complexity) to the original, PLUS has the added capability to OVERLAY text (no more "element migration" on ZOOM). It is demonstrated here on the right.

A single image is used for both the small and large views. (No need to have a large and a small version). The width is the only size parameter needed (the surrounding <div> expands to the appropriate height). To float the image left or right and to use different images sizes, just use the appropriate class names from within the HTML (no need to modify an external CSS file).

This code is a result of my recent inspiration and chronic frustration regarding the presentation of images and photo captions on web pages. Below, you'll find 8 different image zoom techniques, all of which are demonstrated on their own page & include cut'n-paste CSS/HTML code. Take your pick.

They've been tested on a PC, using IE6(sp2) and FireFox(v1). I'm not sure how they'll render in different browsers or browser versions. All but two are pure-CSS solutions (two use JavaScript :> ) and all are XHTML-valid (verified with the 'validate' button on the footer bar).

Read full story...

(Permalink)
Views: 362723 views
74 Comments · GuestBook
default pin-it button
Updated: 5-Jan-2008
Web View Count: 362723 viewsLast Web Update: 5-Jan-2008
Filed in:Scott

A Kid Again

January 26th, 2005  · stk

In many ways, I wish that I could be a kid all over again. (The most obvious reason, of course, is that I wouldn't be 45 years old & I'd have much longer to live. It would mean, however, that I'd have to go through puberty for a second time. Hmmm. Maybe I need to rethink this whole 'kid again' thing!)

Just look at all the cool toys that there are these days! Here's one that caught my interest - "Topobo" would have been one in which I would have had a keen interest. A 3-D construction toy with kinetic memory ... kinda like an animated Erector Set! Cool. (It was developed at M.I.T., so it's based in science and just bristling with educational benefits!)

This isn't the only cool toy out there, just one that hit the radar screen this morning. Unfortunately, it's not available in stores (yet). But, I bet by the time Alex is old enough, it will be!!

That has got to be one of the BIG pluses of being a parent - re-living one's youth. If I play my cards right, maybe I can convince Rachel that Alex needs a learning tool like "Topobo"? (And Dad can play with it before Christmas and after the Oop goes to bed!) Hee hee ... a plan!

I know I'm on the mark here, because when I was a kid, my parents bought me an electric, slot-car race-set for Christmas. (I usually got one Christmas gift from "Santa", which was always unwrapped and laid out, while I was asleep, on Christmas eve. On that particular year, it was the slot-car set.) My parents had invited some friends over for after-dinner drinks & they got all involved in setting up MY Christmas present. Well, one thing led to another and there was Don & Dad playing with the slot-cars, making a racket & having a ball My Mom, however, was annoyed and saying things like, "Shhhh, keep it down or you're gonna wake Scott," and, "Stop playing with Scott's present or you're gonna end up breaking it!"

Not that I'm wishing Alex would grow up any faster, because Lord knows, it's happening quickly enough, but I can't WAIT for Alex to grow out of teddy bears & blocks, because there's a LOT of really cool toys that I can't wait to give myself, ahem, her! An X-box (or some newer, improved version), for one. I know she's a girl, but don't you think that she'd really like a remote controlled car (or better, a truck)? I know I would! "Topobo" will be one I'll have to add to the list!

Rachel, bless her heart, knowing that I'm a kid at heart, bought a really cool boom-a-rang helicopter for me for Christmas this year (it was only a buck). Of course, with all the ice and snow in Edmonton, I can't really get out and try the thing ... though, as impatient as a 10-year-old, I tried it in the house! It REALLY flies great! (Though the blades chipped off a bunch of that ceiling texturing and made a mess all over the carpet. Oops. Good thing we live in a rental house ;) Alex howled with delight on it's inaugural, ceiling-scraping flight.) Dad's hopeful that Alex will have a similar taste in toys. She can keep the dolls, but she'll have to share her other ones with you-know-who.

Here's to being a kid all over again! Yahoo.

(Permalink)
Views: 5551 views
Leave a Comment · GuestBook
default pin-it button
Updated: 1-Jun-2005
Web View Count: 5551 viewsLast Web Update: 1-Jun-2005
Filed in:Site News

New Journaling Software

January 21st, 2005  · stk

Because we've got our own domain name, we decided to revamp the look of our site & our journaling methods. We hope that you like it and find it useful. We're also hoping that because posting entries is easier, we'll be able to provide you with MORE news, photos & other information.

First, let's give credit where credit is due. We're using an open-source program (which means that it's FREE - yay - and worked on by a wide array of developers). The name of the program is b2evolution (see the promotional link at the bottom of the page). It offers several new features that we didn't have before:

  • You can now add comments to posts. (Let us know what you think!)

  • Posts are categorized. (Read only what interests you.)

  • Posts are archived. (Easy access to ALL posts.)

  • Better photos. (Larger images because of the wider page layout.)

  • Search posts. (Find an old post based on a keyword.)

  • Posts have 'permalinks'. (Link to a specific post.)

  • Posts can be syndicated. (Advanced feature to keep up with our news.)

So ... we're thinking that this will be way-superior to what we had before. It will take some getting used to, as it is a completely NEW way of doing things.

Note: The current set-up allows 7 posts per page & you can use the "older", "newer" links (either at the bottom or in the right-hand section under "Journal Archives") to move forward/backward 7 posts at a time.

Hope you like it! :) Let us know what you think.

(Permalink)
Views: 3097 views
Leave a Comment · GuestBook
default pin-it button
Updated: 22-Feb-2005
Web View Count: 3097 viewsLast Web Update: 22-Feb-2005