[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/swftools/imagerotator/ -> imagerotator.admin.inc (source)

   1  <?php
   2  // $Id: imagerotator.admin.inc,v 1.2.2.1 2009/04/22 21:39:33 stuartgreenfield Exp $
   3  
   4  function imagerotator_admin_form() {
   5  
   6    $options = _imagerotator_options();
   7  
   8    $form = array();
   9  
  10   // Image Rotator
  11  
  12    $saved_settings = _imagerotator_settings(WIJERING_IMAGEROTATOR);
  13    // Flatten settings for convenience
  14    $saved = array();
  15    foreach ($saved_settings AS $category => $vars) {
  16      $saved = array_merge($saved, $vars);
  17    }
  18  
  19    $form['wijering_imagerotator']['basic'] = array(
  20      '#type'  => 'fieldset',
  21      '#title' => t('Basic'),
  22      '#collapsible' => TRUE,
  23      '#collapsed' => TRUE,
  24    );
  25    $form['wijering_imagerotator']['basic']['height'] = array(
  26      '#type' => 'textfield',
  27      '#default_value' => $saved['height'],
  28      '#size' => 8,
  29      '#maxlength' => 5,
  30      '#title' => t('Height'),
  31      '#description' => t('Leave blank for default. (<em>height</em>)'),
  32    );
  33    $form['wijering_imagerotator']['basic']['width'] = array(
  34      '#type' => 'textfield',
  35      '#default_value' => $saved['width'],
  36      '#size' => 8,
  37      '#maxlength' => 5,
  38      '#title' => t('Width'),
  39      '#description' => t('Leave blank for default. (<em>width</em>)'),
  40    );
  41    $form['wijering_imagerotator']['color'] = array(
  42      '#type'  => 'fieldset',
  43      '#title' => t('Color'),
  44      '#collapsible' => TRUE,
  45      '#collapsed' => TRUE,
  46    );
  47    $form['wijering_imagerotator']['color']['backcolor'] = array(
  48      '#type' => 'textfield',
  49      '#default_value' => $saved['backcolor'],
  50      '#size' => 8,
  51      '#maxlength' => 7,
  52      '#title' => t('Background color'),
  53      '#description' => t('Enter a hex value eg. for white enter <b>#FFFFFF</b>. (<em>backcolor</em>)'),
  54    );
  55    $form['wijering_imagerotator']['color']['frontcolor'] = array(
  56      '#type' => 'textfield',
  57      '#default_value' => $saved['frontcolor'],
  58      '#size' => 8,
  59      '#maxlength' => 7,
  60      '#title' => t('Text color'),
  61      '#description' => t('Enter a hex value eg. for white enter <b>#FFFFFF</b>. (<em>frontcolor</em>)'),
  62    );
  63    $form['wijering_imagerotator']['color']['lightcolor'] = array(
  64      '#type' => 'textfield',
  65      '#default_value' => $saved['lightcolor'],
  66      '#size' => 8,
  67      '#maxlength' => 7,
  68      '#title' => t('Rollover color'),
  69      '#description' => t('Enter a hex value eg. for white enter <b>#FFFFFF</b>. (<em>lightcolor</em>)'),
  70    );
  71    $form['wijering_imagerotator']['appearance'] = array(
  72      '#type'  => 'fieldset',
  73      '#title' => t('Appearance'),
  74      '#collapsible' => TRUE,
  75      '#collapsed' => TRUE,
  76    );
  77    $form['wijering_imagerotator']['appearance']['logo'] = array(
  78      '#type' => 'textfield',
  79      '#default_value' => $saved['logo'],
  80      '#title' => t('Logo URL'),
  81      '#description' => t('Full url to logo for a watermark, use PNG files for best results. (<em>logo</em>)'),
  82    );
  83    $form['wijering_imagerotator']['appearance']['overstretch'] = array(
  84      '#type' => 'select',
  85      '#default_value' => $saved['overstretch'],
  86      '#title' => t('Overstretch'),
  87      '#options' => $options['overstretch'],
  88      '#description' => t('Defines how to stretch images to fit the display. (<em>overstretch</em>)'),
  89    );
  90    $form['wijering_imagerotator']['appearance']['showicons'] = array(
  91      '#type' => 'select',
  92      '#options' => $options['bool'],
  93      '#default_value' => $saved['showicons'],
  94      '#title' => t('Show icons'),
  95      '#description' => t('Show status icons in display. (<em>showicons</em>)'),
  96    );
  97    $form['wijering_imagerotator']['appearance']['shownavigation'] = array(
  98      '#type' => 'select',
  99      '#default_value' => $saved['shownavigation'],
 100      '#options' => $options['bool'],
 101      '#title' => t('Show navigation'),
 102      '#description' => t('If false then all navigation controls are hidden. (<em>shownavigation</em>)'),
 103    );
 104    $form['wijering_imagerotator']['appearance']['transition'] = array(
 105      '#type' => 'select',
 106      '#default_value' => $saved['transition'],
 107      '#options' => $options['transition'],
 108      '#title' => t('Transition effect'),
 109      '#description' => t('The way the photos change from one to another. (<em>transition</em>)'),
 110    );
 111    
 112    $form['wijering_imagerotator']['playback'] = array(
 113      '#type'  => 'fieldset',
 114      '#title' => t('Playback'),
 115      '#collapsible' => TRUE,
 116      '#collapsed' => TRUE,
 117    );
 118  
 119    $form['wijering_imagerotator']['playback']['rotatetime'] = array(
 120      '#type' => 'textfield',
 121      '#default_value' => $saved['rotatetime'],
 122      '#size' => 5,
 123      '#maxlength' => 3,
 124      '#title' => t('Rotate time'),
 125      '#description' => t('Number of seconds between image rotations. (<em>rotatetime</em>)'),
 126    );
 127    $form['wijering_imagerotator']['playback']['shuffle'] = array(
 128      '#type' => 'select',
 129      '#options' => $options['bool'],
 130      '#default_value' => $saved['shuffle'],
 131      '#title' => t('Shuffle'),
 132      '#description' => t('Shuffle media randomly. (<em>shuffle</em>)'),
 133    );
 134    $form['wijering_imagerotator']['interaction'] = array(
 135      '#type'  => 'fieldset',
 136      '#title' => t('Interaction'),
 137      '#collapsible' => TRUE,
 138      '#collapsed' => TRUE,
 139    );
 140    $form['wijering_imagerotator']['interaction']['enablejs'] = array(
 141      '#type' => 'select',
 142      '#options' => $options['bool'],
 143      '#default_value' => $saved['enablejs'],
 144      '#title' => t('Enable javascript'),
 145      '#description' => t('Enable javascript interaction with the flash player. (<em>enablejs</em>)'),
 146    );
 147    $form['wijering_imagerotator']['interaction']['link'] = array(
 148      '#type' => 'textfield',
 149      '#default_value' => $saved['link'],
 150      '#title' => t('Link URL'),
 151      '#description' => t('Web address linked to logo watermark. (<em>link</em>)'),
 152    );
 153    $form['wijering_imagerotator']['interaction']['linkfromdisplay'] = array(
 154      '#type' => 'select',
 155      '#options' => $options['bool'],
 156      '#default_value' => $saved['linkfromdisplay'],
 157      '#title' => t('Link from display'),
 158      '#description' => t('Link "Link URL" but with the whole display as the click area. (<em>linkfromdisplay</em>)'),
 159    );
 160    $form['wijering_imagerotator']['interaction']['linktarget'] = array(
 161      '#type' => 'select',
 162      '#default_value' => $saved['linktarget'],
 163      '#options' => $options['linktarget'],
 164      '#title' => t('Link target'),
 165      '#description' => t('Target of "Link URL". (<em>linktarget</em>)'),
 166    );
 167  
 168    $form['#tree'] = TRUE;
 169  
 170    $form['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'), '#submit' => array('swftools_admin_form_submit') );
 171    $form['reset'] = array('#type' => 'submit', '#value' => t('Reset to defaults') );
 172    $form['#theme'] = 'system_settings_form';
 173  
 174    return $form;
 175  
 176  }


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7