Coder Lounge part 2

By John Ennew | 31st October 2012

The Deeson Drupal Devs attack Drupal 8 core issues for the second month in a row.

Fixing problems when you see them and cleaning code as you go might cause you delays in the moment but can pay you back many times over in the future.

The Deeson Online developers get involved in Drupal 8 core development, including action photos!

Software design patterns are an important part of every Software Engineers toolkit. This article is a short discussion of what it is, why it's important and where to find out more.

When a site developer exports a feature to code, all the values stored against that feature on the site they export from are saved into code. It may be necessary to customise one or two of those variables for a particular environment later. If the export uses ctools then there is a hook that can alter an exportable as it's being imported.

If you use a Boolean field with radio buttons in Drupal 7, the false radio button outputs before the true. This became an annoyance to us whilst working on mega-sized forms, so here's our fix. To fix this you'll need to create a custom module, and implement the hook hook_field_widget_form_alter(). The following code assumes your module is called 'example'. All the code does is reverse the order of the options whilst preserving the keys, simple!

The purpose of this walkthrough is to achieve a link with a tokenised taxonomy URL. This is sometimes required if you have a content type with a taxonomy field of Author or Issue and you want to link to a taxonomy page or view using taxonomy values as contextual filters. Or for instance you want to theme a taxonomy field output on a node page and you are using the taxonomy value as part of a custom URL.

Here is a handy tip for people using the variable module to get a list of all the possible types of variable the variable module supports.

You might find it desirable to place views template files into a module rather than the site theme. If the module is a feature which contains a view and is something that you might want to use on another site, then it makes sense to group the view and it's templates in the same module. The following article describes how to tell views that your module contains views template files and how to tell features that you want to tell views that the module contains views template files.

We are enjoying using the Drupal Commerce Framework. Here are a few programming tips.

When you want even more control over an outputted field than display suite expert mode allows, you can put a theme function in template.php file. This article describes a neat design pattern for developers to use to experiment with a gives an example of how you might use it.

(Corny title, we know :) ) It's not often that we'd do a post on a single module, but today is that day... Extended path aliases: http://drupal.org/project/path_alias_xt

This is just a small post, but also a cautionary tale. From the moment you start working with Drupal and Javascript, you'll notice that the awesome jQuery library is thrown in for free. Not only that, but you've also got jQuery UI...

Some best practice advice on managing multiple users on a remote Linux server. When you might have several users logging into the same server to edit the same files, how should you manage your file permissions, so that they don't lock each other out?