function back_to_top_settings

cis7 back_to_top.admin.inc back_to_top_settings($form_state)
cle7 back_to_top.admin.inc back_to_top_settings($form_state)
elmsmedia7 back_to_top.admin.inc back_to_top_settings($form_state)
icor7 back_to_top.admin.inc back_to_top_settings($form_state)
meedjum_blog7 back_to_top.admin.inc back_to_top_settings($form_state)
mooc7 back_to_top.admin.inc back_to_top_settings($form_state)
1 string reference to 'back_to_top_settings'
back_to_top_menu in sites/all/modules/ulmus/back_to_top/back_to_top.module
Implements hook_menu().

File

sites/all/modules/ulmus/back_to_top/back_to_top.admin.inc, line 9
Contains the administration pages for Back To Top.

Code

function back_to_top_settings($form_state) {

  // Include Farbtastic color picker library and other necessary resources.
  drupal_add_library('system', 'farbtastic');
  drupal_add_js(drupal_get_path('module', 'back_to_top') . '/js/back_to_top.admin.js');
  drupal_add_css(drupal_get_path('module', 'back_to_top') . '/css/back_to_top.admin.css');

  $form['back_to_top_prevent_on_mobile'] = array(
    '#type' => 'checkbox',
    '#title' => t('Prevent on mobile and touch devices'),
    '#description' => t('Do you want to prevent Back To Top on touch devices?'),
    '#default_value' => variable_get('back_to_top_prevent_on_mobile', TRUE),
  );
  $form['back_to_top_prevent_in_admin'] = array(
    '#type' => 'checkbox',
    '#title' => t('Prevent on administration pages and node edit'),
    '#description' => t('Do you want to prevent Back To Top on admin pages?'),
    '#default_value' => variable_get('back_to_top_prevent_in_admin', TRUE),
  );
  $form['back_to_top_button_trigger'] = array(
    '#type' => 'textfield',
    '#title' => t('Trigger'),
    '#description' => t('Set the number of pixel which trigger the Back To Top button default 100'),
    '#default_value' => variable_get('back_to_top_button_trigger', 100),
    '#size' => 10,
    '#maxlength' => 4,
  );
  $form['back_to_top_button_place'] = array(
    '#title' => t('Placement'),
    '#description' => t('Where should the Back To Top button appear?'),
    '#type' => 'select',
    '#options' => array(
      1 => t('Bottom right'),
      2 => t('Bottom left'),
      3 => t('Botton center'),
      4 => t('Top right'),
      5 => t('Top left'),
      6 => t('Top center'),
      7 => t('Mid right'),
      8 => t('Mid left'),
      9 => t('Mid center'),
    ),
    '#default_value' => variable_get('back_to_top_button_place', 1),
  );
  $form['back_to_top_button_type'] = array(
    '#type' => 'radios',
    '#title' => t('Do you want Back To Top to use a PNG-24 image or a Text/Css button?'),
    '#options' => array(
      'image' => t('Image (default)'),
      'text' => t('Text/Css'),
    ),
    '#default_value' => variable_get('back_to_top_button_type', 'image'),
  );

  // Wrap Text/Css button settings in a fieldset.
  $form['text_button'] = array(
    '#type' => 'fieldset',
    '#title' => t('Text/Css button settings'),
    '#collapsible' => TRUE,
    '#collapsed' => ($form['back_to_top_button_type']['#default_value'] == 'image' ? TRUE : FALSE),
  );
  $form['text_button']['back_to_top_bg_color'] = array(
    '#type' => 'textfield',
    '#title' => t('Background color'),
    '#description' => t('Button background color default #F7F7F7'),
    '#default_value' => variable_get('back_to_top_bg_color', '#F7F7F7'),
    '#size' => 10,
    '#maxlength' => 7,
    '#suffix' => '<div class="color-field" id="back_to_top_bg_color"></div>',
  );
  $form['text_button']['back_to_top_border_color'] = array(
    '#type' => 'textfield',
    '#title' => t('Border color'),
    '#description' => t('Border color default #CCCCCC'),
    '#default_value' => variable_get('back_to_top_border_color', '#CCCCCC'),
    '#size' => 10,
    '#maxlength' => 7,
    '#suffix' => '<div class="color-field" id="back_to_top_border_color"></div>',
  );
  $form['text_button']['back_to_top_hover_color'] = array(
    '#type' => 'textfield',
    '#title' => t('Hover color'),
    '#description' => t('Hover color default #EEEEEE'),
    '#default_value' => variable_get('back_to_top_hover_color', '#EEEEEE'),
    '#size' => 10,
    '#maxlength' => 7,
    '#suffix' => '<div class="color-field" id="back_to_top_hover_color"></div>',
  );
  $form['text_button']['back_to_top_text_color'] = array(
    '#type' => 'textfield',
    '#title' => t('Text color'),
    '#description' => t('Text color default #333333'),
    '#default_value' => variable_get('back_to_top_text_color', '#333333'),
    '#size' => 10,
    '#maxlength' => 7,
    '#suffix' => '<div class="color-field" id="back_to_top_text_color"></div>',
  );
  return system_settings_form($form);
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.