Deetector – device and feature detection for ExpressionEngine

Since launching this site, I've talked about a couple of different techniques that have dealth with responsive web design. The first,Responsive images with ExpressionEngine, revolved around device detection, andResponsive Layouts with ExpressionEngine on detecting screen size. This time, I'm introducing a plugin that does both!

As pointed out in the comments ofResponsive images with ExpressionEngine:

The idea with responsive web design is that your content responds to facets of the visitor's device (e.g. screen size, bandwidth, etc.). The user-agent string is *not* one of those facets. Any solution based around UA-sniffing is going to hit two problems:

  1. False positives. Incorrectly identified a large screen devices as a small screen device and visa-versa (this tends to happen with newly-released tablets and other devices that simply weren't around when the regex was written).
  2. Simply not accounting for small-screen devices with smaller market share (either because they've been around for a long time or because they've just been released).

I'm not going to argue those points. But… the add-on I've been working on does do device detection. But it also does a lot more too.

The add-on is called Deetector and is based on Detector by Dave Olsen. Head over to the Detector page for a description of what the library does and how it does more than just user agent sniffing.

Deetector is just a straight implementation of the library for ExpressionEngine, turning all the values that are returned into variables that you can use in your templates (full list on the Github page).

As well as detecting user agent, browser, operating system, whether a device is mobile, tablet, computer or spider, and the same sort of HTML and CSS features as Modernizr, Deetector will also tell you the screen size and height of your device, so can be used as a more fully-featured upgrade to the RESS add-on that I developed last year. The {window_width} variable can be used as a direct replacement for the {ress} variable.

To detect the screen size, the Detector library needs to be accessed by scripts added to the <head> of your page (i.e. in your templates). Because of this, the Detector library is included in the third_party themes folder, rather than the third_party add-ons folder (because add-ons can be moved above webroot, whereas themes has to be below). Slightly unusual for a plugin to have its own themes folder, but that's the reason why.

All of the variables listed under the Browser/OS and Device headings in the example will return actual unique values whereas all the others will return either TRUE or FALSE.

This add-on has only been tested on my MacBook Pro, iPod Touch (3rd Generation), iPad 2 and HTC One XL so far. But one of the warnings, about getting incorrect results in the user agent string, has already come to light in my testing.

  • On the MacBook Pro, everything was fine with Chrome, Safari, Firefox and Opera all being identified correctly, and all identifying the OS correctly (although Opera reported a colour depth of 32 compared to 24 for the others). All identified themselves as 'desktop' browsers.
  • On the iPod Touch, both Chrome and Safari reported themselves as Mobile Safari although the full user agent strings were slightly different. Opera identified itself correctly, but again had a different colour depth value (4 as opposed to 32 for the other two). All identified themselves in the 'mobile-basis' browser family.
  • The iPad returned the same results for Chrome and Safari.
  • The HTC One XL gave some interesting results, mainly in how the different browsers identified the device. Chrome came closest, saying the device was a One X, the built-in Android browser said it was a HTC Eva, Firefox said it was a Generic Smartphone, and Opera wouldn't display the page at all. Chrome, Android and Firefox all identified their browsers correctly although Firefox said the device wasn't hi-res capable when the others did and it also said the colour depth was 16 compared to 32 for the others. But Firefox also said the window was twice as high and wide (1134 x 720 compared to ~560 x ~360 for the others). I've only mentioned the screen size for the One XL because it's the only device where the reported values differed widely between browsers. All the others were pretty much right on the money.

So you can see that you still need to be careful with the information that this plugin provides you with. But even given the provisos, I think it provides quite a flexible toolkit with which to build sites that work on a variety of different devices.

Note: Variables for audio, video, input and inputtypes have been commented out in the plugin because they were causing errors which I couldn't track down. This has been my first plugin working with an external library and I've had to learn a lot along the way (thanks to Low and Adrian Macneil for helping me out), so if you have any idea what might be causing the errors with the variables above, or find anything else not working right, please let me know.

Download the plugin from Github

Find out what others have had to say and join the discussion.

A little spring cleaning

It's been on my to-do list for a little while and today I updated the mixes page to replace MediaElement.js as the audio player with SoundManager 2. I found that MediaElement was slowing down the rendering of the page with a large amount of mixes on it, and SoundManager doesn't have that problem.

As I was updating the javascript that controlled the audio, I took the opportunity to update a few of the other bits and pieces too: I replaced Colorbox with Fancybox and have also decided to do away with displaying latest Tweets so didn't need the rotating script that was handling that either. I also removed ShareThis a little while ago in favour of a lighter-weight approach.

I've also reworked the main navigation so now it's permanently at the top of the page. So all in all, nothing too major, just a few little tweaks that will hopefully make the site perform a bit better.

There have been no comments on this entry so far. Why not be the first?

New mix — Third Incarnation

The cover ofThe Darkness by Rocky and Sphera

After I did my last mix back in May I thought I'd probably get back to the sort of frequency of output I was achieving last year but here it is, another four months later and I've just gotten around to it.

As with last time, I've had stuff come up that has taken priority, and on this occasion it was the redesign of my other site which was occupying my spare time, which is also what gives this mix its name as it's the third design of the site since it was first launched seven years ago.

There's a few stand out tracks on this mix:The Darkness by Sphera and Rocky, the Artifact 303 remix of The 10th Life by John 00 Fleming, the Still Around mix ofSomeday by Sinister Silence, and Highest Technology by Egorythmia and E-Clip.

I realised when putting this mix together that I have about 100 tunes still waiting to get through, so I probably won't be collecting too many new ones as I work my way through the backlog.

Tracklist is below and you can download it from the Mixes page.


  1. Kino Oko – Supreme Protection [Sun Station Records]
  2. Neon feat. Sensation of Instinct – Binar Clouds [Cyan Music]
  3. Feel – New Age [HorsePower Productions]
  4. New Age Hippies – Trance Humanism [Cyan Music]
  5. AstroPilot – Emptiness [Sun Station Records]
  6. Ritmo – Dimension [Synergetic Records]
  7. John 00 Fleming – The 10th Life (Artifact 303 remix) [JOOF Recordings]
  8. In'R'Voice – Seeing Far Beyond (Disentangle remix) [Kissthesound Records]
  9. Sphera, Rocky – The Darkness [Echoes Records]
  10. Tripical – The Land of Free [Sun Station Records]
  11. Liquid Soul – Hypnotic Energy (Double Click remix) [Plusquam Records]
  12. Cimi – Monkeys & Peanuts [Selknam Records]
  13. Prokaion – G-Spot [Ektoplazm]
  14. Sphera, Mindwave – Perception [Iono Music]
  15. Sideform, Lyctum – The Eclipse [Yellow Sunshine Explosion]
  16. Sinister Silence – Someday feat. Camille Jones (Still Around mix) [Iboga Trance]
  17. Ritmo, Motion Drive – Big Eyes [Iono Music]
  18. Impact, Static Movement – Atlantic Spirit [Iono Music]
  19. Protonica – Floating Point (Liquid Soul remix) [Iono Music]
  20. Normalize – Brain Damage [Plusquam Records]
  21. Lyctum – Consciousness [TesseracTstudio]
  22. Egorythmia, E-Clip – Highest Technology [Sourcecode]

There have been no comments on this entry so far. Why not be the first?

Farewell London Olympics 2012

It's with a touch of sadness that I say farewell to the 2012 London Olympics. The sort of sadness that you feel when you say goodbye to a friend who's been staying with you for a little while. You know you'll see them again but you'll miss, at least for a little while, having them around.

I don't consider myself a sports tragic (I watch and participate in much less sport now than I did when I was younger), but for the last two weeks, both my wife and I have been right into the Olympics, watching it every night, and for me, every morning after having dropped the kids off to school and daycare. Instead of checking emails when I first open my laptop in the morning, I've been going to the website of the Australian Olympic team and the official games website to check up on the results from overnight. Pretty much the only channels we've had on for the past two weeks have been Channel 9 (yeah their coverage hasn't been outstanding, but not that bad either) and ABC2 for the kids, and the latter, which normally dominates in our house, has been relegated to the silver medal position. ;)

The way in which I've been caught up in the whole Olympics spectacle has kinda caught me by surprise this time around. I'm not sure why, because I've always loved the Games in the past, and am always a keen follower whenever they're on. But this time around, even though I was aware that the Games were coming, I didn't really look forward to or even think about their impending arrival until a couple of days before the opening ceremony. But from the day of the opening ceremony, for the last two weeks, I've been hooked.

But just what is it about the Olympics that captures the imagination and inspires such keen interest, more so than any other sporting event (at least for me these days)? I've been thinking about it a bit the last few days — why am I so interested in the performances of people that for the most part I've never heard of, and even those I have, the exploits of whom I don't follow that closely on a regular basis? And it's not just athletes from Australia either.

Is it that you see people performing extraordinary feats of skill, power, endurance or artistry? Or the sense of excitement when witnessing close finishes, particularly those of athletes from your own country when you're willing them on to cross the finish line first? Or seeing the premier performers in a sport in which you have an interest?

Those are all certainly compelling reasons, but I think what it is that does it for me is the amazingly powerful displays of human emotion, not just from the athletes themselves when they win (or in some cases, when they don't), but from the people at the venues witnessing these incredible feats. The huge roars that have erupted from the combined voices of thousands upon thousands of people when witnessing dramatic wins or world records, all united in the same moment of passion and excitement, and that have felt just as powerful 16,000km away through a TV in a suburban living room, have given me goosebumps, and in some cases made me well up just a little.

Usain Bolt winning the 100m final, and then again the 200m, to become the world's greatest sprinter, David Rudisha setting a new world record in the 800m, the US women doing the same in the 4 x 100m relay, Britain's new sporting hero Mo Farah becoming only the seventh man to win both the 10km and 5km races, Chris Hoy eclipsing Steve Redgrave to become Britain's greatest Olympian, and from an Australian perspective, Sally Pearson fulfilling a 12-year ambition to win the 100m hurdles, and Anna Meares overcoming an intimidating home crowd to defeat 'Queen' Victoria Pendleton in the cycling sprint — these are just some of these overwhelmingly powerful, thrilling, astonishing moments of raw emotion.

Over the years, it's always been the music, movies and books which elicit strong emotional responses which have become my favourites, and it is just that sort of extraordinary feeling that elevates the Olympics to be more than just a sporting event, or more than any other sort of sporting event.

Grand finals in ALF that have featured my team (West Coast Eagles) or world Cups in football, rugby and cricket are certainly comparable events, and there's no doubting the excitement that surrounds them (I've been a spectator at both cricket and rugby world cup matches) but at the end of the competition, there is only one winner, so you end up with half the crowd ecstatic with joy, but the other half disconsolate. With the Olympics, there can be hundreds of winners, with countries that don't normally feature on world stages having the chance to bring home gold and bask in the spotlight for a while, at the same time instantly creating new national heroes and role models. Role models that can inspire a younger generation to emulate their feats (exhibit A: Sally Pearson who was inspired by Cathy Freeman winning gold in 2000 to do the same in her event 12 years later).

The highlights

I've mentioned some already, but here's a few more:

  • Usain Bolt winning individual gold in the 100m and 200m sprints and as part of the 4 x 100m relay team to confirm his place as the world's greatest sprinter. But not only that, probably athletics greatest showman too. He really does have a rare combination of confidence and cockiness without coming across as a totally arrogant dick. He seems to have a good sense of humour too and I predict a career in television awaits when he hangs up his spikes. Apparently Shane Warne's been talking to him about the possibility of him playing in a 20/20 match down here!
  • On the subject of Usain, Channel 9 might've copped a heap of bagging about their coverage of the Games, and yes the questions posed by some interviewers were a bit inane and insensitive, and yes they featured too much swimming, and yes a lot of other worthy sports got next to no coverage at all, but things they did do right were Karl Stefanovic's interview with Usain, and having Michael Johnson, Linford Christie and Daley Thomson appear as a panel of experts (and individually) on more than one occasion. Michael Johnson in particular is a really insightful and captivating speaker and was a real pleasure to listen to.
  • Jessica Ennis, Mo Farah and Greg Rutherford all winning gold within an hour of each other to send the crowd in the Olympic stadium into a frenzy on what was to be dubbed Super Saturday.
  • And then a week later, Mo doing the long distance double, in the process working the crowd into such a state that eardrums for miles around took a battering.
  • World records by the Jamaican 4 x 100m men's relay team, the US 4 x 100m women's relay, and David Rudisha of Kenya in the 800m. There were actually 38 world records broken, but these ones stand out for me because the events were held in the Olympic stadium in front of the raucous 80,000-strong crowd.
  • The British doing so well at their home Games. I know as an Australian that we're supposed to try and bash the Poms over sport whenever we get the chance (like they do with us) but there's no denying that they were superb at this Games and deserved all the success that came their way. And not just the people in the events, but also all the people who turned out to support the events and created such a festive, buoyant atmosphere.
  • Michael Phelps adding to his total of 22 medals to cement his place as the greatest Olympian ever and retiring on top.
  • BMX racing — man, what a crazy sport! The guys and girls who go round in this are hard core with nearly every race seeing someone hit the deck hard. Certainly near the top of the list for level of excitement across all races.
  • And London itself. It may be because I lived there for several years and was feeling nostalgic for my former home, but London looked great! The new venues at Olympic Park were certainly impressive but couldn't match cycling and running races through the centre of London past such famous landmarks as St Paul's Cathedral, Trafalgar Square, Admiralty Arch, and Buckingham and Hampton Court Palaces. Then there was the beach volleyball at Horse Guards Parade, the equestrian events at Greenwich Park and the grounds of the National Maritime Museum, Archery at Lords, tennis at Wimbledon (where else), and the triathlon at Hyde Park. All these venues steeped in history provided an amazing backdrop for the drama unfolding on the arenas.

Things I learned

  • BMX is a crazy sport! Seriously, they're mad.
  • Handball is a crazy sport! Seriously, they're mad. Not sure why it hasn't taken off down here, because it has the sort of athelticism and excitement that seems like it'd go down well in Australia.
  • Carl Lewis doesn't have many fans in the athletics world. Usain Bolt copped a bit of flak for mouthing off about Lewis’ lack of respect, but it seems like he was just saying more publicly what a lot of other people thought and felt, particularly Michael Johnson. It  was pretty funny to see Johnson, Daly Thomson and Linford Christie taking the piss out of Lewis’ foray into ‘acting’.
  • Tae Kwon Do is not a good spectator sport. I've seen demonstrations of Tae Kwon Do before and fully appreciate the strength and skill that is involved in it, but that impressiveness just doesn't translate onto the mat at the Olympics. It's maybe that the competition form of the sport doesn't allow for the contestants to display their full range of skills, but from the bouts I saw, out of all the sports I witnessed at the Games, it was the one that looked most like I could've probably had a go.
  • Sailing is also not that exciting. Even though the sailing at this Games accounted for nearly half of Australia's gold medal haul, I found it hard to get excited as the Aussies secured their medals. Maybe it was because in one case, they'd already sewn it up, or maybe it's just because the boats seem to move so slowly, or maybe because there's so little crowd noise. Fair play to them and huge congratulations, and it sucks that the NSW Institute of Sport is thinking of cutting funding to the sport, but the achievements at Weymouth didn't really excite me that much.
  • Northern European countries are now really good at beach volleyball which I find quite surprising given that places like The Netherlands, Germany and Latvia aren't known for their beaches.
  • The reason marathon runners are so scrawny is because they purposely put themselves on a diet that is designed to eat away at their muscle mass in the weeks leading up to a race, so that they can basically pig out in the last week or so to give them stores of energy that they can draw on in the race. Or something like that.
  • The reason the marathon is the length it is is because back in 1908, the course was lengthened slightly to start from in front of Windsor Castle so that the royals of the time could get a front row seat.
  • Kiprotich must be quite a common name in Kenya and Uganda.
  • Road cyclists are like someone's spliced the upper body of a marathon runner onto the lower body of a weightlifter.
  • I should follow up with something insightful about the weightlifting, but I didn't see a single live view of any weightlifting, only snippets in highlights packages, usually of bars falling on people's heads or backs. :/
  • Bradley Wiggins has very impressive sideburns.
  • Long distance swimming is not a sport for people who like their personal space.
  • One Direction are seriously underwhelming (never seen them before) and Ray Davies is well past his prime.

I'm sure there's more that I've forgotten, but there's been so much happened in the past two weeks (should've really kept notes).

The next two Games that Australia will be involved in will be interesting: the 2014 Commonwealth Games in Glasgow — how will Glasgow measure up against London? (I can't see them matching to be honest), and the 2016 Olympics in Rio —  all the excitement and drama of the Games paired with all the excitement, colour and flair of Rio's Carnivale, surely got to be a winner. After having been in London for the Sydney Olympics, and back here for the ones in London, I'm quite keen to get amongst it and sample some of that vibe at the Gold Coast in 2018 (although I know the Commonwealth Games don't generate anywhere near the same buzz).

So now life goes back to its usual routine. Although maybe not exactly the same. I'm hoping I can carry some of the inspiration I've felt and witnessed into day-to-day life and find little pieces of extraordinary in each day. It's a challenge to be sure — to push yourself to find, create or do something every single day that you haven't done before — but what is the point of having sporting heroes if they don't inspire you to follow their examples?

There have been no comments on this entry so far. Why not be the first?

First mix for 2012 — Homecoming

Reality of Life by Nova Fractal is featured onDimensional Gateway 2 a compilation of Goa tunes.

Wow, we're well into May and this is the first mix I've managed to do for the year. The reason for that is because we've been renovating our house and had to move out from January through April.

As my DJ set up is just my laptop and a midi controller which is smaller than the laptop, I could still have been doing mixes but the past few months have been pretty full on in many respects and I just didn't have the time or inclination.

That's also meant I haven't had as much time for collecting new music but there have still been the odd few that have been added to the collection. Most of the tunes on this mix have been sitting waiting patiently for me to get around to them although there's a couple like the Prot remix ofOuterglow which I've picked up more recently.

This is another full-on psy trance mix which follows a similar formula to a lot I've done: starting off which some rumbling progressivey tunes before picking up the pace while moving through different flavours and then ending with one of my favourite tunes of last year which is actually a Goa trance tune,Reality of Life by Nova Fractal, a top drawer psy and goa producer from Croatia. He's been popping up on various compilations for a while and I first heard this tune on a mix by DJ Celteric last year. If you likeReality of Life, definitely check out that mix too.

Tracklist is below and you can download it from the Mixes page.


  1. Stellar Magnitude – Outerglow (Prot Remix) []
  2. E-Clip – Salvia Divinorum [Iono Music]
  3. Ovnimoon, Middle Mode – Izolan [Ovnimoon Records]
  4. Zen Mechanics, Egorythmia – Dragonfruit [Iboga Trance]
  5. Mantra Flow – Pyschedelic Epiphany [Panzar Produktionz]
  6. Burn in Noise – Vuuv Festival Celebration [Iono Music]
  7. Magnus – The Chase [JOOF Recordings]
  8. Prokaion – Muses Rapture [Ektoplazm]
  9. Sonic Spice – Deep Space [Pyrethrum Records]
  10. Dreads Control – Mr. Black (Acid Lizard Remix) [Mind Tweakers Records]
  11. Paratech – Nature Link [Ovnimoon Records]
  12. Sunday Light – Made of Stars [Yo Soy Records]
  13. Terra – Fractal Journey (Via Axis remix) [Ovnimoon Records]
  14. Magnus – Autobahn [JOOF Recordings]
  15. Hypnoxock – The Seven Moons (Live Edit Remix 2005) [Astronautic Records]
  16. Ital – Waves of Nature [Sun Station Records]
  17. U-Recken – Whale Song [BOA Group LTD]
  18. Interconnekted – Celestia [BMSS Records]
  19. Fearsome Engine – Drugganaut [Nano Records]
  20. Aquila – Alice (Ephedrix remix) [Sun Station Records]
  21. Space Tribe, Mad Maxx – Peak Experience (Kailash mix) [Space Tribe Music]
  22. Nova Fractal – Reality of Life [Neogoa]

There have been no comments on this entry so far. Why not be the first?