With large Drupal projects, especially those in their post-live phase, good code and release managment becomes vital. Update hooks provide the mechanism by which database changes can be scripted and deployed to the live server, this article assumes you are already well versed with the ways of update hooks. The two main problems we have with update hooks occur on multi developer projects Same function is implemented in 2 branches. Imagine the situation where you...
Day 2 at Drupalcamp UK was as packed with goodness as the first day, here's some of the highlights: Integration with 3rd Party Applications In this excellent session given by Adam Evans common techniques and pitfalls for integrating applications with Drupal were covered. There were some really good tips, including using Solr to search external data held in a e-commerce system and using the Drupal Apache Solr module to pull that data into a Drupal...
A brief summary of some of the cool stuff I picked up from day 1 at DrupalCamp, interestingly most of it wasn't necessarily Drupal related ... day 2 and pics (featuring lots of ComputerMinds lanyards!) etc to follow ... Hudson - a tool that automates builds, running of unit tests, running of jmeter performance tests and some other loveliness. Configure it to run periodically against your various SVN branches (works with other SCC systems (Git...
If you have a Drupal site with users and you want to allow them to add some profile data about themselves there are a few routes available to you, one of the oldest (and thus simplest) ways is to use profile module. You can add text fields, selects and other bits and bobs to users, with different visibility settings for each field. You also have the chance (in fact it is required that you do)...
One of the interesting sessions that I attended at DrupalCon DC was one entitled: Business Analytics in Drupal with Views. In it, the presenters showcased two of their modules. One was a charts display plugin for views, and one was a 'group by' views field. Views charts This was a simple module to take the output of a views query and pump it into a flash charting framework. Being able to display the output of...
We are finding that the feature exciting most end users in Drupal 6 is the lovely new jquery based drag and drop, as seen on the blocks and menu edit pages - we will be quite happy never have to explain the concept of "weights" again. The best news is that you can add this functionality to your own forms for free - and here is how. Build and theme the form We are assuming...
I'm always hunting around for these various bits every time I do an Ubuntu rebuild - so I thought I would collate them all into one place. This is what we use for our dev boxes, not certified for a production webserver. Note this is specifically for Ubuntu 8.04 - it may well apply to other versions of Ubuntu however. sudo apt-get update sudo apt-get install mysql-server-5.0 sudo apt-get install apache2 sudo apt-get install php5...
One of those little Drupal annoyances this, there is now easy way to alter a comment (using hook_comment) before the comment is written to the DB. Hook comment is invoked during the validation phase, with $op set to "validate", and the comment array is passed by reference - but unfortunately any changes made to the comment are not passed on to the comment save function. A quick and slightly dirty way around this is to...
We wrote an article about linking a view's block title to the companion page view, in Drupal 5. Someone asked for a Drupal 6 version, which can be quite easily done with a preprocess function, but it's not very flexible. Instead we just need to create a new display plugin for Views 2, and that will allow us to be much more flexible in our approach. This is my first display plugin, so it may...
There's an excellent article over on gtrlabs: Drupal 5: How to process multiple instances of the same form on the same page that describes in detail how to have multiple copies of the same form on the same page. There are some subtle differences to use this technique in Drupal 6, which I'll explain below. The idea of this technique is simple, drupal forms are identified by their 'form_id' and these ids must be unique...