You are here

function ad_text_global_settings in Advertisement 6.2

Same name and namespace in other branches
  1. 5.2 text/ad_text.module \ad_text_global_settings()
  2. 5 text/ad_text.module \ad_text_global_settings()
  3. 6.3 text/ad_text.module \ad_text_global_settings()
  4. 6 text/ad_text.module \ad_text_global_settings()
  5. 7 text/ad_text.module \ad_text_global_settings()

Text ad settings form.

File

text/ad_text.module, line 122
Enhances the ad module to support static text ads.

Code

function ad_text_global_settings($form_state) {
  $form = array();
  $form['header_min'] = array(
    '#type' => 'textfield',
    '#title' => t('Header minimum length'),
    '#size' => 3,
    '#maxlength' => 3,
    '#default_value' => variable_get('header_min', 0),
    '#description' => t('Optionally specify the minimum number of characters allowed in the header of a text ad.  Set to <em>0</em> to specify no minimum length.'),
  );
  $form['header_max'] = array(
    '#type' => 'textfield',
    '#title' => t('Header maximum length'),
    '#size' => 3,
    '#maxlength' => 3,
    '#default_value' => variable_get('header_max', 0),
    '#description' => t('Optionally specify the maximum number of characters allowed in the header of a text ad.  Set to <em>0</em> to specify no maximum length.'),
  );
  $form['body_min'] = array(
    '#type' => 'textfield',
    '#title' => t('Body minimum length'),
    '#size' => 10,
    '#maxlength' => 10,
    '#default_value' => variable_get('body_min', 0),
    '#description' => t('Optionally specify the minimum number of characters allowed in the body of a text ad.  Set to <em>0</em> to specify no minimum length.'),
  );
  $form['body_max'] = array(
    '#type' => 'textfield',
    '#title' => t('Body maximum length'),
    '#size' => 10,
    '#maxlength' => 10,
    '#default_value' => variable_get('body_max', 0),
    '#description' => t('Optionally specify the maximum number of characters allowed in the body of a text ad.  Set to <em>0</em> to specify no maximum length.'),
  );
  $form['save'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
  );
  return $form;
}