Custom Post Types – Vancouver WordPress Meetup Slides

Friends upgrade friends to IE9

html5

Update: Firefox 4.0 was released on March 2nd meaning all the major browsers now have full support for HTML5 and you no longer have an excuse not to implement it.

On March 26th the IE9 / WP7 Boot Camp is coming to Vancouver, and if you attend you’ll find me presenting two of the sessions; A Lap Around Internet Explorer 9 and HTML5 and Enhancing Pinned Sites with Internet Explorer 9. I realize this kind of statement is likely to get me rolled in tar and feathers and chased out of town, but before you go looking for your pitchforks and good torch material, hear me out. There are usually reasons why people do things that don’t seem to make sense, and this is no exception. I’m making the case for Internet Explorer 9, and quite frankly so should you. Here’s why.

HTML5 is should be now

Over the last couple of years new technologies have started rolling out that will improve both the usability and effectiveness of code on the web. These technologies have been bundled into one collective term, HTML5, but actually include HTML5, CSS3, SVG and a whole pile of other forward thinking inventions. One of the major reasons why the implementation of HTML5 is so slow, apart from the fact the spec is not yet completed, is that up until March 15th, 2011 Internet Explorer, the default and primary browser for PCs, did not support any of these technologies at all. So while the other major browsers (Firefox, Chrome, Opera and Safari) were providing better and better support for these new technologies anyone using Internet Explorer was experiencing the old internet. As a result, for full cross-browser compatibility HTML5 integration was at best included as an add-on to backwards compatible code.

That was then. This is now. With IE9 finally released we are facing a new reality where HTML5, even in it’s unfinished spec, can and should be implemented as the primary code of the web with backwards compatibility as an add-on. But this can only happen if we get everyone currently using Internet Explorer to upgrade.

Stop Living in the Past

A couple of years ago I started a website called Stop Living In The Past where I encouraged all web developers to install a simple script on their site that would tell IE6 users they were running a horribly outdated piece of software and that they needed to upgrade. This was not a new idea – there are plenty of such sites out there and the majority of European newspapers had already implemented such warnings on their sites – but unlike the major IE upgrade scripts out there mine told people to upgrade to a newer version of IE, not get a new browser. My reasoning was simple: If I am to be able to implement the latest and greatest in web technologies and ensure cross-browser compatibility on the sites I build I need to know that the people that visit those sites are running browsers that support them. And since I knew a lot of people were running old and outdated versions of Internet Explorer, largely because they were unaware they had the ability to upgrade, I figured warning people and giving them an opportunity to upgrade right away was a good idea.

This pissed everyone off.

On the IE hater side people were up in arms about the fact I was telling visitors to upgrade IE, not get a different browser. Their argument was that IE, no matter what version, was pure evil, the cause of all things bad on the internet and should be knocked unconscious, bound and gagged and dropped in a deep well to be sealed forever.

On the IE lover side people were shocked that I would question the all-knowing Microsoft on the quality of their ancient browser. To them the mere notion that IE was somehow fallible was heresy.

Both sides were furious, both sides were unwavering in their beliefs and both sides seemed to completely ignore the fact that Microsoft themselves stated in no uncertain terms that they wanted nothing more than to see IE6 eradicated from the web.

In short, my site unwittingly uncovered dogmatic lunacy, on both sides. And as with science and religion, dogmatic thinking about browsers is just plain stupid.

This became comical (at least for me) when Microsoft a few weeks ago released the IE6 Countdown website on which they offer up a code to warn IE6 users they need to upgrade their browsers.

Now there are very good reasons why Microsoft can’t simply flip a switch and kill IE6 right now, most of them involving major mulit-national Asian banks, airline booking systems and other highly integrated and globally important systems, but that is no excuse for the remaining 99.9% of computers in the world not to upgrade to the latest version of the browser right now.

IE haters are (surprisingly) part of the problem

IE9 = HTML5You’ve surely met them – people who treat any version of Internet Explorer like the next plague and tell people to never touch the browser, run away when they see it and preferably buy a Mac right now. These are the same people who blame Internet Explorer for everything from web standards incompliance (true), table-based layouts (partially true) and their websites not working properly (utter nonsense). What these people fail to realize or accept is that while IE6 is a horrible piece of outdated software that doesn’t work to modern standards, the newer versions have gotten progressively better to the point where today we have version 9 which not only is standards compliant but also incorporates the forward thinking new technologies of the web. It doesn’t mean you have to like it, but saying that the current version of Internet Explorer is bad is just not true.

Being dogmatic about this kind of stuff is just plain stupid. Any serious web designer or developer should be a browser agnostic. After all, you have no control over what browser your visitors choose to use and your job is to ensure a consistent experience across all devices, platforms and browsers. In short a pragmatic approach is the only way we will ever get anywhere. When it comes to browsers this means accepting that no matter what you personally think of Internet Explorer and the company behind it, millions of people use the browser every day and if they are not using the latest version, they are not experiencing the web as it should be and you as a designer and developer are forced to stick with old solutions.

The bottom line is we have to get people on track and upgrade them to IE9 en masse so that we can start using the new technologies we have been waiting for and talking about for the last several years. And even though IE is not my preferred browser I will play my part in ensuring that people upgrade and that web designers and developers know what the browser can do, how to use the advanced features that come with it and how to start implementing HTML5 right now.

The argument used to be that HTML5 was a non-starter because IE didn’t support it. Well, now it does, so let’s embrace it, get people up to speed and start building better and more functional solutions for the web.

Go berserk in the comments section.

Jetpack – New must-have WordPress Plugin

UPDATE: As of around 3pm Thursday the WordPress.com Stats plugin seems to be back up and running although it is producing some very strange stats that don’t correspond with what the stats in Jetpack produces. Weird stuff, and as far as I can tell still no explanation from the powers that be.

Last night (March 16th) Twitter and WordPress forums exploded with people receiving error messages when trying to access their WordPress stats through the WordPress.com stats plugin. This happened to me too: When trying to access my stats I got this nice uninformative error message:

Your WordPress.com account, xxxxx is not authorized to view the stats of this blog.

I did a little digging and found out that the WordPress.com Stats plugin has been replaced by the Jetpack plugin (or rather, the WordPress.com Stats functionality has been baked into the Jetpack plugin) and a simple way of getting the stats up and running again was to simply install the plugin, activate it and link it up to my WordPress.com account.

WordPress.com goodies come to self-hosted WordPress.org sites

Before I start ranting let me just say that the new Jetpack plugin is what I would consider a must-have for self-hosted WordPress sites. Not only does it have the WordPress.com Stats built in but it also comes with a whole menagerie of other features that come standard with WordPress.com sites but previously had to be installed separately in self-hosted sites. These are:

  • WordPress.com Stats
  • Twitter Widget
  • Gravatar Hovercards
  • WP.me Shortlinks
  • Sharedaddy
  • LaTeX
  • After the Deadline
  • Shortcode Embeds

Some of these features including Stats and Sharedaddy are plugins I’ve already recommended, and the others are pretty useful too (especially After the Deadline which is an integrated spell- and grammar check tool). To learn more about the features and what they do go to Jetpack.me and check them out.

The great thing about the Jetpack plugin is that it consolidates a bunch of features that previously required separate plugins and installs to work. And judging by the open “Coming Soon” boxes at the bottom of the plugin page I’m guessing more stuff will be added shortly. The Jetpack plugin runs off cloud services which means some of the functionality lives in the cloud and not on your computer, in other words the plugin can be updated externally to add more functionality to your site without you having to run the manual update. Which is great. Well, sort of at least.

Cloud computing is what we are moving towards, and for integrated services like WordPress.com Stats it makes a lot of sense. The question here is what the underlying reasoning is and where this will take us. That’s where my rant comes in.

How about a little warning, eh?

There are two things that irk me about this whole situation: First off, no warning or information was issued about the disabling of WordPress.com Stats which lead to (and is still leading to) a lot of panicked posts and confused people. This could easily habe been remedied with a simple post or warning saying “Oh, btw we are disabling WordPress.com Stats and supplanting it for the Jetpack plugin so if you want your stats you have to install it” and they have done this, at least in part, by adding a “We’re working on it” message to the error displayed in the old Stats window. But it still leaves me wondering what actually happened here. Well, not actually wondering. More like speculating.

You see, I think this is actually part of a larger plan (WARNING: The following is pure speculation on my part and may very well be complete rubbish):

Logging into your WordPress.com account right now you’ll notice your API key doesn’t exist any more. The only API key available is the one you can purchase from Akismet. Yes, I said purchase. If you’ve been running Akismet on your WordPress site for a long time you may not know this but as of some time early last year Akismet went from being a free service to being a paid service. However, for those who had activated the plugin before the switch using the general WordPress.com API key Akismet still worked for free. And and even after the change you could circumvent the payment option by using your WordPress.com Stats API key as your Akismet API key and still get the same services for free. I think you see where I’m going with this.

From what I can tell the WordPress.com Stats plugin stopped working because the WordPress.com API key was disabled. I’m venturing a guess that this was done to force people to finally buy a proper Akismet key. Unfortunately WordPress.com Stats was an unexpected victim, which is why we haven’t heard any official word on what’s going on here yet.

Like I said before, this is all speculation on my part and I hope we hear some official explanation sooner rather than later, but at least it makes all the pieces fit. I have no problem with WordPress.com Stats being replaced with Jetpack nor do I have a problem with Akismet being a paid service (though I think it’s way too expensive), but the way this has unfolded is not very open nor transparent and needs some polishing. You can’t just kille a hugely popular plugin without telling people first.

My second issue with the move is that not everyone wants everything in the Jetpack. A lot of people like to keep everything separated and firewalled. I’m guessing that Automattic wants to move towards more integrated solutions like Jetpack to serve up lots of functionality in small packages. Which is great as long as it doesn’t push away the individual pieces. Right now, unless something is changed and WordPress.com Stats goes live again, you have to install Jetpack to get your stats, and that means you’ll now have multiple pluings running the same function if you have any of the other things like Sharedaddy installed. It’s a hassle because you’ll have to disable these doubles. Granted Jetpack picks up the settings from the old plugin, but it’s still not as clean as it should be.

Let us in on what’s going on!

The bottom line here is pretty clear: To Automattic, let us know what’s going on. If you want us to ditch WordPress.com Stats for Jetpack, just tell us. If WordPress.com Stats is coming back online, tell us that. And please explain what happened in the interim. Also, if you are disabling WordPress.com stats (and other plugins?) to be replaced by Jetpack, put a nice big warning in the plugin pages for those plugins so people know what’s going on and don’t start posting panicked messages in the forum. Transparency is key.

Conversations with Mor10, Ep 1: Women in Development

 
Length: 56:19
Download MP3

This is my first ever audio article (I hate the term “podcast”) – a feature interview with four women in design and development and their thoughts on the status of women in the web industry today.

The guests are Kathryn Presner of Zoonini Web Services, Minna Van of The Network Hub, Christine Rondeau of Blue Lime Media and Lynne Robson of A Chrazy Chameleon.

Music: “Rest (For A While) (Demo)” by The Orchestral Movement of 1932

If you want to know why International Women’s Day matters, check out this video:

Code Your Art Out and Dev:Unplugged: Two dev contests to cut your teeth on

There are a lot of exciting things happening in the online development space right now and there are some great opportunities for designers, developers and people with great ideas for online applications to get recognition, cut their teeth on bleeding edge technologies and maybe even win some stuff or a big wad of cash.

Code Your Art OutCode Your Art Out – Doing some good with your code

In conjunction with the Open Source conference Make Web Not War put on by Microsoft in Vancouver on May 6th and 7th this year the team has also launched a contest named Code Your Art Out. The contest is an extension and maturing of last year’s FTW (For The Web) contest which focussed on using oData in applications. This year the main focus is on using the web to do good – more specifically helping charitable organizations and non-profits reach out to their communities in new ways. From the website:

“Code Your Art Out” is about helping non-profits harness the power of technology in order to better serve its communities and members. It’s also about blending Microsoft technologies with other technologies to create applications that connect people, data, and diverse systems in new ways; bringing it all together in one ground breaking application.

Code Your Art Out brings to light an interesting conundrum in today’s rapidly evolving online environment: There are data sets, applications, solutions and technologies out there that can be of great benefit to individuals, organizations and companies, but the know-how and understanding necessary to utilize these often lie beyond the grasp of those who need it the most. The contest serves to build a bridge between those who would benefit from these technologies and those who understand and can build on these technologies. And for that alone I think it’s well worth it to take an active approach and submit an entry.

Not to mention that there are some serious prizes to be had including a trip to Toronto in June and some serious cash ($10,000 for the winner and $5,000 for the runner up).

Code Your Art Out runs from March 1st to June 1st. For all the details visit the site and get coding!

Dev:UnpluggedDev:Unplugged – release the power of the web

We are entering a new era where web code is concerned. The introduction of HTML5, CSS3, SVG and other related technologies are opening new and previously uncharted teritories for designers, developers and everyone else playing around on the web. The IE9 team is heavily invested in furthering this technology and is doing what it can to encourage early adoption and ground breaking work on the code front.

Enter Dev:Unplugged, a contest built on the premise of pushing the new HTML5 standard to its limits and create web apps that are “unplugged” as in not reliant on plug-ins. From the website:

We believe that HTML5 and related technologies, in conjunction with faster and faster browsers, finally give developers the tools they need to create experiences that are just as vivid, interactive and high-fidelity as what you have come to expect from native applications without the need for plug-ins. We want to see what you can do unplugged.

What is truly interesting about Dev:Unplugged is that even though it’s a contest put on by Microsoft and the IE9 team this is not a contest centered around Microsoft technologies – it’s centered around the new common markup languages of the web. To accentuate this the rules state, and I quote: “The submission has to work across IE9 RC, Chrome Beta and Firefox Beta.” For Microsoft haters this might come as a bit of a suprise, but it’s part of the new “we’re all in this together” approach adopted by the company over the last few years. After all, the web doesn’t care what platform you’re on or what browser you use, so why should coders?

The Dev:Unplugged contest itself is split into two main categories: Games and Music. Entrants are asked to build innovative gaming and music applications using only HTML5, CSS3 and JavaScript centered around material provided by the contest. You can read a full breakdown of how all this fits together over at the Internet Explorer blog and at the Dev:Unplugged website. Entering the contest you’ll be working with material from the animated series HellBoy and bands Awolnation and Ra Ra Riot.

As with Code Your Art Out there are some awesome prizes to be had including a trip to the Future of Web Apps conference in Las Vegas in June, cash, computers and other cool stuff.

All entries for Dev:Unplugged must be submitted through the website by May 8th, 2011 so get crackin!

Add a Twitter-like “Published X Days Ago” timestamp to your WordPress posts

For the last couple of weeks I’ve been working on a massive WordPress project that has required a lot of interesting and unusual components that step well outsie of what is normally expected from WordPress and its plugins. Once the project is live I’ll write a longer article about all these components, but in the meantime I’m going to share some of the functions because I think you might find them useful.

“Published X Days Ago”

The first function I’ll feature is a small script that spits out a text telling the viewer how long ago a post was posted. I actually needed this script for a countdown so mine is a fair bit longer, but it can be used to create a Twitter-like time stamp just as easily.

To achieve this we’ll be using two functions, date() and get_the_time(). The former is a bona fide PHP function that grabs the current local time from the server while the latter is a WordPress function that grabs the time of publishing for the post.

It doesn’t take a genius to figure out how we’re going to use these two: Taking the current time and subtracting the published time will give you the time difference, in other words how long ago the post was published. The challenge is that you need to get the right time formats to actually output a rational result.

Getting the right kind of time

You’d think that if you want to count how many days ago a post was posted you could just grab the dates and count backwards. But that’s actually pretty hard because it relies on the counting mechanism knowing what day of the month it is and how many days each month has etc etc. A better solution is to grab a unified time value that doesn’t change in the same arbitrary way. Luckily programmers found this problem and its solution a long long time ago. It is called the the Unix Epoch and is the time, in seconds, since January 1, 1970 00:00:00 GMT). To get this value for each of our functions we simply add in the format string “U” like this:

date('U'); // outputs the current date and time in Unix Epoch terms
get_the_time('U'); // outputs the publishing date and time in Unix Epoch terms

Making the time make sense

Problem is this produces a weird long number like 6250458. This is the number of seconds since the article was published. We want the number of days, so we need to do some math.

If you have seconds and you want to make days you first have to divide them by 60 to make minutes, then divide it by 60 again to make hours and then finally divide it by 24 to make days. For 86399 out of every 86400 seconds of the day this will produce an integer (number with a comma) but we want whole numbers. So we utilize an extra function called round() that rounds out the number for us.

Putting it together

With that we have all the components we need to get the number of days since published. In PHP form the function looks like this:

<?php 
	$days = round((date('U') - get_the_time('U')) / (60*60*24)); 
	echo "Published " . $days . " days ago";
?>

This will output the number of days since published sandwhiched between the words “Published” and “days ago”. But what about the first day, when the number is zero, or the second day when the number is one? “Published 0 days ago” and “Publised 1 days ago” looks kind of sloppy, no? Well, it’s easy to fix with some conditional statements:

<?php 
	$days = round((date('U') - get_the_time('U')) / (60*60*24));
	if ($days==0) {
		echo "Published today"; 
	}
	elseif ($days==1) {
		echo "Published yesterday"; 
	}
	else {
		echo "Published" . $days . " days ago";
	} 
?>

All these conditional statements do is ask “if the number of days is 0, say “Published today”, if the nuber is 1, say “Published yesterda” and for all other cases say “Published X days ago”.

Copy this piece of code anywhere in your theme files within the WordPress Loop and it’ll spit out a published x days ago timestamp on your posts.

Easy as Pi.

Open Letter to the CRTC

To the Secretary General, CRTC

I am confused about the CRTCs role in Canadian society. You are said to be a watchdog, but to me it seems the only parties you are watching over are the 4 big telecommunication companies in Canada and their monopoly on everything from television transmission to internet services and mobile networks. This impression has been with me for a long time but recent decisions on Usage Based Billing and unlocking of cell phones for a price have made me put serious questions to whether the CRTC is put in place to ensure fairness or if it’s actually just a government appointed body that protects a monopoly.

Usage Based Billing is not fair for anyone

The debate over Usage Based Billing is limited to a debate over whether or not the big telecoms should be allowed to impose billing practices on their 3rd party resellers. The arguments against this practice largely focuses on two points:

1. Limiting bandwidth to users prevents them from using new more data heavy applications and stifles innovation.
2. The argument that heavy users should pay for their keep makes little sense seeing as the difference in cost to the supplier of transmitting 1GB vs 100GB is minimal. The cost imposed is grossly exaggerated.

First of all, these arguments apply just as well to the main telecoms as to the resellers, so if the ruling is overturned (as it should be) it begs a revisiting of the regulations regarding the main telecoms and their capping of services.

More importantly however is an issue not addressed at all: That the big telecoms have a vested interest in capping their services, not to preserve bandwidth but to block out competition and force the public to use only services provided by the big telecoms.

The simplest example is Netflix, but it is far from the only one. With caps on internet traffic users will be hard pressed to use streaming audio, video and imaging services without having to pay huge overages. This forces them to use only services provided by the big telecoms.

Thus it can be argued that the capping of internet services by the big telecoms is actually a move against competitors to push them out of the market, and an unfair one at that because these same telecoms have a monopoly, imposed by the CRTC, on bandwidth in Canada.

Such a policy enacted by a company in any other industry would be considered questionable, and it reeks of activity normally reserved for criminal cartels.

Capping of internet services is bad for communication, bad for investment, bad for the industry and bad for consumers. The only party that benefits from it is the big telecoms. If they are allowed to continue this practice, the CRTC needs to break the monopoly and allow other actors into the market to create a fair market.

I work in the web industry and we are in the process of developing an application that requires a lot of bandwidth from the users. It’s a free service that will help them get more out of their photos online. With internet caps these types of services are doomed to failure, not because they are too bandwidth heavy but because the big telecoms and the governing bodies that mandate them are not thinking forward but trying to anchor us firmly in the past.

Unlocking of Cell Phones: If I own it I should be able to use it

Yesterday it was announced that the CRTC will be imposing on the big telecoms to allow unlocking of all fully paid cell phones so that the users can use the network of their choice. This is a practice that has been in place in most other western countries for over 10 years and is only fair. After all, if you own a product outright you should be allowed to use it in any way you want.

The problem is that the CRTC is letting the telecoms charge a fee for unlocking the phones. Reportedly Telus will be charging $50 for the unlocking of a phone. This is tantamount to a ransom and is unacceptable.

When a consumer purchases a full price cell phone or buys out their contract, they are paying full price plus a markup on the cell phone just like they would if they bought a vacuum cleaner, an MP3 player or a car. It is only fair to assume then that seeing as the company that sells the cell phone has no vested interest in it and is in fact turning a profit, the consumer should be able to use the cell phone in any way they see fit. Until now this has been impossible because the telecoms have asked the cell phone manufacturers to lock the phones so they can only be used on their networks. This is a simple software key and it can easily be unlocked with the right code, but the code has so far been hard to obtain.

Now with this new rule in place, the telecoms have to unlock the phones upon request, but they are allowed to charge for that unlocking. And they are charging $50 which is $30 more than what the same unlocking would cost on eBay.

The problem here is that a) the locking is done at the request of the telecom, b) the unlock procedure costs the telecom nothing and c) when fully paid the phone is the sole property of the consumer and should be fully functional.

Forcing the telecoms to permit unlocking is the only correct thing to do here. Allowing them to charge for this service on the other hand is unacceptable. Just like any car owner is allowed to buy gasoline from the vendor of their choice, so should a cell phone owner be allowed to buy cell phone services from a provider of their choice. This is basic free market theory. What we have at present is closer to cartel or even mafia practices.

What is your role and who protects my consumer rights?

I am left wondering what the role of the CRTC is. Based on these recent decisions and others before it I find it hard to imagine it can be protecting anyone but the telecommunication companies the body is set out to be a watchdog over. If it is to protect consumers the body has utterly failed and it would be time to revisit its mandate.

But more importanly, who is protecting my rights as a consumer? I am from Norway, a country where consumer rights are valued. What I see happening in the telecom industry in Canada could never happen in my home country because it is unfair and puts the consumer at a permanent disadvantage. To put it plainly, if not the CRTC then who is protecting Canadians from being screwed over?

I would very much like to hear your thoughts on this because as of right now I see no rhyme nor reason in the decisions made by the CRTC.

Yours truly,

Morten Rand-Hendriksen

WordCamp:Developers – a WordPress conference for WordPress developers

WordCamp:Developers - the WordPress Developer ConferenceGet your calendars out and mark this date down with a pen: Thursday May 5th, 2011. In fact, mark that whole week down. Vanessa Chu, Anny Chih and I are putting on the first ever WordCamp:Developers as part of Vancouver Open Source Week and the week ends with Microsoft’s two-day Make Web Not War open-source conference. All in all Vancouver is going to be the place to be in May (Northern Voice, the two-day blogging conference is the very next week) so you might as well clear your schedule and get ready!

Why a WordCamp for Developers?

Vanessa and I have been running the Vancouver WordPress Meetup for the last 9 months and the overwhelming response we’ve gotten is that people want to learn more about web development with WordPress as a platform. They also want to know more about related technologies, future developments and things like user experience design and information architecture.

So far the only WordPress focussed conferences have been regular WordCamps. But although these conferences are great for bloggers and people who work with WordPress, their focus tends to be more on blogging and basic publishing and less on hard core development and other related topics. Because WordPress has grown from a solid blogging platform to a full fledged CMS we felt it’s time we put on a conference focusing on the people who use WordPress to build stunning, functional and ground breaking websites. Thus WordCamp:Developers was created.

What Can I Expect From WordCamp:Developers?

Like I said the focus of WordCamp:Developers will be on topics that are relevant to people who work with WordPress as a development platform every day. Right now we are scouring the continent looking for the best and brightest speakers with expertise in advanced WordPress development, Information Architecture, user experience design, security, eCommerce and so on. Based on feedback and trends in the community we are also looking for speakers to focus on new technologies like HTML5 and CSS3 as well as integrated technologies like JavaScript and AJAX.

The goal of WordCamp:Developers is to provide a platform for the advancement of WordPress as a serious Content Management System and start a discussion about how we, as web developers, can use WordPress to make the web a better, more functional and more attractive space for everyone.

If you are an expert in any of the fields listed above or anything else related or relevant to WordPress development or if you know someone who is, go fill out the speaker submission form or get in touch with us through the website ASAP.

The deadline for speaker submissions is February 28th so get crackin!

Tickets, Venue and Volunteers

We are in the process of rolling out ticket sales for WordCamp:Developers. We were going to release tickets this week but some very generous sponsors have just come onboard and with their contributions we are able to push down the prices and make the event more accessible so we need to crunch the numbers again to ensure we give all our attendees the most bang for their bucks.

We are releasing a total of 200 attendee tickets for the event. Our 12 main speakers will be added on top of that number, and if you buy a ticket and then get selected as a speaker we will put your ticket back in the general pool for someone else to pick up.

WordCamp:Developers will be held at the SFU Harbour Centre in downtown Vancouver. The event will feature two main tracks, UX (Focus on Designers) and DEV (Focus on Developers) as well as an ad-hoc (un-conference) room where attendees can pitch 20 minute talks on the day of the event. We are booking a total of 12 speakers, 6 for each of the main rooms, and ensuring that each talk will be on its own topic so attendees get the most out of the event.

As part of admission all attendees will be served a great lunch in a room overlooking the harbour and we’ll have coffee, snacks and other goodies throughout the day.

This event, like all WordCamps, is a not-for-profit volunteer based innitiative and we are looking for volunteers to help both for organization and day-of management. If you’re interested in playing a part in WordCamp:Developers get in touch with us through the website.

Sponsorships and Swag

As I mentioned earlier this event could not have happened without the generous support of our sponsors. We already have a couple of big companies on board (TBA) but we are still looking for more sponsors to make this event as great as it can be. On that note I have to mention the Microsoft Canada team that is putting on the open source conference Make Web Not War and Vancouver Open Source Week. I spoke at Make Web Not War in Montreal last year and I can honestly say it is one of, if not the best conference I’ve been to. And the Vancouver edition, slated for May 6th and 7th, proves to be even better!

If you or your company is interested in being a partner please check out our sponsorship page for all the details.

Based on feedback from other events we are trying to make WordCamp:Developers as green as possible. As part of that we are being very counscious about what kind of swag we will be handing out to attendees, speakers and volunteers. To that end the focus of all our swag will be on usability. As in we will only hand out things our attendees can use and have a use for. That means if you or your company have a product, virtual or physical, that you feel would be of use to web developers, we want to talk to you. Get in touch with us through the website and we’ll get the conversation started.

Consider This Your Personal Invitation

WordCamp:Developers is a WordPress conference for developers, by developers and we put it together because we know developers like us want a place where they can talk shop. Consider this your personal invite to the conference, to attend, to speak, to sponsor, to volunteer. WordPress is an open source platform that is changing the world and we want everyone to be part of the revolution. So mark your calendars, get the word out and let’s make WordCamp:Developers and Open Source Week amazing!

Capping the Net – You Don’t Know What You’ve Got ‘Till It’s Gone

If you don’t want to read all my ramblings, here is what I want you to do to help protect and preserve the free and clear open web:

  1. Go to http://stopthemeter.ca and sign the petition
  2. Send all your friends, family, frenemies, school aquaintences and your neighbour’s cat to the same site and get them to sign the petition (well, maybe not the cat)
  3. Share the link on Facebook, Twitter and everywhere else you think someone may see it
  4. Go to OpenMedia.ca and educate yourself on this very important issue.
  5. Contact your local and government representatives and demand that the CRTC start protecting the rights of consumers, not just the rights of corporations
  6. Call your Internet Service Provider and tell them point blank you are not happy with what they are doing and that you want your internet to remain free, clear and uncapped
  7. Tell your friends about this issue and get them involved

And here’s why:

You may have heard some of your geeky friends talk about the major internet service providers in Canada pushing for new legislation to allow them to cap internet use and demand pay for “overages”. And you may have heard the CRTC – the decision making body put in place to ensure fair trade and practice in the communications space – has made some decisions in this regard that in no way favour consumers. What you may not know is that this move is the first step in what could become a stifling of the internet, a blockage of services and you ending up with a web that just isn’t what it used to be.

Why it matters to you

The crux of the situation is this: Up until the last few weeks your cable internet connection has been open meaning you pay the same if you download 5kb or 300 GB per month. The Internet Service Providers (Bell, Rogers, Telus and Shaw) don’t like this. They want to charge you a base fee for a capped service (say 20GB per month) and then charge you overages (say $1 per GB) when you exceed that cap. That may sound fair but in reality it’s not. And what’s worse, it may just be the first step in an attempt to stifle the web and force you to use paid services rather than the free ones that are currently available.

Although it might not seem like such a big deal right now, capping the web will become a very big deal very soon. New services like Netflix and other streaming media are popping up everywhere, and with them come new ways of using the web. No longer can you only surf web sites. You can download or stream movies and TV when you want where you want, you can use Skype to have video conversations with multiple people at the same time, you can stream music from a myriad of services. And as quality and compression improves these services put more and more loads on your connection. As a result, whereas right now you may only use 5GB per month and get your movies at the local video rental shop, a year from now you may use 60GB per month and watch your favourite TV shows and movies from a streaming service like Netflix, XBOX Live or iTunes. And if you do, your Internet Service Provider will stuff it’s big hands deep into  your pockets and pull out all your cash.

Here’s Strombo explaining it:

But isn’t that fair? Shouldn’t we pay for what we use?

This may sound fair, but in reality it’s not. As Netflix points out the actual cost of a GB of data transfer over wired lines is about 1¢, not $1 like they want to charge. And there is no real reason to cap downloads because the capacity is there. This is just a good old fashioned moneygrab. But there may also be a more sinister reason behind it, and it relates to the Net Neutrality debate that has been raging in the US.

The Internet Service Providers have a not-so-hidden agenda – to force you to keep using their services. It’s simple really: All the major Canadian ISPs also offer TV and video-on-demand services through their cable boxes. But now companies like Netflix infringe on this market. Why watch a pay-per-view movie on Shaw for $3.99 when you can watch all the movies you want on Netflix for $8.99 per month? The trick here is to make Netflix unavailable, or too expensive, so that people are forced to stick with the old content providers. It’s as simple as that.

Net Neutrality at risk

But there’s more to it than simply trying to force people to stick with their old cable plan. This move may be the first step in an all out attack on Net Neutrality. And that’s worrysome to say the least. Net Neutrality simply means that you pay the same price regardless of what type of content you download. So reading your email, checking updates on Facebook, downloading documents from work and watching videos on YouTube and Netflix are all bundled into your internet package. In short you pay for the use of the web, not its services. In the world ISPs wants you pay based on what services you use. So if you want to use just email and facebook you pay one fee, but if you want to watch streaming video on YouTube or use your internet connection for gaming you have to pay an extra fee. And when it comes to music, TV and video the many services out there are simply blocked and you are forced to use the services authorized by the cable providers.

Sounds insane, right? Well, it’s excatly what the ISPs in the US tried to do. And it’s exactly what the ISPs here in Canada will try to do if they get the chance. The bottom line is they want to make money, and the free and open internet is preventing them from doing so so they want to shut it down. Disturbing, right? Well, it gets worse!

(To see a great exlanation of Net Neutrality go to www.theopeninter.net)

The CRTC is not here to help you (!?!?)

Last year I reported Shaw Cablesystems to the CRTC for willfully crippling HD broadcasts on their regular cable. My argument was simple: You can get CBC, CTV, Global, CityTV and Omni in HD for free if you attach a clothes hanger to a cable and hang it out your windiw. But if you have Shaw cable you get a cropped SD version of these same channels and you have to pay for an expensive HD box to get access to the free HD signal. Furthermore this was around the same time the cable companies were trying to force these same over-the-air channels to pay for the privilege of being broadcast on the cable systems. You may remember it as the “Save Local” campaign and it was one ugly piece of corporate greed, willful misinformation and outright lies on both sides.

Anyway, I contacted the CRTC and after a lot of back and forth I got one of their representatives on the phone. What he told me was truly mindboggling: When I asked him why the CRTC was not acting in the best interest of the consumers he told me point blank “That’s not our job.” He went on to tell me, and I’m paraphrasing here, that the job of the CRTC is to ensure that the cable providers follow Canadian law and act in a fair way in the market. In other words that they don’t enter into price gouging and undercutting against each other. “So you’re saying if they all just agree to raise prices to an insane level, stifle service and generally screw over the consumers, the CRTC is OK with that?” I asked. And his reply? “Yes”.

The reality is that unless I was misinformed by this CRTC employee and I’m unaware of some other government entity that has oversight over this, the Canadian consumers are not being protected from price fixing by four companies who are basically allowed to run the show on their own. It’s kind of like the mafia really. And taking this into account things really start to make sense: Why our cell phone services are crappy and more expensive than anywhere else on the planet, why we pay more for cable than our neighbours to the south, why we can’t get Netflix, Zune Marketplace, Hulu and a whole pile of other services in Canada and why we, the consumers, are being screwed over again and again without anyone standing up and saying something about it.

Time for action

Not to be blunt or anything, but this bullshit has got to stop. Canadians are far too polite when it comes to issues like this, and the big corporations take advantage of that compliance. This is one of those cases where unless you stand up, let your voice be heard and tell your elected officials they are screwing things up for everyone, we are all going to pay for it down the road. Unfortunately I’m a mere resident of this country and I have no right to vote so I’m at the mercy of those with the power of citizenship in the matter. So here’s what you should do, right now:

  1. Go to http://stopthemeter.ca and sign the petition
  2. Send all your friends, family, frenemies, school aquaintences and your neighbour’s cat to the same site and get them to sign the petition (well, maybe not the cat)
  3. Share the link on Facebook, Twitter and everywhere else you think someone may see it
  4. Go to OpenMedia.ca and educate yourself on this very important issue.
  5. Contact your local and government representatives and demand that the CRTC start protecting the rights of consumers, not just the rights of corporations
  6. Call your Internet Service Provider and tell them point blank you are not happy with what they are doing and that you want your internet to remain free, clear and uncapped
  7. Tell your friends about this issue and get them involved

We are at a turning point in time. Up until now the internet has been free, clear and uncapped and as a result we have seen a massive emergence of new companies, new services and new ways of communicating, sharing and enjoying content. If the ISPs get their way, those days will soon be over and we’ll be moving backwards. That’s not acceptable. Stand up for your rights and take action!

WordCamp Victoria Presentation: 10 Theme Hacks to Improve Your Site


Above is the slide deck for my WordCamp Victoria presentation entitled “10 WordPress Theme Hacks to Improve Your Site”. Unlike my regular presentation this one is entirely slides based which means if you just read the slides, you’ll get the gist of it. Below are all my code examples along with links to further information, example sites and related tutorials to give you some context. Knock yourself out!

Replace Site Title with a Linked Image

This is my number one pet peeve. When people visit a site they intuitively expect the logo or header image to be a link back to the home page, and it should be. When it’s not they (and I) get annoyed. Making your header image link back to your home page is not hard. All you have to do is wrap the header image code in a simple anchor tag that leads back to your root URL and you’re good to go. For simplicity the code looks like this:

<a title="&lt;?php get_bloginfo( 'name' ); ?&gt;" rel="home" href="&lt;?php echo home_url( '/' ); ?&gt;">
 
… the image code …
 
</a>

For a more in-depth explanation check out the tutorial Twentyten Header Image as Home Button.

Enable WordPress 3 Custom Menus

The WordPress 3 custom menu function is built into the TwentyTen theme and most newer themes, but older themes usually just have hard-coded menus. Adding WP 3 custom menus to a theme is not hard though. It requires a function call in the functions.php file and a template tag in the template file of your choice (usually header.php and/or footer.php). Here’s that code:

In functions.php:

register_nav_menus(
        array(
                'menuName' =>__('Menu Name'),
                ' primary' =>__('Primary Menu'),
                '2ndMenu' =>__('2nd Menu'),
        )
);

Where menuName is the identifying slug for WordPress and Menu Name is the actual displayed name in WordPress Admin.

To display a menu you can either call it based on the slug:

<?php 
        wp_nav_menu(array(
                'theme_location' => 'primary'
        )); 
?>

… or the name defined in the Menus admin area:

<?php 
        wp_nav_menu(array(
                 'name' => 'Menu Name'
        )); 
?>

Menus Outside the Box

Menus don’t have to be regular boring one or two word one-line elements. Because WordPress allows HTML in the Navigation Label you can add more interesting designs like we did on the 12×12 Vancouver Photo Marathon site. On this site we added a simple span tag around the text that displays under the menu heading and then used CSS to change how it displays. Sorry, no code examples – it’s just straight up CSS and out of context it makes no sense.

WordPress 3 Custom Background Images and Colours

The TwentyTen theme introduced a very cool custom background function built right into the admin interface (under Appearance -> Background). This is not a function found in TwentyTen but a core function found in WordPress. That means you can activate it in any theme. All you have to do is call it from the functions.php file:

add_custom_background();

The function injects CSS style code right into the HTML pages which means it’ll override your theme CSS file no matter what. That in turn is why it’ll work on any theme as long as you run WordPress 3.0 or higher.

Adding Featured Image (post-thumbnail) Functionality

Featured images are great, if you know how to use them. They also do way more than just displaying thumbnails (which is why I think the function should be renamed). To activate the function add the following code to your functions.php file:

add_theme_support( 'post-thumbnails' );

This will add the function to you Admin panel. To display the featured image (in the size you want) in your theme use one of the following functions:

<?php the_post_thumbnail(); ?>

Variations:

<?php the_post_thumbnail('thumbnail'); ?>
<?php the_post_thumbnail('medium'); ?>
<?php the_post_thumbnail('large'); ?>
<?php the_post_thumbnail(array(nnn,nnn)); ?>

Custom Page Templates

Custom page templates allow you to individualize the look of different pages on your site. They can be used to create custom front pages, differentiated legal pages or even custom query pages that pull in posts from multiple categories.

A custom page template is basically a regular page template with a commented out tag at the very top that looks like this:

<?php 
 
/* Template Name: Whatever */ 
 
?>

Custom Category Templates

Custom category templates can be used to create differentiated category index sections in a site. Some good examples are the Reeltime Videoworks show reel page and testimonials page and Design Schooled Kids’ press page.

A custom category template can be made in one of two ways. Either create a file with the name category-ID.php where ID is the ID number of the category or category-slug.php where slug is the slug for the category. These files will automatically become the category tempaltes for the defined categories.

Custom Header, Sidebar and Footer

You can also create custom headers, sidebars and footers sort of the same way. You make and call them the same way. For example if you want a custom header you create a new header file called header-custom.php and then call it using the standard get_header() function with a small difference:

<?php get_header('custom'); ?>

where ‘custom’ can be anything.

Better Context Links

One of the things that bug me about standard WordPress themes is that they display links to the next and previous posts in the single post view. These links don’t really provide a lot of value. Instead you should be displaying the two latest posts from the current category. So I made a small theme add-in you can dump into your theme for some better context. The add-in adds links to the two latest posts in the current category including the title, publishing date and short description. To install it download the related.php file here (right-click and choose “Save As” – it’s a straight up php file), add it to your theme directory and call it using the following code in your single.php file:

<?php get_template_part('related'); ?>

That’s all you have to do.