Join Jon Peck for an in-depth discussion in this video Creating your first module, part of Drupal 7: Custom Module Development.
Drupal looks for modules in several places. …While it may be tempting to put a contributed or custom module in the modules directory …of the site root, this directory is reserved for Drupal core modules. …Instead, additional modules are typically stored within the sites > all > modules directory of the web root. …If you have installed contributed modules, you may see some directories there now. …Best practice is to organize modules within subdirectories with clear headings, such as …contrib and custom.…
Contrib is short for contributed modules, which I previously mentioned, and custom is …for custom modules, which I will be demonstrating. …Each Drupal module has a human readable name and a machine name. …The machine name is used throughout the module development, while the human readable name …is only shown on administrative interfaces. …Drupal module machine names follow a consistent naming convention. …All lower case, no spaces, and concise as possible. …You can use underscores in the module name, but it can get unwieldy if you have more than one.…
- Creating your first module
- Interacting with hooks
- Working with permissions and roles
- Controlling access
- Adding a menu item to an admin interface
- Using the Form API (FAPI) to quickly create a form
- Creating custom form validation
- Manually creating a custom content type
- Validating user input
- Importing content using feeds
- Creating a block
- Understanding best practices and coding standards
Skill Level Advanced
Q: gmap3_tools is not working the way I expected it to. What version of gmap3_tools should I be using?
A: Use the free exercise file containing the version of gmap3_tools used for recording; the published version of the module on drupal.org has changed since recording and is not backwards compatible.
Q: I attempted to run the Drupal site root from the project files, but the site isn't loading. Why not?
A: The Drupal configuration file in sites/default/settings.php contains database configuration specific to the environment used to record the movie. This may be different than your environment. Edit the file and search for "windfarms" - you may need to change the database host, username, password, db name and port to match your specific environment.