Skip to Content
Beginning Drupal®
book

Beginning Drupal®

by Jacob Redding
April 2010
Beginner content levelBeginner
480 pages
11h 33m
English
Wrox
Content preview from Beginning Drupal®

Chapter 17. Module Development Start to Finish

WHAT YOU WILL LEARN IN THIS CHAPTER:

  • Choosing your hook

  • Offering assistance to site users

  • Adding custom administrative settings

  • Custom permissions

  • Storing data in the database

  • Creating a custom block

  • Testing your module

The previous chapters introduced how modules are built and introduced hooks, the core of a module. Contributed modules contain much more than a hook implementation though. Administrative settings, database tables, custom help text, and permissions are just a few of the pieces of a complete module. In this chapter you'll bring together your knowledge of hooks and Drupal to build a full module from start to finish.

You'll walk step by step through the entire process of building a module. Start off slowly with a few lines of code, implemen a hook and then gradually build on top of it until you have a full module robust enough to be contributed on drupal.org, given to a client, or used as a sustainable solution on your own website.

THE MODULE

The module you will be building in this chapter searches for keywords within comments and if present restricts the comment from being posted. You will also create a custom database table to store the number of times the user attempts to post a comment containing restricted keywords.

When you are finished, you will have utilized and practiced the following hooks and APIs:

  • hook_form_alter and the Forms API

  • hook_menu

  • hook_help

  • hook_permission

  • hook_install, hook_uninstall, hook_schema and the Schema API ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Drupal® 7 Bible

Drupal® 7 Bible

Ric Shreves, Brice Dunwoodie
Pro Drupal 7 Development, Third Edition

Pro Drupal 7 Development, Third Edition

Todd Tomlinson, John K. VanDyk

Publisher Resources

ISBN: 9780470438527Purchase book