02. Telling Drupal about your module
The first function we'll write will tell Drupal information about your module: its name and description. The hook name for this function is 'help', so start with the onthisdate_help function:
<?php
function onthisdate_help($section='') {
}
?>The $section variable provides context for the help: where in Drupal or the module are we looking for help. The recommended way to process this variable is with a switch statement. You'll see this code pattern in other modules.
<?php
/**
* Display help and module information
* @param section which section of the site we're displaying help
* @return help text for section
*/
function onthisdate_help($section='') {
$output = '';
switch ($section) {
case "admin/modules#description":
$output = t("Displays links to nodes created on this date");
break;
}
return $output;
} // function onthisdate_help
?>The admin/modules#description case is used by the Drupal core as the module description on the modules administration page (/admin/modules or ?q=admin/modules).
You will eventually want to add other cases to this switch statement to provide real help messages to the user. In particular, output for "admin/help#onthisdate" will display on the main help page accessed by the admin/help URL for this module (/admin/help or ?q=admin/help).
More information about the help hook:
Download the code so far, (4.7 version) renaming to onthisdate.module before saving in your Drupal installation.

For 5.0
see: http://drupal.org/node/64279#info
http://drupal.org/node/64279#comment-150594
--
http://www.reuniting.info/
Healing with Sexual Relationships.
http://www.wechange.org/
We live in a world of solutions.