/[drupal]/drupal/modules/block.module
ViewVC logotype

Diff of /drupal/modules/block.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.206, Wed Apr 26 21:53:24 2006 UTC revision 1.206.2.2, Sun Jul 2 20:53:52 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: block.module,v 1.205 2006/04/17 20:48:26 dries Exp $  // $Id: block.module,v 1.206.2.1 2006/05/21 13:49:07 killes Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 12  Line 12 
12  function block_help($section) {  function block_help($section) {
13    switch ($section) {    switch ($section) {
14      case 'admin/help#block':      case 'admin/help#block':
15        $output = '<p>'. t('Blocks are the boxes of related/grouped data that are visible in the sidebar(s) of your web site. These are usually generated automatically by modules (e.g. recent forum topics), but administrators can also create their own defined blocks.') .'</p>';        $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>';
16        $output .= '<p>'. t('The sidebar each block appears in depends on both which theme you are using (some are left-only, some right, some both), and on the settings in block management.') .'</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>';
17        $output .= '<p>'. t('The block management screen lets you specify the vertical sort-order of the blocks within a sidebar. You do this by assigning a weight to each block. Lighter blocks (smaller weight) "float up" towards the top of the sidebar. Heavier ones "sink down" towards the bottom of it.') .'</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>';
18        $output .= t('<p>A block\'s visibility depends on:</p>        $output .= t('<p>A block\'s visibility depends on:</p>
19  <ul>  <ul>
20  <li>Its enabled checkbox. Disabled blocks are never shown.</li>  <li>Its enabled checkbox. Disabled blocks are never shown.</li>
21  <li>Its throttle checkbox. Throttled blocks are hidden during high server loads.</li>  <li>Its throttle checkbox. Throttled blocks are hidden during high server loads.</li>
22  <li>Its path options. Blocks can be configured to only show/hide on certain pages.</li>  <li>Its page visibility settings. Blocks can be configured to be visible/hidden on certain pages.</li>
23  <li>User settings. Administrators can choose to let your users decide whether to show/hide certain blocks.</li>  <li>Its custom visibility settings. Blocks can be configured to be visible only when specific conditions are true.</li>
24  <li>Its function. Dynamic blocks (such as those defined by modules) may be empty on certain pages and will not be shown.</li>  <li>Its user visibility settings. Administrators can choose to let users decide whether to show/hide certain blocks.</li>
25    <li>Its function. Some dynamic blocks, such as those generated by modules, will be displayed only on certain pages.</li>
26  </ul>  </ul>
27  ');  ');
28        $output .= '<h3>'. t('Module blocks') .'</h3>';        $output .= '<h3>'. t('Module blocks') .'</h3>';
29        $output .= '<p>'. t('Module blocks are available when modules are enabled.  These blocks can be administered in block administration.') .'</p>';        $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>';
30        $output .= '<h3>'. t('Administrator defined blocks') .'</h3>';        $output .= '<h3>'. t('Administrator defined blocks') .'</h3>';
31        $output .= '<p>'. t('An administrator defined block contains content supplied by the administrator. Each admin-defined block consists of a title, a description, and a body which can be as long as you wish. The Drupal engine will render the content of the block.') .'</p>';        $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>';
32        $output .= t('<p>You can</p>        $output .= t('<p>You can</p>
33  <ul>  <ul>
34  <li>enable throttle and configure blocks at <a href="%admin-block">administer &gt;&gt; blocks</a>.</li>  <li>enable, throttle and configure blocks at <a href="%admin-block">administer &gt;&gt; blocks</a>.</li>
35  <li>add a block at <a href="%admin-block-add">administer &gt;&gt; blocks &gt;&gt; add block</a>.</li>  <li>add an administrator-defined block at <a href="%admin-block-add">administer &gt;&gt; blocks &gt;&gt; add block</a>.</li>
36  </ul>  </ul>
37  ', array('%admin-block' => url('admin/block'), '%admin-block-add' => url('admin/block/add')));  ', array('%admin-block' => url('admin/block'), '%admin-block-add' => url('admin/block/add')));
38        $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>';        $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>';
# Line 40  function block_help($section) { Line 41  function block_help($section) {
41        return t('Controls the boxes that are displayed around the main content.');        return t('Controls the boxes that are displayed around the main content.');
42      case 'admin/block':      case 'admin/block':
43        return t("        return t("
44  <p>Blocks are content rendered into regions, often boxes in the left and right side bars of the web site. They are made available by modules or created manually.</p>  <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>
45  <p>Only enabled blocks are shown. You can position the blocks by deciding which area of the page they will show up on (e.g., a sidebar) and in which order they appear (weight).  Highlighting on this page shows the regions where content will be rendered.</p>  <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>
46  <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>  <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>
47    <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>
48  ", array('%throttle' => url('admin/settings/throttle')));  ", array('%throttle' => url('admin/settings/throttle')));
49      case 'admin/block/add':      case 'admin/block/add':
50        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')));        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')));
# Line 220  function block_admin_display() { Line 222  function block_admin_display() {
222      $form[$i]['theme'] = array('#type' => 'hidden', '#value' => $theme_key);      $form[$i]['theme'] = array('#type' => 'hidden', '#value' => $theme_key);
223      $form[$i]['weight'] = array('#type' => 'weight', '#default_value' => $block['weight']);      $form[$i]['weight'] = array('#type' => 'weight', '#default_value' => $block['weight']);
224      $form[$i]['region'] = array('#type' => 'select',      $form[$i]['region'] = array('#type' => 'select',
225        '#default_value' => isset($block['region']) ? $block['region'] : system_default_region(),        '#default_value' => isset($block['region']) ? $block['region'] : system_default_region($theme_key),
226        '#options' => $block_regions,        '#options' => $block_regions,
227      );      );
228    

Legend:
Removed from v.1.206  
changed lines
  Added in v.1.206.2.2

  ViewVC Help
Powered by ViewVC 1.1.2