Front cover image for Pro Drupal development

Pro Drupal development

Widely praised for its in depth coverage of Drupal internals, bestselling Pro Drupal Development has been completely updated for Drupal 6 in this latest edition, and there are even more tricks of the trade to help you further yourself as a professional Drupal developer. Assuming you already know how to install and bring a standard installation online, John K. VanDyk gives you everything else you need to customize your Drupal installation however you see fit. Pro Drupal Development, Second Edition delves deep into Drupal internals, showing you how to take full advantage of its powerful architecture
eBook, English, ©2007
Apress, [Berkeley, Calif.], ©2007
1 online resource (xxv, 428 pages) : illustrations
9781430201908, 1430201908
184907882
Cover
Contents
Foreword
About the Author
About the Technical Reviewer
Acknowledgments
Introduction
CHAPTER 1 How Drupal Works
What Is Drupal?
Technology Stack
Core
Administrative Interface
Modules
Hooks
Themes
Nodes
Blocks
File Layout
Serving a Request
The Web Servers Role
The Bootstrap Process
Processing a Request
Theming the Data
Summary
CHAPTER 2 Writing a Module
Creating the Files
Implementing a Hook
Adding Module-Specific Settings
Adding the Data Entry Form
Storing Data in a Database Table
Defining Your Own Administration Section
Presenting a Settings Form to the User
Validating User-Submitted Settings
Storing Settings
Using Drupals variables Table
Retrieving Stored Values with variable_get()
Further Steps
Summary
CHAPTER 3 Hooks, Actions, and Triggers
Understanding Events and Triggers
Understanding Actions
The Trigger User Interface
Your First Action
Assigning the Action
Changing Which Triggers an Action Supports
Actions That Support Any Trigger
Advanced Actions
Using the Context in Actions
How the Trigger Module Prepares the Context
Establishing the Context
Examining the Context
How Actions Are Stored
The actions Table
Action IDs
Calling an Action Directly with actions_do()
Defining Your Own Triggers with hook_hook_info()
Adding Triggers to Existing Hooks
Summary
CHAPTER 4 The Menu System
Callback Mapping
Mapping URLs to Functions
Page Callback Arguments
Menu Nesting
Access Control
Title Localization and Customization
Defining a Title Callback
Title Arguments
Wildcards in Menu Items
Wildcards and Parameter Replacement
Building Paths from Wildcards Using to_arg() Functions
Altering Menu Items from Other Modules
Altering Menu Links from Other Modules
Kinds of Menu Items
Common Tasks
Assigning Callbacks Without Adding a Link to the Menu
Displaying Menu Items As Tabs
Hiding Existing Menu Items
Using menu.module
Common Mistakes
Summary
CHAPTER 5 Working with Databases
Defining Database Parameters
Understanding the Database Abstraction Layer
Connecting to the Database
Performing Simple Queries
Retrieving Query Results
Getting a Single Value
Getting Multiple Rows
Getting a Limited Range of Results
Getting Results for Paged Display
The Schema API
Using Module .install Files
Creating Tables
Using the Schema Module
Field Type Mapping from Schema to Database
Declaring a Specific Column Type with mysql_type
Maintaining Tables
Deleting Tables on Uninstall
Changing Existing Schemas with hook_schema_alter()
Inserts and Updates with drupal_write_record()
Exposing Queries to Other Modules with hook_db_rewrite_sql()
Using hook_db_rewrite_sql()
Changing Other Modules Queries
Connecting to Multiple Databases Within Drupal
Using a Temporary Table
Writing Your Own Database Driver
Summary
CHAPTER 6 Working with Users
The $u
"Books for professionals by professionals."