Drupal

Posts about Drupal, the open source content management system.

Altering A File Form Field Element In Drupal 7

Thursday, May 31, 2012 - 10:02

Altering text in Drupal 7 is quite simple thanks to things like string overrides that allow you to replace all instances of a string throughout a site. If you want to change a single element on a single form then string overrides don't quite work, but using hook_form_alter() or hook_form_form-id_alter() allows you to manipulate any form in a Drupal site.

Category: 

Loading A User's Groups In Drupal 7

Tuesday, May 22, 2012 - 17:50

Whilst working with Organic Groups today I had the need to load a list of the nodes that a user is connected to. After a bit of looking around in the source code I couldn't find a good solution on how to do this. So after looking around on Google for a bit I just sat down and wrote one.

Category: 

EU Cookie Law Talk

Tuesday, May 15, 2012 - 12:05

A couple of months ago I gave a talk at the North West Drupal User Group in Manchester where I talked about the EU Cookie Law and about cookies in PHP and Drupal. The EU law has been in practice in the EU for the last year and is due to be implemented in the UK on May 26th 2012.

People have been asking me to provide them with the slides so I thought I would create a quick blog post and put them on #! code.

Cookies and the EU Law.

Category: 

Getting Started With Drush Make

Saturday, May 12, 2012 - 22:15

Drush is a command line tool that allows interaction with a Drupal site. The tool itself is incredibily useful and provides mechanisms to download modules, backup databases and most other things that can be done with Drupal. Drush Make was a plugin for Drush which has now become part of the Drush core and allows Drupal sites to be created via a make file. What Drush Make does is to use the make file to download the modules, themes and libraries needed for a Drupal site ready for the site to be installed.

Category: 

Tip On Adding Code To Drupal Forms

Saturday, April 7, 2012 - 03:24

There are various different forms and modules in Drupal that allow for PHP code to be embedded into them. I have even talked about adding PHP code to forms in a previous post. These form elements can have their uses, modules like Views allow for PHP code to be run when collecting arguments which can allow for some advanced funcationality.

Category: 

Adding The autocomplete Attribute To Forms And Password Fields In Drupal 6

Wednesday, February 22, 2012 - 22:57

Many modern browsers now come with auto-complete functionality so that users can fill in their details quickly without having to type in their username and password every time they want to log on. This can be turned off by adding the attribute "autocomplete" to the form and password elements and setting its value to 'off'.

Category: