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

Chapter 2. Creating Our First Module

In the last chapter, we looked at the basics of Drupal module development. Now we will dive in and create our first module. Our first module will make use of an existing web service to pull in some XML data, format it, and display it as a block in the site's layout.

We will cover the following topics in this chapter:

  • Creating the .info and .module files

  • Creating a new module

  • Using basic hooks

  • Installing and configuring the module

  • Using important Drupal functions

Starting Out

Our first module is going to fetch XML data from Goodreads (http://www.goodreads.com), a free social networking site for avid readers. There, users track the books they are reading and have read, rate books and write reviews, and share their reading lists with friends.

Reading lists at Goodreads are stored in bookshelves. These bookshelves are accessible over a web-based XML/RSS API. We will use that API to display a reading list on the Philosopher Bios website we introduced in Chapter 1...