You are here

function date_help in Date 7.3

Same name and namespace in other branches
  1. 8 date_api/date_api.module \date_help()
  2. 5.2 date/date.module \date_help()
  3. 5 date.module \date_help()
  4. 6.2 date/date.module \date_help()
  5. 6 date/date.module \date_help()
  6. 7 date.module \date_help()
  7. 7.2 date_api/date_api.module \date_help()

Implements hook_help().

File

date_api/date_api.module, line 49
This module will make the date API available to other modules.

Code

function date_help($path, $arg) {
  switch ($path) {
    case 'admin/help#date':
      $output = '';
      $messages = date_api_status();
      $output = '<h2>Date API Status</h2>';
      if (!empty($messages['success'])) {
        $output .= '<ul><li>' . implode('</li><li>', $messages['success']) . '</li></ul>';
      }
      if (!empty($messages['errors'])) {
        $output .= '<h3>Errors</h3><ul class="error"><li>' . implode('</li><li>', $messages['errors']) . '</li></ul>';
      }
      if (module_exists('date_tools')) {
        $output .= '<h3>Date Tools</h3>' . t('Dates and calendars can be complicated to set up. The !date_wizard makes it easy to create a simple date content type and with a date field.', array(
          '!date_wizard' => l(t('Date wizard'), 'admin/config/date/tools/date_wizard'),
        ));
      }
      else {
        $output .= '<h3>Date Tools</h3>' . t('Dates and calendars can be complicated to set up. If you enable the Date Tools module, it provides a Date Wizard that makes it easy to create a simple date content type with a date field.');
      }
      $output .= '<h2>More Information</h2><p>' . t('Complete documentation for the Date and Date API modules is available at <a href="@link">http://drupal.org/node/92460</a>.', array(
        '@link' => 'http://drupal.org/node/262062',
      )) . '</p>';
      return $output;
  }
}