Skip to main content
ComputerMinds

Articles · Page 7

Drupal Planet

Drupal node load references : Drupal 7

In Drupal 6, if you called node_load then what you'd be returned would be your own copy of the node to change and modify as you pleased, but in Drupal 7 this was changed. By default, what you actually get back from a node_load is essentially a reference to a global singleton…Read article →

Multiple conditions for dynamic forms in Drupal 7

Here's a quick follow-up to my original post on Dynamic forms in Drupal 7, as a reply to Wappie08, who asked me about combining conditions in the #states array to add increased control over the display of your form elements. The question:Read article →

Setting up a Drupal API site for module developers

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…Read article →

Drupal database prepared statements

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:Read article →

Storing data in 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…Read article →

Aegir tasks daemon

Aegir is a very clever hosting system for 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…Read article →

Setting default drupal theme during installation : programatically install a drupal theme

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…Read article →

CTools Path Access plugin

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.Read article →

Playing second fiddle

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…Read article →

Apache Solr boost Drupal search results at query-time

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…Read article →

Changing Display Suite fields in update hooks

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…Read article →

Drush make, Aegir and Dropbox

These three tools (drush make, Aegir and 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…Read article →

Creating new field formatters in Drupal 7

Creating extra field formatters in Drupal 7 is fairly simple, but it can take some poking around in the new Fields code. So here is some sample code to make it easier for you! You can add formats to your own fields -- or existing fields that are defined by other Drupal modules.…Read article →

Goodbye Throttle module

Last month Drupal 7 made it's first stable release and we have leapt at the opportunity to make use of it in the redesigning and rebranding our website. There are loads of exciting things in Drupal 7, bringing flexibility, convenience and even better performance through…Read article →

Dynamic forms in Drupal 7

When building forms, you will often want to only provide certain options if other options are chosen by a user. For example, there's no need to show the 'open link in new window' checkbox, if the 'make this into a link' checkbox hasn't been ticked. These kinds of dynamic forms…Read article →

Drupal roles : Programatically Adding a role to a user in Drupal 7

It used to be a bit of a chore to add a role a user in Drupal, but no longer!Read article →

Certified to Rock field

Certified to Rock is a site that allows you to look-up Drupal.org user names, and see their 'certified to rock' score.Read article →

Email Logging in Drupal

There are a number of scenarios where you might want to log email being sent by Drupal; perhaps locally during development or for urgent debugging on a live site. There are a number of options available for Drupal email logging, and this article will cover four of the most…Read article →

Using CTools for form item dependency / visibility

One of several helpers included in the ctools module, ctools dependency is described on the module page itself as "a simple form widget to make form items appear and disappear based upon the selections in another item". It's designed to make it easy and quick to hide/show form…Read article →

Getting Aegir to provision a lot of sites

There may be better ways to do this, but suppose you want to get Aegir to provision a lot of sites, maybe from a list you've got in CSV file, then you can now use Feeds!Read article →

Views data exports

Views is the king in Drupal land when it comes to making lists of your data, rightly so, it does a wonderful job of making it easy to choose the data you want to list. It also allows you to render your list in various forms, lists, tables. RSS feeds or even jump menus. So if…Read article →

Facebook like views integration

Facebook is rapidly taking over the planet, and Drupal is arguably trying to do the same. Facebook added the concept of 'liking' a webpage to their array of social tools a while ago. Drupal modules quickly added the ability to 'like' content on your site.Read article →

Aegir HTTP basic authentication

Aegir is a system for managing sites using Drupal and drush. We use it to manage this site in fact.Read article →

Removing that pesky trailing slash

So, it's perfectly valid to visit a site using a URL like:Read article →