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
Credits
About the Author
About the Reviewers
Preface

The sitenews Module


In this chapter, we will build a module that handles sending an email message containing site news to users of the system. The module will send an email message about the latest content and features on our site. The message will be made up of the following components:

  • The introduction: An administrator will compose a message that will be placed at the top of the site news message. This message, which we will call a news brief provides a way of tailoring a message to the system's users. We will also make this content available on the website.

  • Zero or more update sections: While the news brief will provide an introduction to the newsletter, these sections will consist of automatically generated messages. Modules will be able to define their own sections. We will use the hook mechanism to define a hook that modules can implement.

In a nutshell, then, every site news email that goes out will have exactly one news brief item, and zero or more other sections generated automatically...