How to
A Quick Drupal Module to Block All Variations of a Google Address
Book element
Google lets you put any number of periods in your gmail address, and it ignores all of them when receiving mail for you.
Try it; it's fun!
Spammers have taken advantage of this, unfortunately, to spam more and more easily.
If you see a Gmail address with about as many periods as letters, it is probably a spammer. If that address turns up twice, differing only by the number or placement of periods, it is pretty certainly a spammer.
Add a Resource content type
Book element
http://definitivedrupal.org/admin/structure/types/add
Give it a name, Resource. The machine name is just fine as it is, resource. Give it a description, A reference page or other resource for the Definitive Guide to Drupal 7. Connects to a book chapter.
Set the default publishing options to published and create new revision.
There's no reason to have any menus available on Menu settings, we'll be making links to these resources from their respective chapters.
Explanation
Form element titles and the invisible #title_display property
Book element
Note: Forms are made to look how they are at two layers, the Forms API and the theme layer.
[Words below are mostly Everett's verbatim]
Drupal 7 provides a #title_display property that can be used with any form element that supports the #title property. The #title_display property tells the form system how to render #title
Explanation
Disabling Overlay Module
Book element
Introductions to Drupal are mostly all about enabling modules to unleash new functionality, but it can be good to know when to let it go and disable a module instead.
Explanation
Getting Vim
Book element
Vim for windows can be installed as part of Cygwin or standalone, http://www.vim.org/download.php#pc. A graphical version for Mac is available, http://code.google.com/p/macvim/. For Linux, graphical vim (gvim) is available through our operating system's package manager, such as Ubuntu's Software Center.
Explanation
Installing spam protection
Book element
We started getting a spam registration a minute – granted, only for a couple minutes – but it was still worrying enough to look for some anti-spam firepower.
drush dl mollom
Push the changes to our live site.
Enable Mollom at admin/modules.
Register the site at Mollom.com.
Copy the API keys for public and private to the Mollom settings page on our site, admin/config/content/mollom/settings
...
hmm. It tells us "The configured Mollom API keys are invalid."
Mercenary module development: AJAX Form Messages
Book element
Developing a module for hire can be a lot of fun, especially with a good client, because the requirements are figured out and laid out for us.
Although the request was to build off of an earlier module (made public but not released on Drupal.org), the goals expanded enough that it makes sense to start fresh— the client, who has Drupal 6 needs, even OKd a Drupal 7 first approach.
We make a new module in a working copy of Drupal and immediately start a git repository for the module.
Explanation
How to run a Code Sprint
Book element
Find a place.
Electricity and internet are all we need, but it never hurts to plan on feeding the code sprinters, also.
Find some people.
Some veteran programmers signed up before calling a sprint helps ensure that all issues can be handled. Ideally, someone with commit access to the project or projects that will be worked on should be present, or at least committed to work remotely.
Explanation
Add a language
Book element
[not tested, notes jotted down while helping fellow code sprinter test the translation of Forum titles]
Enable locale module
[new] In Drupal 7, the fastest way to add a language is to place the package of po files in the Drupal root directory and then add the language. It finds the po files automatically. (We do not go to import a language as in Drupal 6. Now we only use import for individual po files we add later.)