Category: Coding

  • Adding classes to the Drupal image_formatter link

    So you are using Drupal, and you are outputting an image field from a node to the screen.  You have it set up so that the display is using an image_style to generate a thumbnail, and you are linking to the full size image.  All great, except you want an additional class on the link….…

  • Writing Drupal Context conditions plugins

    Fantastic guide at http://dtek.net/blog/extending-drupals-context-module-custom-condition-based-field-value on how to write a context condition for drupal.

  • Ordering WordPress taxonomies

    I came across an issue the other day when I was working on The Band Company website that required me to order a taxonomy numerically.  The issue was, that even though the items that I was ordering were numbers, they were being ordered alphabetically.  This is what I did to solve the issue.

  • Night Visions

    Night Visions

    This is the album that I am spending most of my time coding to at the moment.  Enjoy.

  • Using Drupal’s hook_views_default_views_alter

    I came across an issue recently with a Drupal installation that I am working on that required me to use hook_views_default_views_alter, and found that the help out there was minimal.  I finally got what I was after working, but with much debugging using the Devel module and dpm.  I thought that I would put down…

  • Coding album of the month

    As with most developers, I like to listen to music whilst I code.  The one that I have been listening to the most at the moment is Don’t Look Now by Way Out West.  Check it out on Spotify below. Its basically a chilled out techno, dance music style album, not too dis-similar to Chicane.…

  • Developer Happiness: The Etsy way

    I just wanted to link you into this video from Etsy.  Well worth a watch. [youtube http://www.youtube.com/watch?v=22EECFEk9Xs]

  • Best way to test email

    One thing that can be difficult to test is email, get it wrong and at worst you can end up sending confusing and misleading emails to your clients.  Its easy to get a webserver and a local copy of the database set up, but what about a local email server. One approach is to create…

  • Debugging PHP, with breakpoints!

    One thing that I have always disliked about PHP development was the seemingly difficult debugging process that came along with it.  The fact that you would save a file, and then have to open it in the browser to see what’s going on – sometimes to random results.  There was none of the usual ability to step…

  • Theming WordPress using Thematic and Compass

    Theming WordPress using Thematic and Compass

    Recently I have started to play with making my own themes for WordPress. Rather than start from the ground and reinvent the wheel, I decided to use a base theme which I can then extend. I also opted to use the brilliant Compass css framework to speed up development. Im going to talk about how…