/[drupal]/contributions/modules/flexiblock/flexiblock.module
ViewVC logotype

Diff of /contributions/modules/flexiblock/flexiblock.module

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

revision 1.5, Wed Jul 27 22:54:32 2005 UTC revision 1.6, Fri Jul 29 22:18:02 2005 UTC
# Line 1  Line 1 
1  <?php // $Id: flexiblock.module,v 1.4 2005/07/25 21:46:15 djnz Exp $  <?php // $Id: flexiblock.module,v 1.5 2005/07/27 22:54:32 djnz Exp $
2    
3  /**  /**
4   * @file   * @file
# Line 62  function flexiblock_help($section) { Line 62  function flexiblock_help($section) {
62  <p>Blocks are the 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 the boxes in the left and right side bars of the web site. They are made available by modules or created manually.</p>
63  <p>Only enabled blocks are shown. You can position the blocks by deciding which side of the page they will show up on (sidebar) and in which order they appear (weight).</p>  <p>Only enabled blocks are shown. You can position the blocks by deciding which side of the page they will show up on (sidebar) and in which order they appear (weight).</p>
64  <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>
65  <p>Themes that support flexiblocks use the regions in the 'location' column. Legacy themes use the settings in the 'Sidebar' column.</p>  <p>Themes that support flexiblock use the regions in the 'location' column. Legacy themes use the settings in the 'Sidebar' column.</p>
66  ", array('%throttle' => url('admin/settings/throttle')));  ", array('%throttle' => url('admin/settings/throttle')));
67    }    }
68  }  }
# Line 80  function flexiblock_perm() { Line 80  function flexiblock_perm() {
80  function flexiblock_menu($may_cache) {  function flexiblock_menu($may_cache) {
81    $items = array();    $items = array();
82    if ($may_cache) {    if ($may_cache) {
83      $items[] = array('path' => 'admin/flexiblock', 'title' => t('flexiblocks'),      $items[] = array('path' => 'admin/flexiblock', 'title' => t('flexiblock'),
84        'access' => user_access('administer blocks'),        'access' => user_access('administer blocks'),
85        'callback' => 'flexiblock_admin');        'callback' => 'flexiblock_admin');
86      $items[] = array('path' => 'admin/flexiblock/list', 'title' => t('list'),      $items[] = array('path' => 'admin/flexiblock/list', 'title' => t('list'),
87        'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10);        'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10);
88      $items[] = array('path' => 'admin/flexiblock/configure', 'title' => t('configure block'),      $items[] = array('path' => 'admin/flexiblock/debug', 'title' => t('debug'),
89        'access' => user_access('administer blocks'),        'access' => user_access('administer blocks'),
90        'callback' => 'flexiblock_admin_configure',        'callback' => 'flexiblock_admin_debug',
91        'type' => MENU_CALLBACK);        'type' => MENU_CALLBACK);
92    }    }
93    
# Line 202  function flexiblock_admin_save($edit) { Line 202  function flexiblock_admin_save($edit) {
202    return t('The flexiblock settings have been updated.');    return t('The flexiblock settings have been updated.');
203  }  }
204    
205    /**
206     * Display information to help debugging.
207     */
208    function flexiblock_admin_debug() {
209      ob_start();
210      echo "\nDefault mapping\n";
211      print_r(variable_get('flexiblock_mapping', array()));
212      echo "\nCurrent mapping\n";
213      print_r(_flexiblock_get_mapping());
214      echo "\nFlexiblock block list\n";
215      print_r(theme_flexiblock_blocks());
216      echo "\nLegacy block list\n";
217      print_r(block_list('all'));
218      $content = '<pre>'.htmlspecialchars(ob_get_clean()).'</pre>';
219      print theme('page', $content);
220    }
221    
222    
223  // PRIVATE FUNCTIONS *******************************************************************  // PRIVATE FUNCTIONS *******************************************************************
224    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.2