You are here

function environment_indicator_help in Environment Indicator 6

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. 7.2 environment_indicator.module \environment_indicator_help()
  4. 7 environment_indicator.module \environment_indicator_help()
  5. 4.x environment_indicator.module \environment_indicator_help()

Implementation of hook_help().

File

./environment_indicator.module, line 14
Adds a coloured strip to the side of the site informing the user which environment they are in (Development, Staging Production etc).

Code

function environment_indicator_help($path, $arg) {
  switch ($path) {
    case 'admin/settings/environment_indicator':
      return t('The Environment Indicator adds a coloured strip to the side of the site informing you which environment you\'re currently in (Development, Staging Production etc). Use the settings below to customize the appearance of the indicator. You may override these settings in 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 side of 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/settings/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/user/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 in the site\'s settings.php file. 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. For example:') . '</p>';
      $output .= '<dl>';
      $output .= '<dt><em>environment_indicator_text</em></dt><dd>' . t('The text that will be displayed vertically down the indicator. e.g:<br/>$conf[\'environment_indicator_text\'] = \'STAGING SERVER\';') . '</dd></dt>';
      $output .= '<dt><em>environment_indicator_color</em></dt><dd>' . t('A valid css color. e.g:<br/>$conf[\'environment_indicator_color\'] = \'red\';') . '</dd></dt>';
      $output .= '<dt><em>environment_indicator_enabled</em></dt><dd>' . t('A boolean value indicating whether the Environment Indicator should be enabled or not. On your production environment, you should probably set this to FALSE. e.g:<br/>$conf[\'environment_indicator_enabled\'] = FALSE;') . '</dd></dt>';
      $output .= '</dl>';
      return $output;
  }
}