modules
Six Reasons To Get A Handbook Page For Your Module
Submitted by joachim.noreiko on Fri, 06/11/2009 - 08:56Checkout view being currently disabled in ViewVC is a very good opportunity to remind everyone that linking to your README.txt file in CVS does not count as documentation on your project page!
Here are some things I, or anyone else, can do with a proper documentation page in what used to be called the handbooks section of drupal.org:
- Correct it.
- Expand on it.
- Clarify things for newbies.
The Contrib Conundrum
Submitted by greg.harvey on Fri, 30/10/2009 - 14:13Edit: Please read this blog post, but also please jump in on this thread - the idea is already proposed but needs community support:
http://drupal.org/node/484034
And so again today it happened, as it does so many days. Someone needs to be able to do something. They Google. They search Drupal.org. They find nothing but a few open issues or an unsuitable/unsupported contrib module. They're a developer, so after an hour of searching they think "ach, to hell with this - I'll just write something".
Location, Location, Location
Submitted by greg.harvey on Sat, 28/03/2009 - 13:16Using hook_requirements In Drupal 6.x
Submitted by greg.harvey on Tue, 27/01/2009 - 18:25You probably know about dependencies in modules and how to declare them in a module's .info file. In case you're not familiar with the concept, it looks like this:
dependencies[] = imagefield
dependencies[] = nodereference
dependencies[] = content_copy
dependencies[] = views
dependencies[] = imagecache(Slightly different in Drupal 5.x - be warned!)
Each one of those modules must be enabled before Drupal will allow you to enable the module you want to install. Neat, huh? But there is a problem:
Installing ImageCache Presets From Your Drupal Module
Submitted by greg.harvey on Thu, 22/01/2009 - 13:46For those of you unfamiliar with the ImageCache module, get familiar here:
http://drupal.org/project/imagecache
It's pretty useful, allowing you to define preset image sizes that will be automatically generated whenever an image is uploaded to your site (providing the module doing the upload supports ImageCache which, fortunately, most do - including the Image module and the frighteningly useful ImageField CCK module).
Drupal 6 Alternatives To Your Drupal 5 Favourites
Submitted by greg.harvey on Wed, 21/01/2009 - 13:44I'm in the process of updating my training materials for various Drupal courses I teach so they reflect the new Drupal landscape, post Drupal 6 launch and wide acceptance. One of the interesting things is the number of killer modules in Drupal 5 that have died (either the maintainer lost interest, ran out of time or found a Drupal 6 module that does the same job better).
Triggers And Uninstalling Modules
Submitted by greg.harvey on Sat, 13/12/2008 - 16:01Note, Actions and Triggers are core in Drupal 6.x so this only applies to Drupal 5.x if you are using the Actions module as a 5.x contributed module:
http://drupal.org/project/actions
If you are using Triggers in Drupal 5.x then you have probably installed something like the Node Triggers module, which allows Actions to be triggered on node-related events (using hook_nodeapi()):
http://drupal.org/project/nodetriggers
A Note On Updating
Submitted by greg.harvey on Thu, 27/11/2008 - 16:17These days, now the Update Status module is core in Drupal 6, people find themselves updating their core, modules and themes far more regularly than before. This is, of course, a very good thing. I'd just like to raise a couple of points of order on the matter:
When updating it is always tempting to copy the contents of the downloaded tar file straight over the existing module or theme. Don't! It is entirely possible there are files with the old version which are not required by the new one. Worse, they may even do some harm.
Path To Theme In A Module
Submitted by greg.harvey on Fri, 03/10/2008 - 15:54I'm currently working on a multi-site Drupal installation. There is one theming module shared by all instances which exposes some key blocks and views they all require. During development, this was built on the initial site, so occasionally you will find something like this in the module:
<?php
function load_my_image() {
$path = base_path().
drupal_get_path('theme', 'my_theme').
'/images/my-image.gif';
return $path;
}
?>That works fine for as long as 'my_theme' exists, but what if it doesn't on another instance using this module?
Stop Searching
Submitted by greg.harvey on Wed, 09/07/2008 - 11:19There are times when you don't want people to search for specific content types. For example, you may not want to be obliged to theme a content type which is not supposed to be visible anyway, just in case it surfaces in a search. Or there may be a content type which you specifically do *not* want people to be able to search on.
There are two ways to skin this cat, that I know of at least:

