Quick Function: small PHP function to add canonical URLs to each page
When I redid Foodizu a few months ago, I added canonical URLs to each page. The easiest to do this was with a quick PHP function:
<?php
function canonical_link(){
$url = 'http';
if ($_SERVER["HTTPS"] == "on") {$url .= "s";}
$url .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$url .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"];
} else {
$url .= $_SERVER["SERVER_NAME"];
}
if( isset($_SERVER['REQUEST_URI']) ){
$url = $url . $_SERVER['REQUEST_URI'];
}
if($url){
echo '
<link rel="canonical" href="'.$url.'" />'."\n";
}
}
?>
to call this function you simply add in your header somewhere:
<?php canonical_link(); ?>
and it will display the canonical URL.
Playing with new tools
We have a compaq mini CQ10 floating around the office so I decided to try out some of the new OSes that are out there for netbooks.
Currently, I run Windows 7 on my main netbook, so I wanted to see how Ubuntu and Chromium run with it.
I made the decision early on to complete remove windows XP from the netbook, and use Ubuntu Netbook Remix as the main OS. Installation went pretty smoothly, and the only hitch was getting the wifi drivers to work, which really didn’t take much to fix.
Once you install UNR, make sure you go to System > Update Manager and update all. If it says there are no updates, go to “Settings”, and make sure you check the top 4 options under the “Ubuntu Software” tab. Once the updates are done, go to System > Hardware Manager, and your wifi card should show up.
I also installed Chromium on another partition. Chromium is the Open source release of Google’s ChromeOS, and so far it’s been nice to play with, but I’m not sure I’d use it as a main OS due to how long it takes for the wifi to start up (upwards of 10 minutes after you reboot). Also, while most of my work is done in the cloud, it’s nice to be able to unplug sometimes.
Also, being the avid ebook reader that I am, I made use of Wine and install the Kindle for PC application which runs pretty smoothly after you tell wine to run as windows 98.
Just a quick note about WP-Clickmap
WP-Clickmap has gotten a minor update today to allow it to install in wordpress 2.9.
Over the next few months or so, I’ve got some new features planned for that plugin, and will be adding it to the wordpress depository once I’m done with the upgrades.
Quickpipe.com is dead, Long live The Dev Scene
Today, I’m pleased to announce that one of my longer standing sites is no more.
Why am I pleased to announce that? Because in killing the site, I have brought into a new name that will continue to grow.
A few months ago, I started work on a site called “The Dev Scene“, the idea was that eventually QuickPipe would get moved over to it and cease to exist.
Today, I’m happy to say that this time has come. There’s still some rought spots to iron out, but overall, I’m pretty happy with it.
A New Year again
Well, 2009 is almost over, and 2010 is almost beginning, and it’s been one of those years where you get a lot done, and learn a lot, and still want to learn more and do more.
- For starters, I’m involved in a new open source project that will be getting posted about very shortly. But essentially, it’s a simple blog system for when WordPress (I know, don’t kill me for saying this) is too big for the job at hand and you need something smaller. I’ll talk more about it later.
- DBStract is about a month from it’s new backend, and the users who are beta testing the new features have been quite happy with it.
- ProjectPiece is also not far from finally getting it’s next version, which will also have new features, and some interesting ideas implemented.
- Foodizu is growing and getting new recipes added by people, and it’s iPhone app will be launching in the new year.
- Some news about QuickPipe, but that will be coming with other announcements in the next month or so, so I’ll talk more about it then.
- I have a couple new wordpress plugins almost finished, that will be getting posted about as usual once they’re ready for release.
- Involved in planning a local WordCamp here in the Okanagan, but again, I’ll have more details about that shortly
Otherwise, just want to wish everybody a happy new year, and look forward to seeing what 2010 brings to the table.
A little Kindle tip
I’ve been over a week with my Amazon Kindle, and I’m enjoying it so far. I like how it syncs between last page read on my iPhone app and the Kindle, if I decide to read someplace where I have to wait around and didn’t happen to carry the Kindle with me.

One thing I did, was I ordered the Amazon Kindle Leather Cover, which while I was waiting, I read some reviews on. As it turns out, it has a bad habit of possibly cracking your kindle if it’s handled incorrectly. And when I opened the box and first put the Kindle in, I saw what they meant.

The Kindle is kept in place using a hinge mechanism, which is fine, but the problem is that it is located on the back cover. What this means, is that if the Kindle is ever not flat against the cover, then it can put pressure on the hinges and can lead to the Kindle getting cracks along the side.
So, having read about this, and done some research, I grabbed some elastic from my wife’s sewing kit, and some superglue, and did a quick mod to the case.
I cut two strips of elastic, and glued them to the upper right and lower right corners of the back cover of the case, so that when the Kindle is in the case, it also has its lose side in the elastics, providing extra support and keeping the Kindle flushed against the back cover.

Trying out the Amazon Kindle
My wife and I usually give each other an early christmas present.
This year, I bought her a nice Tassimo coffee maker and various T-Disks to make with it.
And for her gift, she gave me a new Amazon Kindle, which I’ve been eyeing for sometime, and was quite happy when it made it’s jump into Canada.
Thanks to having previously downloaded the Amazon for Kindle iPhone app, I already had several books to read on it, and the first thing I tried out once I got the kindle was buying the day’s issue for the Vancouver Sun. There’s no images on the newspaper, but reading it was pretty interesting, including the “Clip an Article” feature.
I’ve also tried out the mail a personal document to your kindle feature, and it’s pretty neat so far. Now I just have to catch up on my reading.
One thing to mention, I did buy a small LED light for it, but I didn’t get it from Amazon. The local walmart here had the same light that Amazon is advertising for 10 dollars cheaper than Amazon had it listed, so I grabbed it when we stopped in to get some pictures printed.
By the way, on another note, anybody with an iPhone who hasn’t already, should download and read (and watch), Level 26, it’s made by Anthony E. Zuiker, the guy who created the CSI series, and it’s a pretty interesting read.
What I’ve been up to…
Ok, I admit I got a little slow with posting again. I got a little busy the past few weeks.
Some things I’ve been up to:
- fastAmazon has been selling better than I expected so I was busy with updates on that.
- KudosCMS has just gotten version 1.1 released and 1.2 is in the planning stages which will include the ability to add custom plugins.
- Foodizu has seen some new updates and I’ve been busy working on the iPhone app that will feature over 40,000 recipes when it launches. (Lots of yummy tasty food)
- DBStract has been getting some new updates as well, but mostly they’ve been in the backend as I’ve added new infrastructure to how it handles it’s thousands of databases.
- New articles for QuickPipe.com, which will be getting added this week.
- Being a dad, and watching my daughter learn new things every week.
- Being forced to watch Monsters Vs Aliens, 101 Dalmations 2, and madagascar 2 over and over and over and over
Otherwise, I’ve got some new projects on the horizon that I’ll be talking about more soon.