You are here

function scrolltext_settings_form in ScrollText 6

Same name and namespace in other branches
  1. 5 scrolltext.module \scrolltext_settings_form()
  2. 7 scrolltext.admin.inc \scrolltext_settings_form()
1 string reference to 'scrolltext_settings_form'
scrolltext_menu in ./scrolltext.module
Menu callback. Prints a listing of active nodes on the site.

File

./scrolltext.module, line 60
This module used for scrolling text from node title

Code

function scrolltext_settings_form() {
  $form['scrolltext_general'] = array(
    '#type' => 'fieldset',
    '#title' => t('General settings'),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
    '#description' => t('Remember to enable the ScrollText on Drupal !blocks . CSS id is "scrolltext" to theming ScrollText.', array(
      '!blocks' => l('blocks', 'admin/build/block'),
    )),
  );
  $form['scrolltext_general']['scrolltext_direction'] = array(
    '#type' => 'select',
    '#title' => t('Scroll Direction'),
    '#default_value' => variable_get('scrolltext_direction', 'Left'),
    '#options' => array(
      'Left' => 'Left',
      'Right' => 'Right',
      'Up' => 'Up',
      'Down' => 'Down',
    ),
  );
  $form['scrolltext_general']['scrolltext_behavior'] = array(
    '#type' => 'select',
    '#title' => t('Scroll Type'),
    '#default_value' => variable_get('scrolltext_behavior', 'Scroll'),
    '#options' => array(
      'Scroll' => 'Scroll',
      'Slide' => 'Slide',
      'Alternate' => 'Bouncing',
    ),
    '#description' => t('Bouncing will not run if scrol text wider than scroll width.'),
  );
  $form['scrolltext_general']['scrolltext_speed'] = array(
    '#type' => 'textfield',
    '#title' => t('Scroll Speed'),
    '#default_value' => variable_get('scrolltext_speed', '10'),
  );
  $form['scrolltext_general']['scrolltext_delay'] = array(
    '#type' => 'textfield',
    '#title' => t('Scroll Delay (milisecond)'),
    '#default_value' => variable_get('scrolltext_delay', '100'),
  );
  $form['scrolltext_general']['scrolltext_width'] = array(
    '#type' => 'textfield',
    '#title' => t('Scroll Width'),
    '#default_value' => variable_get('scrolltext_width', '100%'),
  );
  $form['scrolltext_general']['scrolltext_height'] = array(
    '#type' => 'textfield',
    '#title' => t('Scroll Height'),
    '#default_value' => variable_get('scrolltext_height', '0'),
    '#description' => t('HEIGHT depends on scroll text length, try use 0 if the ScrollText DIRECTION does not work!'),
  );
  $form['scrolltext_general']['scrolltext_format'] = array(
    '#type' => 'textfield',
    '#title' => t('Scroll Format'),
    '#default_value' => variable_get('scrolltext_format', ''),
    '#description' => t('Format of the text including size and color, style information'),
  );
  $form['scrolltext_source'] = array(
    '#type' => 'fieldset',
    '#title' => t('Source settings'),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
  );
  $form['scrolltext_source']['scrolltext_nodetype'] = array(
    '#type' => 'textfield',
    '#title' => t('Node Type'),
    '#default_value' => variable_get('scrolltext_nodetype', "'page','story'"),
    '#description' => t("<p>Get title from certain node type, i.e: 'page','story'</p>"),
  );
  $form['scrolltext_source']['scrolltext_count'] = array(
    '#type' => 'textfield',
    '#title' => t('Title Count'),
    '#default_value' => variable_get('scrolltext_count', '10'),
    '#description' => t('<p>How many new title would you like to scrol? NOTE: greater number will cause you website slowly!</p>'),
  );
  return system_settings_form($form);
}