Developer Zone

12 tips to get your website humming for the holidays

Its focus is on drupal, but the concepts can be applied elsewhere. It is all standard stuff, but with some QA and load testing links at the end.

Christmas is coming

Christmas is coming the .gz is getting fat. Please do fputs a $penny in the $old-mans-hat[];

or some other even more witty introduction. Advent is here, it time to stop complaining that there are christmas adverts in shops or on telly and open the calenders:

Drupal 7 Media by Liran Tal

Image of Drupal 7 Media

Having read through Drupal 7 media, I can honestly say I am quite impressed.

For once a book like this doesn't start with the obligatory chapter on installing and setting up drupal, quite a refreshing change, but instead leads off with an explanation on nodes and entities and then focuses on setting up a content type for dealing with media using the image handling features that come with drupal by default

Mixed Inline and header defined ad units

I thought I would share my experience of trying to implement both the header definition style alongside the inline definition style, so that I could allow editorial staff to choose whether or not to place adverts in the body of an article.

Postscribe for ad delivery

This slideshow suggests that its benefits include: It is possible to load ads after a full page load including in an ajax call.

I think it may also be possible to include a layer of security into the ad delivery essentially we can strip out any js we don't want to be introduced into the site e.g. removing document.writes.

Google tag manager may be useful after all to a developer wishing to open up the ability for ad teams to insert their own ads, without giving full backend access.

Designing systems not pages

Having been through the re-development process quite recently I have walked away with the notion that it could have been done better. Not that the design could have been better or that the build could have been done better, but the process could have been easier. Communication could have been more fluid and guesswork and follow up discussions could have been reduced if the transfer of ideas had been more robust.

Responsive DFP ads

I liked the implementation in this blog post about how to define DFP ads based on the browser window size, its an interesting read, but the part that caught my attention was titled "Showing / Hiding Ad Slots Without CSS" were ads are only defined if the window width is within a certain size during page load.

It would mean that the different advert sizes would probably need to be set up in DFP, but once set up they would only be called by the appropriate device.

EntityFieldQuery stopped working for non-logged in users

I have a block that displays data from various nodes. It does calculations based on a few fields that exist in these ndes.

Recently it stopped displaying for everyone except user 1.

Simple solution was to make sure my EntityFieldQuery was run using the user 1 account by adding MetaData to the query.

I found this in the docs, but I must admit its been a while since I've had to check it out and I think it has been added since

Dopl test page

The project link filter is a tiny, yet useful module, which adds a filter, to facilitate linking to projects.

Lots of us blog about Drupal projects, or mention them in our forum discussions. Linking to a Drupal project, each time it is mentioned is a bit of a pain. This filter lets you write something like "views. module", and it generates a link to views module page (

Drupal 7 Webform Cookbook by Vernon Denny

Image of Drupal 7 Webform Cookbook

Being a developer I must say that I don't often resort to using the webform module, preferring to hand code any forms that are needed on a site, however a collegue of mine recommended using webform to create the form and using hook_form_alter to add in my own validation, submission handlers and other custom functionality, which I thought made a lot of sense.