Book Image

Learning Drupal 6 Module Development

Book Image

Learning Drupal 6 Module Development

Overview of this book

Table of Contents (14 chapters)
Learning Drupal 6 Module Development
About the Author
About the Reviewers

Chapter 6. An Administration Module

In this chapter, we will create a module with an administration interface. The module we create will provide a way for administrators to send email messages to users—all from within the administration section of Drupal.

This chapter has another intent, though. We will use a couple new hooks, the Forms API, and some other Drupal functions and constructs. These APIs are selected in part because they have undergone significant revision since Drupal 5. Thus, if you are already acquainted with Drupal 5 programming, this chapter will help the transition to Drupal 6.

In the course of creating our email module, we will perform the following:

  • Take a closer look at hook_menu(), making use of access control settings

  • Use the Forms API to create a form and handle the form's lifecycle

  • Make use of Drupal's new mail subsystem and hook_mail() for sending messages to users

  • Use hook_mail_alter() to add system-wide information to outbound email

  • Implement hook_user() to add information...