Planet image

The articles on this page are ComputerMinds' contribution to the Planet Drupal aggregated article feed.  Planet Drupal is intended to collate interesting and useful Drupal content from around the web.

Article
Posted on 14th June 2011
Takes about 7 mins to read

The code that runs http://api.drupal.org is of course Drupal, and it is essentially just scanning the code it's told to and displaying it in a nice format. You can quite easily set up your own API site that you can use to scan your own custom code, or if you're a module developer, your module's documentation (you do have documentation in the code right?) I'm going to outline how we can use Drupal and Jenkins...

Published in: #Drupal Planet #documentation
Article
Posted on 25th May 2011
Takes about 1 min to read

Drupal 7's database layer is awesome, it is built upon PDO and one of the great things about PDO is named placeholders, they allow you to build queries like: $unsafestring = "this string can contain quotes: ' or other things"; $query = db_select('table') ->fields('table') ->condition('field', $unsafestring); The SQL that is sent to the database is: SELECT table.* FROM table WHERE (field = :db_condition_placeholder_0) This is sent along with the contents of $unsafestring to replace the...

Published in: #Drupal Planet #database
Article
Posted on 5th April 2011
Takes about 7 mins to read

[Aegir][aegir] is a very clever Drupal hosting system built using Drupal and Drush. It is divided into two parts: the frontend and the backend. The frontend is essentially just a standard Drupal site that stores its data in the database and then some drush scripts that manipulate the data. The backend (provision) is just a collection of drush scripts, and it stores its data in [Aegir contexts][aegir_contexts] which are essentially just arrays of data stored...

Published in: #Aegir #Drupal Planet #drush
Article
Posted on 29th March 2011
Takes about 2 mins to read

[Aegir][aegir] is a very clever hosting system for [Drupal][drupal] that sites and provisions them on various servers and does lots of clever things. One of the clever things that it has had for a while is a task queuing system. You can ask Aegir to lots of different things all in one go, and Aegir will queue them up and run them at its own pace. This provides a really good separation from the front-end...

Article
Posted on 25th March 2011
Takes about 1 min to read

Here's a quick post that will be a reminder for us as much as anyone else! Setting the default theme during installation using an installation profile is surprisingly hard in Drupal 6, and easier though not obvious in Drupal 7. In Drupal 6, we used the wonderful Install Profile API module, which allowed us to do it in just a few lines in an install task: install_enable_theme(array('my_theme', 'garland', 'rubik')); install_default_theme('my_theme'); install_admin_theme('rubik'); In Drupal 7, here's...

Article
Posted on 18th March 2011
Takes about 1 min to read

I made a new Drupal 7 module today... the CTools Path Access plugin. It is a very simple module that provides a CTools access plugin for using the access rules of another path. For example, you might set up a custom Panels search page in Page Manager, and just want to use the same access rules that the default Drupal search page uses at /search. I have submitted the plugin as a patch for CTools...

Article
Posted on 16th March 2011
Takes about 2 mins to read

While at Drupalcon I couldn't help but want to get involved in core development of Drupal. I have been involved on the fringe of Drupal core development for a number of years, and I've found bugs, submitted patches, tested others' patches, fixed others' patches and contributed documentation, but to get really involved in development you have to basically immerse yourself in it. It's really hard to follow the issue queues and get any sense of...

Published in: #Drupal core #Drupal Planet
Article
Posted on 11th March 2011
Takes about 4 mins to read

Boosting terms in Solr search results produced by the Apache Solr Search module that integrates Solr with Drupal is something we had to do for a project recently. If a user has come to our website from a search engine, we can pick up the terms that they had originally searched for - and then boost any documents containing those terms in our own search pages, regardless of what they search for on our pages...

Published in: #Drupal #search #solr #Drupal Planet #Drupal 7
Article
Posted on 10th February 2011
Takes about 2 mins to read

We've been using Display Suite with Node displays on one of our latest sites. It was an experiment, and possibly not something we'll do again - DS offers some great functionality with build modes and ways to re-arrange fields and all sorts on nodes, but since we end up theming most nodes quite a lot anyway, it's not worth the extra hassle that Display Suite can add when you want to change the theming on...

Article
Posted on 7th February 2011
Takes about 3 mins to read

These three tools ([drush make][drush_make], [Aegir][aegir] and [Dropbox][dropbox]) have come together to produce a release system that means I don't have to ssh into a remote server to deploy a new version of site. This means that I can do releases really, really simply, and actually with nothing more than a web browser[^1]. Let me explain: ### Drush make If you aren't using [Drush make][drush_make], then you should look into it. Essentially you specify a...