archive_block

Versions
4.6 – 4.7
archive_block($op = 'list', $delta = 0)

Implementation of hook_block().

Generates a calendar for the current month, with links to the archives for each day.

Code

modules/archive.module, line 185

<?php
function archive_block($op = 'list', $delta = 0) {
  if ($op == 'list') {
    $blocks[0]['info'] = t('Calendar to browse archives');
    return $blocks;
  }
  else if ($op == 'view' && user_access('access content')) {
    $block['subject'] = t('Browse archives');
    $block['content'] = archive_calendar();
    return $block;
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.