You are here

function timeago_admin in Timeago 6.2

Same name and namespace in other branches
  1. 5 timeago.module \timeago_admin()
  2. 6 timeago.module \timeago_admin()
  3. 7.2 timeago.module \timeago_admin()
  4. 7 timeago.module \timeago_admin()

The administrative settings form.

1 string reference to 'timeago_admin'
timeago_menu in ./timeago.module
Implementation of hook_menu().

File

./timeago.module, line 65
Adds support for the Timeago jQuery library.

Code

function timeago_admin($form_state) {
  $form = array();
  $form['timeago_node'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use timeago for node creation dates'),
    '#default_value' => variable_get('timeago_node', 1),
  );
  $form['timeago_comment'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use timeago for comment creation/changed dates'),
    '#default_value' => variable_get('timeago_comment', 1),
  );
  $form['timeago_elem'] = array(
    '#type' => 'radios',
    '#title' => t('Time element'),
    '#default_value' => variable_get('timeago_elem', 'span'),
    '#options' => array(
      'span' => t('span'),
      'abbr' => t('abbr'),
      'time' => t('time (HTML5 only)'),
    ),
  );
  return system_settings_form($form);
}