Drupal Module Building (DrupalCon Paris)

1,352 views
1,311 views

Published on

How to make a module in Drupal. To see the "official" DrupalCon Paris video of me giving this presentation, check this out: http://technosophos.com/content/how-make-module-video

Published in: Technology, Travel
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,352
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
67
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • Drupal Module Building (DrupalCon Paris)

    1. 1. Make A Module A Practical Introduction to Module Development
    2. 2. Matt Butcher Senior Programmer at Palantir.net, Author mbutcher on d.o http://twitter.com/technosophos http://technosophos.com
    3. 3. 2009 2004
    4. 4. Our Goal Build a Drupal module from scratch in 40 minutes or less.
    5. 5. Our Module • One directory and two files. • Using Drupal’s hook system. • Add a new block that can be placed in one of the block regions. • Add a new “page” (menu callback).
    6. 6. Begin with... • Module directory: paris/ • Two files: module_name.info • paris/paris.info module_name module_name.*.inc module_name.install • and others. paris/paris.module (optional) module_name.module
    7. 7. The Info File • Contains information • Used by module system about a module to learn about the module • Plain text config file
    8. 8. The Module File • Contains PHP code • Hook implementations live here • Often, other supporting code is here, too • Drupal loads this automatically
    9. 9. Hooks Drupal looks for particular function patterns in module files. Functions that conform to these patterns are called “hook implementations”. http://www.flickr.com/photos/39321672@N07/3616749186/
    10. 10. hook_block() • Use it to manage a block. • List • Display • Configure
    11. 11. hook_menu() • Use it to register a URL pattern. • “Menu items”, in this case, are names that Drupal associates with functions.
    12. 12. Learning More • API.Drupal.org • Handbooks on Drupal.org • Various books

    ×