You are here

function scheduler_help in Scheduler 7

Same name and namespace in other branches
  1. 8 scheduler.module \scheduler_help()
  2. 5 scheduler.module \scheduler_help()
  3. 6 scheduler.module \scheduler_help()
  4. 2.x scheduler.module \scheduler_help()

Implements hook_help().

File

./scheduler.module, line 161
Scheduler publishes and unpublishes nodes on dates specified by the user.

Code

function scheduler_help($section) {
  $output = '';
  switch ($section) {
    case 'admin/config/content/scheduler':
      $output = '<p>' . t('Some Scheduler options are set for each different content type, and are accessed via the <a href="@link">admin content type</a> list.', array(
        '@link' => url('admin/structure/types'),
      )) . '</br>';
      $output .= t('The options and settings below are common to all content types.') . '</p>';
      break;
    case 'admin/config/content/scheduler/cron':
      $base_url = $GLOBALS['base_url'];
      $access_key = variable_get('scheduler_lightweight_access_key', '');
      $cron_url = $base_url . '/scheduler/cron' . ($access_key ? '/' . $access_key : '');
      $output = '<p>' . t("When you have set up Drupal's standard crontab job cron.php then Scheduler will be executed during each cron run. However, if you would like finer granularity to scheduler, but don't want to run Drupal's cron more often then you can use the lightweight cron handler provided by Scheduler. This is an independent cron job which only runs the scheduler process and does not execute any cron tasks defined by Drupal core or any other modules.") . '</p>';
      $output .= '<p>' . t("Scheduler's cron is at /scheduler/cron and a sample crontab entry to run scheduler every minute might look like:") . '</p>';
      $output .= '<code>* * * * * wget -q -O /dev/null "' . $cron_url . '"</code>';
      $output .= '<p>' . t('or') . '</p>';
      $output .= '<code>* * * * * curl -s -o /dev/null "' . $cron_url . '"</code><br/><br/>';
      break;
    case 'admin/help#scheduler':

      // This is shown at the top of admin/help/scheduler.
      $output = '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('The Scheduler module provides the functionality for automatic publishing and unpublishing of nodes at specified future dates.') . '</p>';
      $output .= '<p>' . t('You can read more in the <a href="@readme">readme.txt</a> file.', array(
        '@readme' => $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'scheduler') . '/README.txt',
      )) . '</p>';
      break;
    default:
  }
  return $output;
}