You are here

function download_count_block_configure in Download Count 7.2

Same name and namespace in other branches
  1. 7.3 download_count.module \download_count_block_configure()

Implements hook_block_configure().

File

./download_count.module, line 245
Tracks file downloads for files stored in the drupal files table using the private files setting or custom private filefield.

Code

function download_count_block_configure($delta) {
  $form['download_count_' . $delta . '_block_limit'] = array(
    '#type' => 'textfield',
    '#title' => t('Number of items to display'),
    '#size' => 5,
    '#default_value' => variable_get('download_count_' . $delta . '_block_limit', 10),
  );
  $form['download_count_' . $delta . '_show_size'] = array(
    '#type' => 'checkbox',
    '#title' => t('Display aggregated filesize'),
    '#default_value' => variable_get('download_count_' . $delta . '_show_size', 0),
  );
  $form['download_count_' . $delta . '_show_last'] = array(
    '#type' => 'checkbox',
    '#title' => t('Display last download datetime'),
    '#default_value' => variable_get('download_count_' . $delta . '_show_last', 0),
  );
  if ($delta == 'files') {
    $form['download_count_files_file_links'] = array(
      '#type' => 'checkbox',
      '#title' => t('Display files names as links (based on permissions).'),
      '#default_value' => variable_get('download_count_files_file_links', 1),
    );
  }
  return $form;
}