Drupal code

  • ComputerMinds - move into new premises

    ComputerMinds have moved!

    We are all settled in to our new offices on the triangle and are loving the new office - we just can't wait for the summertime so we can enjoy our courtyard (wi-fi has been tested and confirmed working - just need to figure out some kind of sun visor for the screens).

    Our new address is

    Lower Ground Floor, 20 Meridian Place, Clifton, Bristol, BS8 1JL

    Phone numbers etc remain the same (quite how BT managed this without getting something wrong we will never know!).

  • Views caching

    A little while ago I blogged about views content cache as a way to increase performance of your Drupal site. Today I released version 2.2 of the module, that adds lots of lovely features.

  • Page manager redirect

    Quite often you need to redirect a particular path on a Drupal site, there are a number of ways to do this, but most involve writing PHP code. Also, it's not hugely easy to do things like redirect node/%node but only when %node is a 'image' node, posted on a Tuesday. The awesome Page manager module, and a little utility module we wrote changes that.

  • Views content cache

    Views is awesome. You get a ton of flexibility and power, but that comes at a price: Some of the queries that views produces are less than optimal, and the rendering of results can take a long time. Views 2.6 introduced a nice solution to some of the issues, with the introduction of caching plugins.

    Views itself comes with a single cache plugin (okay, okay two if you're really counting) that is time-based. So you can say: "I don't care if I show content that's 6 hours old" and it'll handle it fine. I've been thinking for a while that there should really be a better way, if you've got a view listing blog posts, you only really need to flush the cache on that view when a new blog post is added, or and existing one is updated or deleted. After a client really needed this, I looked into it and found some code lying around in the views issue queue written by huesforalice. I cleaned it up some and created a module, presenting:

    Views content cache.

  • Drupal(Vol)Con 2010

    Computerminds were due to attend the latest DrupalCon over in San Francisco, however Eyjafjallajokull had other ideas. With planes grounded and Europe at a standstill (in the air) we couldn't make it.

    However, an amazing bunch of people came together a couple of days before the start of Drupalcon proper to set up: DrupalVolCon London.

    DrupalVolCon was really cool, we watched the drupalcon keynotes from SF on a projector, and ate lots of pizza. We also presented sessions to each other, unconference style, here are some of the highlights:

  • A nice way to view node teasers

    Want to check what your nodes look like as teasers really easily? Fire up the views module and import the attached view. It adds a 'Teaser' tab to nodes alongside the View/Edit/etc. tabs, so you can select it and the node is displayed as a teaser (or you can go to node/<nid>/teaser manually).

    Simple but effective :-)

  • Automating boring tasks with Selenium IDE

    If you need to perform the same repetitive task on a bunch of nodes you can script the operation using PHP, but sometimes it can take a long time to write and test the PHP and even then you have to get the script to the server and execute within a certain time etc.

  • Nodequeues for developers

    Nodequeues are a really useful way of building ordered lists of content and they integrate amazingly with views and have quite a nice interface for adding/removing nodes. Out of the box you can create queues and choose node types that can be added to the queues, and roles that can manipulate the queues, with a little more effort and some code you can do a lot more. We had built a media competition feature for a client; they can create a competition into which users can post photos or videos that can then be voted and commented on.

  • Hudson and Simpletest

    We've recently set up a Hudson Continuous Integration build server to help us with testing our sites. We got selenium up and running fairly quickly, it installs and tests all the sites and Hudson has aplugin to report the results from selenium tests. But we also wanted to run simpletests and report those results too. This article explains how I've set it up on our server, and will hopefully give you a head start on the way to getting it set up on yours.

  • Using Drush export content type, and views

    We're not sure what to do with these: we've written two simple Drush scripts for exporting content types and views. Saving us from having to navigate a few pages and precious seconds.

    Download them and pop them somewhere Drush can find them, a good candidate would be in ~/.drush

    Then you can run them by typing:

    drush export view <view_name>


    drush export content type <type_name>


Subscribe to our RSS feed Subscribe to Drupal code