/[drupal]/contributions/modules/swftools/imagerotator/imagerotator.admin.inc
ViewVC logotype

Contents of /contributions/modules/swftools/imagerotator/imagerotator.admin.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Sun Sep 7 19:42:14 2008 UTC (14 months, 2 weeks ago) by stuartgreenfield
Branch: MAIN
CVS Tags: DRUPAL-6--2-4, DRUPAL-6--2-3, DRUPAL-6--2-2, DRUPAL-6--2-1, DRUPAL-6--2-0, HEAD
Branch point for: DRUPAL-6--2
Changes since 1.1: +167 -0 lines
File MIME type: text/x-php
Commit of branch DRUPAL-6--1 back to HEAD as part of plans to tidy up the tree!
1 <?php
2 // $Id: imagerotator.admin.inc,v 1.1.2.4 2008/08/19 21:45:43 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']['playback'] = array(
98 '#type' => 'fieldset',
99 '#title' => t('Playback'),
100 '#collapsible' => TRUE,
101 '#collapsed' => TRUE,
102 );
103 $form['wijering_imagerotator']['appearance']['transition'] = array(
104 '#type' => 'select',
105 '#default_value' => $saved['transition'],
106 '#options' => $options['transition'],
107 '#title' => t('Transition effect'),
108 '#description' => t('The way the photos change from one to another". (<em>transition</em>)'),
109 );
110 $form['wijering_imagerotator']['playback']['rotatetime'] = array(
111 '#type' => 'textfield',
112 '#default_value' => $saved['rotatetime'],
113 '#size' => 5,
114 '#maxlength' => 3,
115 '#title' => t('Rotate time'),
116 '#description' => t('Number of seconds between image rotations. (<em>rotatetime</em>)'),
117 );
118 $form['wijering_imagerotator']['playback']['shuffle'] = array(
119 '#type' => 'select',
120 '#options' => $options['bool'],
121 '#default_value' => $saved['shuffle'],
122 '#title' => t('Shuffle'),
123 '#description' => t('Shuffle media randomly. (<em>shuffle</em>)'),
124 );
125 $form['wijering_imagerotator']['interaction'] = array(
126 '#type' => 'fieldset',
127 '#title' => t('Interaction'),
128 '#collapsible' => TRUE,
129 '#collapsed' => TRUE,
130 );
131 $form['wijering_imagerotator']['interaction']['enablejs'] = array(
132 '#type' => 'select',
133 '#options' => $options['bool'],
134 '#default_value' => $saved['enablejs'],
135 '#title' => t('Enable javascript'),
136 '#description' => t('Enable javascript interaction with the flash player. (<em>enablejs</em>)'),
137 );
138 $form['wijering_imagerotator']['interaction']['link'] = array(
139 '#type' => 'textfield',
140 '#default_value' => $saved['link'],
141 '#title' => t('Link URL'),
142 '#description' => t('Web address linked to logo watermark. (<em>link</em>)'),
143 );
144 $form['wijering_imagerotator']['interaction']['linkfromdisplay'] = array(
145 '#type' => 'select',
146 '#options' => $options['bool'],
147 '#default_value' => $saved['linkfromdisplay'],
148 '#title' => t('Link from display'),
149 '#description' => t('Link "Link URL" but with the whole display as the click area. (<em>linkfromdisplay</em>)'),
150 );
151 $form['wijering_imagerotator']['interaction']['linktarget'] = array(
152 '#type' => 'select',
153 '#default_value' => $saved['linktarget'],
154 '#options' => $options['linktarget'],
155 '#title' => t('Link target'),
156 '#description' => t('Target of "Link URL". (<em>linktarget</em>)'),
157 );
158
159 $form['#tree'] = TRUE;
160
161 $form['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'), '#submit' => array('swftools_admin_form_submit') );
162 $form['reset'] = array('#type' => 'submit', '#value' => t('Reset to defaults') );
163 $form['#theme'] = 'system_settings_form';
164
165 return $form;
166
167 }

  ViewVC Help
Powered by ViewVC 1.1.2