How to fix a broken jack and save your headphones

So I was on the plane, really pressed for space and trying to listen to music, when this happenned:

After struggling to extract the broken tip of the jack my iPod touch, I decided I couldn't let this stand and had to fix it. The materials to fix a jack are quite simple, you need a new jack (duh), a soldering iron and solder, and your favorite glue or heat-shrinking wire sleeves. Also a knife and a clamp.

First thing: getting a new jack! I had a pair of broken headphones lying around, so decided to sacrifice them - sorry sis, they served me well. Rest in pieces. :'(

Now we face the problem that the particular brand of headphones I was trying to fix (Skullcandy) use a 4-chanel jack. In addition to right, left and ground pins the jack has a microphone+control pin. But all of the headphones I could find lying around use the more common 3-pin jack, so I decided to lose the microphone and fancy control buttons. Why not just order a 4-pin jack at Maplin's? The reason is simple.

Also if I ever do stumble across a 4-chanel jack, it shouldn't be too hard to make the microphone work again. And so we proceed to remove the original jack casing, trim the cable a touch and expose the wires. Unfortunately the jack casing on these headphones had an obnoxious amount of glue, so it will no be re-usuable. Be careful when stripping the wires to not cut too many of them off.

Ever heard the saying 'Red is Right, bLue is Left, Ground the rest' ? Well it doesn't matter, because in this case the ground was BLUE, and both Right and microphone+ wires were RED. This was incredibly confusing and after connecting them wrong at first and getting horrible distrostion and feedback, I decided to google it - in retrospect that's what I should have started with - and turned up this amazingly accurate wiring diagram :

Glossing over how, ahem, botched the solder was, the pins were connected and the result was wrapped in a bunch of heat-shrinking sleeves, and voila.

Yay! Fixed! :) The sound is exactly the same as previously, in fact stripping the wires and re-soldering them seems to have increased the maximum volume. As expected none of the control buttons work any more, but meh.