Drupal
Drupal 6: user_badges_taxonomy Module
Submitted by badzilla on Sun, 15/01/2012 - 13:59The motivation for this module came from a shortcoming of the functionality of the user_badges module and the thread http://drupal.org/node/1144296 questioning the usage of the vocabulary feature in the user_badges module. It appears that this enables the assignment of badges to users for arbitrary achievements. For instance, a client of mine is a political campaigning organisation and it would be cool to assign badges to those activists who attend campaigns.
Drupal 6: Programmatically Remove Required Field Property from Form
Submitted by badzilla on Sat, 19/11/2011 - 13:06Suppose you are coding a form in Drupal 6 and you have a mandatory (required) field. However, this required field is only mandatory dependent upon the value in another field. This can happen quite often, and I encountered it at a client site the other day. We had a postcode field that was mandatory only if the country in a selection box was set to 'United Kingdom'. Any other country meant that the postcode field was not required.
Drupal 6: Programmatically Create Panels and Nodes in Panels
Submitted by badzilla on Sat, 23/07/2011 - 09:51This tutorial provides the wherewithal to create a new node and insert that node in the top pane on a programmatically created Panel. Looking around the net I was surprised that nobody has done this before. The context for my requirements comes from a not-for-profit client of mine - they wanted to be able to create a new type of charitable donation dependent upon a campaign's remit (this would be the node) and then to place that campaign information (node) in the top pane of the panel.
Drupal 6 Checkboxes and default_value
Submitted by badzilla on Fri, 29/04/2011 - 09:55The Drupal Forms API comes with some powerful features, including checkboxes which allows a bunch of checkbox options to be grouped together. Included in this functionality is the ability to set default values, i.e. set your chosen boxes to be on.
However, it is not immediately obvious how to programmatically set the default values using the '#default_value' key. The key expects an array, so I tried the usual contenders such as an array of 0s, 1s, 'on', FALSE, TRUE etc etc and just couldn't get it to work correctly.
Drupal 6 White Screen of Death on Top Level Landing Page
Submitted by badzilla on Sun, 06/02/2011 - 14:04I have a number of Drupal sites on the Internet; more than I can possibly check on a daily basis, what with work commitments and all. I pointed my web browser at one of the more infrequently visited sites the other day and was confronted with the White Screen of Death. Disaster! What on Earth can cause that? And how long had the site been down? A quick check of the log gave no evidence of anything amiss, and the integrity of the database looked ok with a cursory glance.
Drupal Magcat Module
Submitted by badzilla on Thu, 07/10/2010 - 09:20Welcome to the home page of the Magcat Drupal 6 Module - an add-on to my Bookcat Drupal 6 Module. Magcat is aimed primarily at those with magazine collections; out of the box, FNProgramvare's Bookcat does not lend itself to magazine collections, but by using the available custom fields, and by creating some new template pages in my Magcat module, it is a perfect fit! 
Drupal Bookcat Module
Submitted by badzilla on Thu, 30/09/2010 - 17:37Welcome to the home page of the Drupal Bookcat module. Bookcat is a read-only port of the Explorer output of FNProgramvare's Bookcat book collector's database Windows product. It must be stressed that my module in no way replaces FNPRG's product of the same name - it merely extends its usefulness by making your Bookcat databases available to a wider user-base on the Drupal platform.
Drupal 6 Node Wraps Around Customized Region Sidebar Blocks
Submitted by badzilla on Fri, 16/04/2010 - 17:43In this exercise I am going to show you how to to create a customized block region inside the node area, with the node text wrapping around the customized block. A mock-up of what we are after, using the default Garland theme, is shown below. To complete this exercise, you will need to have already created a basic Drupal installation (which obviously includes its respective MySQL database) and be able to navigate around the filesystem and edit a few files. You will also need the Views module installed since we are going to test our solution against our own 'blog' view.
Drupal 6 Bulk Save of Taxonomy Terms with Perl
Submitted by badzilla on Sat, 20/02/2010 - 21:07You may be faced with the prospect of performing a batch save of taxonomy terms on your Drupal 6 installation. Using the normal interface, despite being clean and efficient, it could be an onerous task of many mouse clicks and wandering concentration resulting in errors. I was faced with such a situation so decided to quickly develop my own utility to perform a bulk save on my behalf. I decided upon Perl as the language to code in because I did not want the development time associated with user interfaces - this utility is for command line aficionados.
Drupal 6 Programmatically Create image_gallery Images in PHP
Submitted by badzilla on Fri, 19/02/2010 - 19:42Or since image_gallery items are just images with a taxonomy tag in a vocabulary called Image Galleries, a subtitle could be Programmatically Create Images and Tag with image_gallery. In this tutorial we are going to create a small module which contains the code to create the images and has a button on a form to effect the creation. I will foreground the actual copying code so you can cut and paste it into your own module development.