Packaging a distribution on

So you want to provide a Distribution on Great! The packaging system will take the code for a project, assemble it into an easily downloadable format, and post it to the project's pages on

Here are the steps:

  1. Assemble the pre-requisites
  2. Create a Drush Make file
  3. Convert to a Drush Make file
  4. Build and verify it works
  5. Commit your code to Git
  6. Release your code on
  7. Maintain your distribution

Step 1: Pre-requisites

  • Drush 5.x+.
  • Drush, a Drush extension which is required for running tests on makefiles. See this post for installation instructions.
  • A full project node on, of project type "Distribution".

Step 2: Drush Make file

Create PDF thumbnails with imagecache and ImageMagick while GD is still the default toolkit

This tutorial can be considered as a continuation of

Its purpose is to create single-page and double-page thumbnails of PDF files:

  • without selecting ImageMagick as the default toolkit, as GD is often the preferred toolkit
  • using imagecache so that the creation process is automated


An example of result can be seen here.

The libraries you need on your server:

  • ImageMagick
  • Ghostscript

The Drupal modules you need to install and enable:

  • Content Construction Kit Module
  • FileField Module
  • ImageAPI: enable both ImageAPI GD2 and ImageAPI ImageMagick
  • ImageCache 6.x-2.0-beta10
  • ImageCache Actions: enable Imagecache Custom Actions too
  • FileField Paths, Pathauto and Transliteration


  1. Select GD2 as your default toolkit
  2. Patch ImageCache 6.x-2.0-beta10 with this patch
  3. Create a new imagecache preset with a custom imagecache action to generate a single-page thumbnail. Code is: (do not include the <?php ?> tag)


Altering an existing RDF mapping

Because RDF mappings are saved to the database on installation, hook_rdf_mapping should only be used in modules that create new bundles.

Otherwise, to alter an existing mapping, use the RDF mapping CRUD API. This consists of the following functions:

  • rdf_mapping_load($type, $bundle = RDF_DEFAULT_BUNDLE)
  • rdf_mapping_save($mapping)
  • rdf_mapping_delete($type, $bundle)

Disable the permissions interface using Secure Permissions

Secure Permissions disables the user interface for creating and assigning roles and permissions.

Secure Permissions is an advanced security module for Drupal 7. It disables the Roles and Permissions editing screens and lets all user roles and permissions be handled through code. This adds an extra layer of security, as the site's permission can no longer be misconfigured accidentally.

This module was inspired the security paradigm of the Plone platform. See, in particular, 'Problem A2: Broken Access Control' in the Plone documentation.

1. Use case

This module is designed for cases where you want control of Roles and
Permissions only in a development environment. When fully enabled, this module
will make it so that the live site cannot have its permissions modified, except
through code.

It may be sufficient for most users to simply enable this module on the live
site, and to disable it when it is no longer needed.

2. Installation

Before installing this module you should configure the site Roles and
Permissions as you see fit. After installing and configuring this module,

Customizing the display of specific nodes using the Custom Node Template module


The primary purpose of this module is to provide a simple way to customize the display of specific nodes. It is not intended to overlap functionality that can best be done directly through your theme or with another module. In particular, if you are trying to customize the display of ALL nodes of a particular content type, this is probably best done through your theme (or perhaps with another helper module like Contemplate).

If you have not arrived at this handbook page from the Custom Node Template module page, you may also wish to read the description of the project on the Custom Node Template project page.

Why Use This Module?

In general, this module would most likely be useful for overriding or customizing the display of node on a node-by-node basis or to provide such options to those who don't have access or the ability to customize a theme. It can still be useful for advanced users and developers as well when it is not convenient, feasible, or efficient to customize a theme to achieve the same functionality. For example, one could add some addition code for node template suggestions into the template.php file and add node-NodeID.tpl.php files to a theme. But this isn't not very efficient if you are overriding or customizing the display of a number of nodes in the same way. This module would allow you to add one customized node template into your theme and then select this template for the several nodes in question.

Please also see the Use Cases section at the bottom of this page for additional information to help you decide if this module would be useful.

Drupal Performance

Given that GATE Village is built on Drupal it seems appropriate I should speak to Drupal performance in a general sense -- it's ability to perform was actually one of it's selling points for me. On of the most significant performance impact on Drupal is, of course, at the DB ... while there is a lot of logic in the code, all of the data lives in the DB and thus DB performance and DB bloat are always front and centre to a Drupal installation.


Subscribe with RSS Subscribe to RSS - Programmers