Module-In-A-Box: We Built Admin Tools So You Don’t Have To

Module-In-A-Box: We Built Admin Tools So You Don’t Have To

Drupal World

Add Comment
Share
Source Articles
1
Sunday, June 1, 2008
By admin
Building a Drupal module from scratch can be remarkably simple — just create an .info file, create a .module file, then implement a few functions like hook_menu and hook_nodeapi. In no time, you’ve got a module up and running, leveraging Drupal’s APIs and adding functionality to your site.

The problem
Unfortunately, things can get a bit more complicated if your module needs to store and maintain its own collection of data. The Custom Links module, for example, allows users to add clickable links to the bottom of each node on a Drupal site. While the code to actually add the links to each node is only a few dozen lines of PHP, it takes a few hundred lines of code to store and manage the information about those links. The module needs to create a database table to store its records, provide management pages so an admin can add new links, manage permissions, handle adding and editing records, request confirmation when administrators delete a record, and so on.

Leave a Reply

Your email address will not be published.