Skip to content

My first WordPress plug-in: custom registration

Over the last couple of evenings, I created my first-ever WordPress plug-in, which I wrote to make it easier to customize the WordPress registration (and login) screen. As distributed, the stock version of WordPress uses a really not-very-nice registration screen--it features the WordPress logo (embedded in a background image), and links back to the WordPress site. If you wish to modify the login screen, you have to change some files in the WordPress core--and that means that every time you update, you have to remember to redo those customizations. Far from ideal...

So I took some time to read about creating WordPress plug-ins, then studied up on the available hooks to see if what I wanted to do was possible. The good news is that, as of WordPress 2.1, it was possible--and quite simple (even for my very-limited PHP skills).

After a few error-filled attempts, I wound up with a working plug-in that creates a nicely-customized registration screen, all without changing any core WordPress code--you can see the results on the registration page. (This is roughly what it looked like under WordPress 2.0, but I created that page by modifying the core WordPress files.)

If anyone wants this plug-in, feel free to grab it (36KB download)--there are some basic instructions in the customreg.php file, but I wouldn't describe it as heavily documented. Also, I'm not sure how well it works with the default login screen, as I use the King Login sidebar widget for login in the sidebar. What I'd really like to do is figure out how to display the registration form with the header, sidebar, and footer--but after some basic investigation, I think that project is beyond my skills. So for now, this is officially good enough.



Technology purchasing: A 10 year retrospective

I've been playing around with technology for longer than I care to remember--I blame my father for bringing home that first Commodore PET way back in 1979. Ever since then, it seems, I've had this unhealthy fascination for pretty much everything on the bleeding edge of technology. I clearly wouldn't have my current job without this interest in technology, so I guess I'm quite thankful that things worked out the way they did.

However, such a hobby does have its costs--literally. I was cleaning out our cabinets the other day, and came across my binder of technology receipts. This is where I keep the receipts for any "substantial" hardware or software purchases, and it tends to be something of a roach motel for receipts: they check in, but they never check out.

So I thought I'd take some time and cull the receipts for things I no longer own. Going through the binder is quite the revelation--both on how much I spent on technology (hey, I was young, single, and careless...now I'm just careless!), but on how much the technology itself actually cost. I scanned a few bits from some of the more interesting receipts (click any receipt for a larger version).

Read on for a walk down memory lane...followed by a look at what those items would cost in today's dollars, as well as what you could get for that some money today!

[continue reading…]



Recent Macworld articles cross-posted

Macworld logoDespite my promise to stay on top of my Macworld postings, I haven't done all that well at doing so. This morning, I posted a small flurry of Macworld stories, covering the last few months' editorial pieces. Since I filed them correctly according to date, you won't see them in the RSS (I don't think?), so here are some links to the Macworld pieces, along with a short synopsis of each article:

  • Feb 28th: Don't leave the Windows open: A real-world example of what can happen to a seemingly reasonably well defended Windows XP Pro installation (as installed under Parallels on my Mac Pro). [robservatory link]
  • Feb 9th: On meaningless hyperlink graphics: I rant about Snap's "Preview Anywhere" technology, which pops-up an (unrequested!) miniature preview icon of the page you'll visit when you click a link. Ugh. [robservatory link]
  • Jan 12th: Ten iPhone suggestions: As cool as I think the iPhone will be, I probably won't be buying one. The Treo I have is so much more than a phone that I can't see losing those capabilities by switching to the iPhone. If Apple were to implement at least the majority of my ten suggestions, though, then I'd switch in a heartbeat! [robservatory link]
  • Jan 3rd: Reading between Apple’s lines: I wrote this piece after Apple's homepage changed to read "The first 30 years were just the beginning" the week before Macworld Expo. In the article, I predicted the contents of the keynote speech. Though nearly everything I wrote turned out to be wrong, I got the iPhone's general concept right, though my comment of though not even Steve can really get away with a one-button phone--can he? turned out to be exactly what he did get away with! [robservatory link]

Just so I can finish with another promise to be broken, I really will try to stay more on top of these posts from now on! :)



Don’t leave the Windows open

Macworld logoI've been running Windows on my Intel Macs for quite a while now--I have Parallels, VMWare Fusion, CrossOver, and Boot Camp installed on two machines. Across all those installations, I've never done anything to protect my Windows installs from viruses and malware, other than using Windows XP Pro's built-in tools: the malicious software removal tool and the firewall. I wanted to see if Windows really was as susceptible to attack as everyone was claiming it was.

pwned

Yes, it was. I wrote about what happened for Macworld, as it was a most eye-opening experience for me--this particular Windows install hadn't done anything more "risky" than surf to a few well-known download sites, looking for some iPhoto-type applications for the PC. If this is the risk a Windows user faces every day if their machine isn't fully armored against outside attacks, I must ask...why do people choose to use this OS on a regular basis? It also made me quite thankful I've never worried about such things in all my years of Mac usage.



CSI, meet reality; reality, meet CSI…

Now you might think this post is going to discuss the unreality of the whole CSI franchise (CSI lab techs doing detective work? Getting results back in hours, not days or weeks? Finding unique ways of getting a DNA sample from a suspect?), but that's not the point. Well, that's not true. That last example there is actually the point of this post. From this article on Portland's KATU news station site:

Peter Jacob Inouye, 24, of Parkland, was arrested shortly before 7 p.m. as he returned to his parents' house a few blocks from the rape scene, Olympia police said in a news release.

Cmdr. Tor Bjornstad said detectives collected Inouye's DNA recently after Inouye spit on the street, and the sample was analyzed by a lab.

Bjornstad said an officer watched Inouye spit on the sidewalk, and then rushed to collect that saliva off the sidewalk.

So perhaps at least one Olympia detective has been watching CSI? Or perhaps they're just particularly diligent? Whichever; I'm just glad this menace is off the streets, thanks to the alert detective's actions. Though as they used say on TV, "all parties are presumed innocent until proven guilty in a court of law."



How network television lost a ‘new series’ viewer

I'm old enough to remember the "good old days" of network television. Perhaps you are, too--you know, back when a new show was given a commitment for an entire season's production? Take, for instance, 1981's Hill Street Blues, a groundbreaking drama set in a New York police station. Ratings the first season were absolutely abysmal, and yet, NBC left it on the air for the entire season. At the end of the year, the drama picked up eight Emmys, was renewed for season two, and went on to run for seven full seasons.

Fast forward to 2006. I don't watch a ton of television, mainly 24 and CSI (Las Vegas, not New York or Miami). But when the fall 2006 season started, two new shows caught my eye: NBC's Studio 60 on the Sunset Strip and ABC's Day Break. Studio 60 was a potentially intriguing "behind the scenes" look at a live weekend comedy show (i.e. Saturday Night Live), produced by Aaron Sorkin, whose work I've liked in the past. Day Break's premise was more unique and complicated--a police detective is framed for a murder, and he keeps waking up to the same day, over and over (ala Groundhog Day). He then spends the repetitive day slowly figuring out who framed him and why.
[continue reading…]



On meaningless hyperlink graphics

Macworld logoHave you visited one of those sites that has an annoying advertising pop-up when you mouse over a link? While I find those somewhat annoying, at least they're usually well marked (via double underlines), so you can easily avoid them. Worse, to me, are hyperlinks that appear normal, yet pop up useless information on mouseover, without any warning whatsoever.

True, I have one such link here, for the "Why is this required?" link in the spam blocker. However, that pop-up contains useful information, and it's located on the right side of the page, where it's unlikely to be accidentally activated. So I think it's OK :).

The ones I find really irritating are the Snap Preview Anywhere pop-ups, which show a small thumbnail of the page you're about to visit when you mouse over a link--talk about a complete waste of bandwidth! I rant about these (and provide some suggestions to actually make them useful) in more detail in this Macworld Editor's Notes blog.



For Sale: Bill Gates’ signature, $40

Vista imageDid you know that you can buy a version of Vista signed by the one and only Bill Gates? That's right; the Microsoft Windows Vista Ultimate UPGRADE Limited Numbered Signature Edition is signed by Bill himself. As seen at the above Amazon link, it's $289.99 (but currently out of stock; I guess Bill must sign slowly!). On that same page, however, they direct you to the Microsoft Windows Vista Ultimate UPGRADE, which is in stock, for $249.99.

Ergo, having Bill's signature on your Vista box will cost you $40. Yikes. The guy's already worth something north of $40 billion, and he wants $40 more from those who desire his signature?! Wonder if those paying the $40 will see their investments pay off on eBay in 20 years or so? Sad to say, they probably will...

As much as I like Apple and OS X, and admire Steve Jobs, there's no way I'd pay any amount extra to have an OS X 10.5 Leopard box signed by Steve himself -- and in this case, I think sending $249.99 to Microsoft is already way more than sufficient, especially given that I expect Leopard will be roughly half that cost!

Thanks to Kirk for pointing me to this silly signed edition of Vista...



Question for a CSS wizard…

In writing this post, I wanted to include a centered image with four lines of text off to the side, like this:

centered block image

As someone who is struggling to move away from table-based layouts, I did my best to create that structure using only CSS. But after 30 minutes of fighting with divs, floats, clears, aligns, and google searches, I gave up and whipped out the table code. Two minutes later, the table was done and published. Yes, I gave up--I didn't want to spend my entire lunch hour on five lines of text!

My question is this: can someone point me to a site that explains exactly how to create the above look using CSS? All pointers appreciated.



A little (simulated) flying fun…

If you've been reading here much, or have ever seen me speak, you know that I'm somewhat of an aviation fan. I'm an instrument-rated private pilot (though not current, thanks to family, money, and Oregon weather!), and X-Plane is one of my favorite diversions. I love being able to pilot aircraft I'll never have the chance to fly here in reality, and to fly in weather conditions that I wouldn't dare to go near in a real airplane. X-Plane also features real-world weather, so I can fly around the Portland area in conditions that closely match what I see out the office window.

Yesterday, it was foggy here. Really foggy. Almost all day. So during lunch, I took the Nike LearJet (OK, the X-Plane version thereof) out from Portland International for a little spin. Take-off in foggy conditions is relatively straightforward--full thrust, max rate of climb, maintain runway heading (instrument departure procedure? Nah!), and I broke out into the blue skies above at about 3,500 feet above the ground. I flew off to a clearer airport for a couple touch-and-goes, then headed back to Portland. Given the fog, an instrument approach was definitely required. I chose the ILS for runway 28R, and maneuvered the plane towards the final approach course.

Then I got lazy, something I couldn't ever do when flying instruments in the Piper Warrior I trained in: I set up a fully-coupled autopilot approach, including auto-throttles. As pilot, my job was now reduced to system monitor--I only had to choose the desired airspeed on the autopilot panel, remember to drop the flaps and gear, monitor the system's progress, and then the autopilot would take care of the rest. Just for fun, I used SnapzPro to record the approach, from the ILS intercept to touchdown, and uploaded them in case anyone wants to see X-Plane, or what a really foggy approach might look like.
[continue reading…]