You are here

function block_help in Drupal 4

Same name and namespace in other branches
  1. 8 core/modules/block/block.module \block_help()
  2. 5 modules/block/block.module \block_help()
  3. 6 modules/block/block.module \block_help()
  4. 7 modules/block/block.module \block_help()
  5. 9 core/modules/block/block.module \block_help()

Implementation of hook_help().

File

modules/block.module, line 11
Controls the boxes that are displayed around the main content.

Code

function block_help($section) {
  switch ($section) {
    case 'admin/help#block':
      $output = '<p>' . t('Blocks are boxes of content that may be rendered into certain regions of your web pages, for example, into sidebars. Blocks are usually generated automatically by modules (e.g., Recent Forum Topics), but administrators can also define custom blocks.') . '</p>';
      $output .= '<p>' . t('The region each block appears in depends on both which theme you are using (some themes allow greater control over block placement than others), and on the settings in the block administration section.') . '</p>';
      $output .= '<p>' . t('The block administration screen lets you specify the vertical placement of the blocks within a region. You do this by assigning a weight to each block. Lighter blocks (those having a smaller weight) "float up" towards the top of the region; heavier ones "sink".') . '</p>';
      $output .= t('<p>A block\'s visibility depends on:</p>
<ul>
<li>Its enabled checkbox. Disabled blocks are never shown.</li>
<li>Its throttle checkbox. Throttled blocks are hidden during high server loads.</li>
<li>Its page visibility settings. Blocks can be configured to be visible/hidden on certain pages.</li>
<li>Its custom visibility settings. Blocks can be configured to be visible only when specific conditions are true.</li>
<li>Its user visibility settings. Administrators can choose to let users decide whether to show/hide certain blocks.</li>
<li>Its function. Some dynamic blocks, such as those generated by modules, will be displayed only on certain pages.</li>
</ul>
');
      $output .= '<h3>' . t('Module blocks') . '</h3>';
      $output .= '<p>' . t('Some modules generate blocks that become available when the modules are enabled. These blocks can be administered via the <a href="%admin-block">blocks administration page</a>.</p>', array(
        '%admin-block' => url('admin/block'),
      )) . '</p>';
      $output .= '<h3>' . t('Administrator defined blocks') . '</h3>';
      $output .= '<p>' . t('Administrators can also define custom blocks. These blocks consist of a title, a description, and a body which can be as long as you wish. Block content can be in any of the input formats supported for other content.') . '</p>';
      $output .= t('<p>You can</p>
<ul>
<li>enable, throttle and configure blocks at <a href="%admin-block">administer &gt;&gt; blocks</a>.</li>
<li>add an administrator-defined block at <a href="%admin-block-add">administer &gt;&gt; blocks &gt;&gt; add block</a>.</li>
</ul>
', array(
        '%admin-block' => url('admin/block'),
        '%admin-block-add' => url('admin/block/add'),
      ));
      $output .= '<p>' . t('For more information please read the configuration and customization handbook <a href="%block">Block page</a>.', array(
        '%block' => 'http://drupal.org/handbook/modules/block/',
      )) . '</p>';
      return $output;
    case 'admin/modules#description':
      return t('Controls the boxes that are displayed around the main content.');
    case 'admin/block':
      return t("\n<p>Blocks are boxes of content that may be rendered into certain regions of your web pages, for example, into sidebars. They are usually generated automatically by modules, but administrators can create blocks manually.</p>\n<p>Only enabled blocks are shown. You can position blocks by specifying which area of the page they should appear in (e.g., a sidebar).  Highlighted labels on this page show the regions into which blocks can be rendered. You can specify where within a region a block will appear by adjusting its weight.</p>\n<p>If you want certain blocks to disable themselves temporarily during high server loads, check the 'Throttle' box. You can configure the auto-throttle on the <a href=\"%throttle\">throttle configuration page</a> after having enabled the throttle module.</p>\n<p>You can configure the behaviour of each block (for example, specifying on which pages and for what users it will appear) by clicking the 'configure' link for each block.</p>\n", array(
        '%throttle' => url('admin/settings/throttle'),
      ));
    case 'admin/block/add':
      return t('<p>Here you can create a new block. Once you have created this block you must make it active and give it a place on the page using <a href="%overview">blocks</a>. The title is used when displaying the block. The description is used in the "block" column on the <a href="%overview">blocks</a> page.</p>', array(
        '%overview' => url('admin/block'),
      ));
  }
}