You are here

function og_help in Organic groups 7

Same name and namespace in other branches
  1. 5.8 og.module \og_help()
  2. 5 og.module \og_help()
  3. 5.2 og.module \og_help()
  4. 5.3 og.module \og_help()
  5. 5.7 og.module \og_help()
  6. 6.2 og.module \og_help()
  7. 6 og.module \og_help()
  8. 7.2 og.module \og_help()

Implements hook_help().

File

./og.module, line 97
Enable users to create and manage groups with roles and permissions.

Code

function og_help($path, $arg) {

  // Provide messages for og-migrate module.
  if ($path != 'admin/config/group/group-migrate' && $path != 'batch' && strpos($path, '#') === FALSE && user_access('access administration pages') && og_needs_migrate()) {
    if ($path == 'admin/reports/status') {
      $message = t('Organic groups or one of its modules needs to migrate data.');
    }
    else {
      if (module_exists('og_migrate')) {
        $message = t('Organic groups or one of its modules needs to <a href="@url">migrate data</a>. After a successful execution you can disable it.', array(
          '@url' => url('admin/config/group/group-migrate'),
        ));
      }
      else {
        $message = t('Organic groups or one of its modules needs you to enable Organic groups migrate module.');
      }
    }
    drupal_set_message($message, 'error');
  }
  switch ($path) {
    case 'admin/help#og':
      $path = drupal_get_path('module', 'og');
      $output = '<p>' . t("Read the <a href='@url'>README.txt</a> file in the Organic groups module directory.", array(
        '@url' => "/{$path}/README.txt",
      )) . '</p>';
      $output .= '<p>' . t("Information about Organic Groups can also be found on the module's<a href='@og'>documentation page</a>.", array(
        '@og' => 'http://drupal.org/documentation/modules/og',
      )) . '</p>';
      return $output;
  }
}