Learning Drupal 6 Module Development.

A practical tutorial for creating your first Drupal 6 modules with PHP.

Saved in:
Bibliographic Details
Main Author: Butcher, Matt
Format: eBook
Language:English
Published: Birmingham : Packt Pub., 2008.
Subjects:
Online Access:Click for online access
Table of Contents:
  • Learning Drupal 6 Module Development; Learning Drupal 6 Module Development; Credits; About the Author; About the Reviewers; Preface; What This Book Covers; Who Is This Book For?; Conventions; Reader Feedback; Customer Support; Downloading the Example Code for the Book; Errata; Questions; 1. Introduction to Drupal Modules; Drupal's Architecture; Module Architecture; Core Modules; Hooks; Themes; Crucial Drupal Concepts; Nodes; Comments Are Not Nodes; Users; Access and Security; Blocks and Page Rendering; Menus; Forms; Database and Schema APIs; Developers' Tools; Developer Module; Coder Module.
  • A Word on Our Demonstration SiteSummary; 2. Creating Our First Module; Starting Out; A Place for the Module; Creating a .info File; A Basic .module File; Our Goal: A Block Hook; Starting the .module; The hook_block() Implementation; The t() Function; A view Operation; Installing a Module; Step 1: Copying the Module; Step 2: Enabling the Module; Step 3: Displaying the Module's Content; Using Goodreads Data; Modifying the Block Hook; Retrieving XML Content over HTTP; The watchdog() Function; Processing the HTTP Results; Formatting the Block's Contents; Finishing Touches: hook_help(); Summary.
  • 3. The Theme SystemThe Theme System's Architecture; Theme Templates; Theme Engines; Theme Hooks; Creating a Custom Theme; Organization of Themes; Sub-themes (Derivative Themes); How Each Theme Functions; Creating a Theme; Creating the Theme Directory; A .info File; A CSS Stylesheet; A PHPTemplate Theme; Template Structure; From Here to a Full Theme; A Page Template for Descartes; Using PHP to Override Theme Behavior; Custom Breadcrumbs; Interacting with Other Theme Functions; template.php Gotchas; Creating a Screenshot; Summary; 4. Theming Modules; Our Target Module: What We Want.
  • Creating a Custom Content TypeUsing the Administration Interface to Create a Content Type; Content and Nodes; The Foundations of the Module; A Simple Database Lookup; Getting the Node ID; Getting the Node's Content; Theming Inside a Module; Registering a Theme; Creating a Theme Hook Function; Adding a Stylesheet; Overriding the Default Theme from a Theme; A Quick Clarification; Overriding the Default Theme's CSS; Overriding Layout with Templates; Summary; 5. Using JavaScript and AJAX/JSON in Modules; Picking up Where We Left Off; Introducing jQuery; Modifying HTML with jQuery.
  • Checking for JavaScript Support with DrupalNamespaces in JavaScript; Drupal's Namespace; A Drupal Function: Drupal.jsEnabled(); Delaying JavaScript Execution with jQuery; Including JavaScript from the Module's Theme; Writing a Drupal AJAX/JSON Service; The JSON Format; Our Module Roadmap; Creating a JSON Message; Mapping a Function to a URL; Passing PHP Settings to JavaScript; Client Side: AJAX Handlers; A JavaScript Function to Get JSON Content; Adding an Event Handler; Server Side: Defining a New Page; Summary; 6. An Administration Module; The emailusers Module; The Beginning of the Module.