You are here

function recently_read_block_configure in Recently Read 7.2

Same name and namespace in other branches
  1. 7 recently_read.module \recently_read_block_configure()

Implements hook_block_configure().

File

./recently_read.module, line 71
Recently read module file. Displays a history of recently read nodes by currently logged in user.

Code

function recently_read_block_configure($delta) {

  // allow user to customize the length of a list for each node type
  $max_entries = variable_get('recently_read_max_entries', 10);
  $max_count = variable_get("recently_read_max_length", array(
    'page' => 10,
    'article' => 10,
  ));
  $form['items_count'] = array(
    '#type' => 'textfield',
    '#title' => t('Maximum number of links to display in the block'),
    '#description' => t('Enter the positive integer value, less or equal to %limit.', array(
      '%limit' => $max_entries,
    )),
    '#default_value' => key_exists($delta, $max_count) ? $max_count[$delta] : $max_entries,
  );
  return $form;
}