You are here

function environment_indicator_help in Environment Indicator 7.2

Same name and namespace in other branches
  1. 8.3 environment_indicator.module \environment_indicator_help()
  2. 8.2 environment_indicator.module \environment_indicator_help()
  3. 6 environment_indicator.module \environment_indicator_help()
  4. 7 environment_indicator.module \environment_indicator_help()
  5. 4.x environment_indicator.module \environment_indicator_help()

Implements hook_help().

File

./environment_indicator.module, line 11
Module implementation file.

Code

function environment_indicator_help($path, $arg) {
  switch ($path) {
    case 'admin/config/development/environment-indicator':
      return t("The Environment Indicator adds a coloured strip to the site informing you which environment you're currently in (Development, Staging Production etc). You may override these settings by adding a new environment based on the hostname being seen or with your settings.php file in each of your environments.");
    case 'admin/help#environment_indicator':
      $output = '<p>' . t("The Environment Indicator adds a coloured strip to the site informing you which environment you're currently in (Development, Staging Production etc") . '</p>';
      $output .= '<p>' . t('The Environment Indicator <a href="@settings">settings page</a> allows you to modify some elements of the indicator\'s behavior and appearance. Since the appearance of the indicator is dependent on your site theme, substantial customisations require modifications to your site\'s theme and CSS files.', array(
        '@settings' => url('admin/config/development/environment-indicator'),
      )) . '</p>';
      $output .= '<p>' . t('The Environment Indicator\'s visibility depends upon the permissions of the viewer. The <a href="@permissions">access environment indicator</a> permission must be enabled for a user role in order for users of that role to see the indicator.', array(
        '@permissions' => url('admin/people/permissions', array(
          'fragment' => 'module-environment_indicator',
        )),
      )) . '</p>';
      $output .= '<p>' . t("The settings for the Environment Indicator, such as the text to display and the color can be overridden for each of your specific environments using the configuration UI or in the site's settings.php file. You can also export this configuration to code, this allows you to customise the indicator for each environment without needing to make any changes in the database. This means that the Environment Indicator will always display correctly when moving your site from development to staging to production. If you choose to detect your environment using settings.php, then all configuration variables can be overridden in settings.php, but the most common three are:") . '</p>';
      $output .= '<dl>';
      $output .= '<dt><em>environment_indicator_overwrite</em></dt><dd>' . t('A boolean value indicating whether the Environment Indicator should use the settings.php variables for the indicator. On your production environment, you should probably set this to FALSE.') . '<br/>$conf[\'environment_indicator_overwrite\'] = FALSE;<br />* ' . t('This setting corresponds to the old %setting in version 1.x.', array(
        '%setting' => 'environment_indicator_enabled',
      )) . '</dd></dt>';
      $output .= '<dt><em>environment_indicator_overwritten_name</em></dt><dd>' . t('The text that will be displayed on the indicator.') . '<br/>$conf[\'environment_indicator_overwritten_name\'] = \'Staging\';<br />* ' . t('This setting corresponds to the old %setting in version 1.x.', array(
        '%setting' => 'environment_indicator_text',
      )) . '</dd></dt>';
      $output .= '<dt><em>environment_indicator_overwritten_color</em></dt><dd>' . t('A valid css color.') . '<br/>$conf[\'environment_indicator_overwritten_color\'] = \'#ff5555\';<br />* ' . t('This setting corresponds to the old %setting in version 1.x.', array(
        '%setting' => 'environment_indicator_color',
      )) . '</dd></dt>';
      $output .= '<dt><em>environment_indicator_overwritten_position</em></dt><dd>' . t('Where your indicator may appear. Allowed values are "top" and "bottom".') . '<br/>$conf[\'environment_indicator_overwritten_position\'] = \'top\';</dd></dt>';
      $output .= '<dt><em>environment_indicator_overwritten_fixed</em></dt><dd>' . t('A boolean value indicating whether the Environment Indicator should be visible at all times, fixed at the top/bottom of the screen.') . '<br/>$conf[\'environment_indicator_overwritten_fixed\'] = FALSE;</dd></dt>';
      $output .= '</dl>';
      return $output;
  }
}