Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

How to Build a Drupal Module

on

  • 4,994 views

This is a short and simple presentation directed towards beginner Drupal developers, explaining how to build a simple custom module for Drupal. More information can be found here:...

This is a short and simple presentation directed towards beginner Drupal developers, explaining how to build a simple custom module for Drupal. More information can be found here:

http://www.opensourcecatholic.com/

Statistics

Views

Total Views
4,994
Views on SlideShare
4,233
Embed Views
761

Actions

Likes
0
Downloads
45
Comments
0

6 Embeds 761

http://www.opensourcecatholic.com 685
http://www.drupalarabic.com 69
http://drupalarabic.com 3
http://static.slidesharecdn.com 2
http://drupal.org 1
http://translate.googleusercontent.com 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

How to Build a Drupal Module How to Build a Drupal Module Presentation Transcript

  • Building a Module - the Basics Jeff Geerling - Archdiocese of St. Louis, Midwestern Mac, LLC October 28, 2010
  • Jeff Geerling - Quick Bio ✤ http://drupal.org/user/389011 ✤ Web Developer for Archdiocese of St. Louis (archstl.org, stlouisreview.com, stlyouth.org, 10 other Drupal sites) ✤ Owner of Midwestern Mac, LLC (midwesternmac.com) (work on other Drupal projects in my spare time) ✤ Personal site: www.lifeisaprayer.com (Drupal since 2009)
  • Getting Set for Success ✤ Turn on Error reporting, check your logs admin/settings/error-reporting admin/reports/dblog ✤ Install Devel module, always clear caches (admin_menu is helpful) ✤ Have the Drupal API handy (api.drupal.org) ✤ Drupal handbook also good: http://drupal.org/node/206753 ✤ Learn how to use your editor - TextMate, Coda, BBEdit... vim, etc. ✤ 2+ cups of coffee, Red Bull... pick your poison View slide
  • Core Components of a Module ✤ .info File ✤ Stores metadata about the module - description, name, dependencies, etc. ✤ Only requirements: name, description, core ✤ More: http://drupal.org/node/231036 View slide
  • Core Components of a Module ✤ .module File ✤ Contains the code for your module ✤ This file can sometimes be tiny, sometimes huge - it depends on your module’s purpose ✤ Often, you will reference external .inc files or templates (so you don’t have a huge, messy .module file)
  • Let’s Make a Module ✤ Simple: “custom” module ✤ I have one of these on almost every website I run. ✤ Make ‘custom’ folder inside: sites/all/modules ✤ Add two new files: custom.info custom.module
  • custom.info
  • custom.module
  • custom.module - demo
  • Gallery Archive - Contrib module ✤ http://drupal.org/project/gallery_archive ✤ Wasn’t planning on contributing the module at first ✤ Community’s given so much to me, though, so I thought I’d contribute back ✤ Contributions, reviews, and helpers are what make Drupal awesome ✤ If *you* don’t contribute, who will?
  • Gallery Archive - demo
  • More Resources ✤ Drupal Coding Standards: http://drupal.org/coding-standards (It’s good to use standards regardless, as it makes your code easier to grok (understand) for other developers...). ✤ Module Developer’s Guide: http://drupal.org/developing/modules ✤ Examples for Developers: http://drupal.org/project/examples (A module that shows how to implement different APIs - great for training on how to manipulate core to do your bidding). ✤ Drupal API: http://api.drupal.org/ ✤ DrupalContrib: http://drupalcontrib.org/ ✤ Stack Overflow: http://stackoverflow.com/ ✤ Drupal hooks: http://api.drupal.org/api/group/hooks/6