- Learning Drupal 6 Module Development
- Matt Butcher
- 544字
- 2021-07-02 12:00:52
What This Book Covers
This book focuses on developing modules for Drupal 6. Each chapter introduces new concepts, libraries and APIs, while building on material from previous chapters.
Chapter 1 is a developer's introduction to Drupal. We take a look at Drupal's architecture, focusing on modules and themes. After covering some of the important concepts and taking a high-level look at foundational APIs and libraries, we finish up with a look at some useful development tools.
Chapter 2 gets us working on our first module. In this chapter, we develop a Drupal module that takes data from an XML feed and displays it as a block on our Drupal site. In this chapter, you will learn about the basics of module development, including what files need to be created and where they go. Hooks, a major component of Drupal development, are also introduced here.
Chapter 3 switches gears from modules to themes. Learning the theming system is integral to being able to produce high-quality modules. In this chapter, we create a theme using CSS, HTML, and PHPTemplates. We also take a look at the theme system architecture, along with some of the APIs.
Chapter 4 builds on the introduction to theming. In this chapter, we develop a new module that deals with a custom content type, a quote. This module uses the theming subsystem to prepare quotes for display. Our focus here is using the theme system to enrich modules. The theme API covered in this chapter is used throughout the rest of the book.
Chapter 5 focuses on Drupal's JavaScript libraries. Starting with the module we built in Chapter 4, we use the jQuery library and a couple of Drupal hooks to implement an AJAX (Asynchronous JavaScript and XML) service. This chapter also introduces the Database API and the menu system.
Chapter 6 is focused on building an administration module. This module provides an interface for administrators to send email messages to users. However, the Mail API is not the only thing we will look at. The tremendously important Forms API is also introduced here. We also get our first look at Drupal's access control features.
Chapter 7 takes a closer look at Drupal nodes. In this chapter, we use the Schema API, the Database API, and the node system to build a content type that represents a biography. Module installation files are introduced, and the Forms API and access control mechanisms are revisited.
Chapter 8 discusses filters, actions, and hooks—three of the more advanced features of Drupal. We create a module for emailing a newsletter to our users. We implement filters to prepare content for the email message. Actions and triggers are used to automatically send our newsletter when it is ready. Also, to allow other modules to interact with this one, we define our own custom hook that other modules can implement.
Chapter 9 changes tracks, focusing on installation profiles. In this chapter, we build an installation profile that can install a custom version of Drupal preloaded with the modules and themes of our choice. Working with the installer, we get a glimpse into Drupal's inner workings. Along with learning how to write code in this minimalistic pre-installation environment, we also look at registering themes and defining triggers automatically.