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

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

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


Revision 1.3 - (show annotations) (download) (as text)
Tue Feb 17 23:12:01 2009 UTC (9 months, 1 week ago) by stuartgreenfield
Branch: MAIN
CVS Tags: DRUPAL-6--2-4, DRUPAL-6--2-3, DRUPAL-6--2-2, DRUPAL-6--2-0, HEAD
Branch point for: DRUPAL-6--2
Changes since 1.2: +2 -2 lines
File MIME type: text/x-php
More work on FlowPlayer3. Basic configuration page now started. Only a few settings are available, but proves concept. Method is based on file uploaded by fearfox.
1 <?php
2 // $Id: wijering4.admin.inc,v 1.2 2008/09/07 19:42:15 stuartgreenfield Exp $
3
4 function wijering4_admin_form() {
5
6 $saved_settings = _wijering4_settings(WIJERING4_MEDIAPLAYER);
7
8 // Flatten settings for convenience
9 $saved = array();
10 foreach ($saved_settings AS $category => $vars) {
11 $saved = array_merge($saved, $vars);
12 }
13 $options = _wijering4_options();
14
15 $form = array();
16
17 $form['wijering4_mediaplayer']['basic'] = array(
18 '#type' => 'fieldset',
19 '#title' => t('Basic'),
20 '#collapsible' => TRUE,
21 '#collapsed' => TRUE,
22 );
23 $form['wijering4_mediaplayer']['basic']['playlistsize'] = array(
24 '#type' => 'textfield',
25 '#default_value' => $saved['playlistsize'],
26 '#size' => 8,
27 '#maxlength' => 5,
28 '#title' => t('Playlist size'),
29 '#description' => t('Leave blank for default. (<em>playlistsize</em>)'),
30 );
31 $form['wijering4_mediaplayer']['basic']['height'] = array(
32 '#type' => 'textfield',
33 '#default_value' => $saved['height'],
34 '#size' => 8,
35 '#maxlength' => 5,
36 '#title' => t('Height'),
37 '#description' => t('Leave blank for default. (<em>height</em>)'),
38 );
39 $form['wijering4_mediaplayer']['basic']['width'] = array(
40 '#type' => 'textfield',
41 '#default_value' => $saved['width'],
42 '#size' => 8,
43 '#maxlength' => 5,
44 '#title' => t('Width'),
45 '#description' => t('Leave blank for default. (<em>width</em>)'),
46 );
47 $form['wijering4_mediaplayer']['color'] = array(
48 '#type' => 'fieldset',
49 '#title' => t('Color'),
50 '#collapsible' => TRUE,
51 '#collapsed' => TRUE,
52 );
53 $form['wijering4_mediaplayer']['color']['backcolor'] = array(
54 '#type' => 'textfield',
55 '#default_value' => $saved['backcolor'],
56 '#size' => 8,
57 '#maxlength' => 7,
58 '#title' => t('Background color'),
59 '#description' => t('Enter a hex value eg. for white enter <b>#FFFFFF</b>. (<em>backcolor</em>)'),
60 );
61 $form['wijering4_mediaplayer']['color']['frontcolor'] = array(
62 '#type' => 'textfield',
63 '#default_value' => $saved['frontcolor'],
64 '#size' => 8,
65 '#maxlength' => 7,
66 '#title' => t('Text color'),
67 '#description' => t('Enter a hex value eg. for white enter <b>#FFFFFF</b>. (<em>frontcolor</em>)'),
68 );
69 $form['wijering4_mediaplayer']['color']['lightcolor'] = array(
70 '#type' => 'textfield',
71 '#default_value' => $saved['lightcolor'],
72 '#size' => 8,
73 '#maxlength' => 7,
74 '#title' => t('Rollover color'),
75 '#description' => t('Enter a hex value eg. for white enter <b>#FFFFFF</b>. (<em>lightcolor</em>)'),
76 );
77 $form['wijering4_mediaplayer']['color']['screencolor'] = array(
78 '#type' => 'textfield',
79 '#default_value' => $saved['screencolor'],
80 '#size' => 8,
81 '#maxlength' => 7,
82 '#title' => t('Screen color'),
83 '#description' => t('Enter a hex value eg. for white enter <b>#FFFFFF</b>. (<em>screencolor</em>)'),
84 );
85 $form['wijering4_mediaplayer']['appearance'] = array(
86 '#type' => 'fieldset',
87 '#title' => t('Appearance'),
88 '#collapsible' => TRUE,
89 '#collapsed' => TRUE,
90 );
91 $form['wijering4_mediaplayer']['appearance']['skin'] = array(
92 '#type' => 'textfield',
93 '#default_value' => $saved['skin'],
94 '#title' => t('Skin URL'),
95 '#description' => t('Full url to a skin for the player. (<em>skin</em>)'),
96 );
97 /**
98 $form['wijering4_mediaplayer']['appearance']['displaywidth'] = array(
99 '#type' => 'textfield',
100 '#default_value' => $saved['displaywidth'],
101 '#size' => 8,
102 '#maxlength' => 5,
103 '#title' => t('Display width'),
104 '#description' => t('Setting this will result in controls along the side and override "Display width". (<em>displaywidth</em>)'),
105 );
106 **/
107 $form['wijering4_mediaplayer']['appearance']['logo'] = array(
108 '#type' => 'textfield',
109 '#default_value' => $saved['logo'],
110 '#title' => t('Logo URL'),
111 '#description' => t('Full url to logo for a watermark, use PNG files for best results. (<em>logo</em>)'),
112 );
113 $form['wijering4_mediaplayer']['appearance']['overstretch'] = array(
114 '#type' => 'select',
115 '#default_value' => $saved['overstretch'],
116 '#title' => t('Overstretch'),
117 '#options' => $options['overstretch'],
118 '#description' => t('Defines how to stretch images to fit the display. (<em>overstretch</em>)'),
119 );
120 $form['wijering4_mediaplayer']['appearance']['controlbar'] = array(
121 '#type' => 'select',
122 '#default_value' => $saved['controlbar'],
123 '#title' => t('Control bar position'),
124 '#options' => $options['controlbar'],
125 '#description' => t('Defines where to position the control bar. (<em>controlbar</em>)'),
126 );
127 $form['wijering4_mediaplayer']['appearance']['playlist'] = array(
128 '#type' => 'select',
129 '#default_value' => $saved['playlist'],
130 '#title' => t('Playlist position'),
131 '#options' => $options['playlist'],
132 '#description' => t('Defines where to position the playlist. (<em>playlist</em>)'),
133 );
134 $form['wijering4_mediaplayer']['playback'] = array(
135 '#type' => 'fieldset',
136 '#title' => t('Playback'),
137 '#collapsible' => TRUE,
138 '#collapsed' => TRUE,
139 );
140 $form['wijering4_mediaplayer']['playback']['autostart'] = array(
141 '#type' => 'select',
142 '#options' => $options['bool'],
143 '#default_value' => $saved['autostart'],
144 '#title' => t('Autostart'),
145 '#description' => t('Automatically start playing the media. (<em>autostart</em>)'),
146 );
147 $form['wijering4_mediaplayer']['playback']['bufferlength'] = array(
148 '#type' => 'textfield',
149 '#default_value' => $saved['bufferlength'],
150 '#size' => 5,
151 '#maxlength' => 2,
152 '#title' => t('Buffer length'),
153 '#description' => t('Number of seconds of buffering before playing file. (<em>bufferlength</em>)'),
154 );
155 $form['wijering4_mediaplayer']['playback']['displayclick'] = array(
156 '#type' => 'select',
157 '#default_value' => $saved['displayclick'],
158 '#title' => t('Display click'),
159 '#options' => $options['displayclick'],
160 '#description' => t('Action to take when the player is clicked. (<em>displayclick</em>)'),
161 );
162 $form['wijering4_mediaplayer']['playback']['repeat'] = array(
163 '#type' => 'select',
164 '#default_value' => $saved['repeat'],
165 '#title' => t('Repeat'),
166 '#options' => $options['repeat'],
167 '#description' => t('Set whether the media repeats after completion. (<em>repeat</em>)'),
168 );
169 $form['wijering4_mediaplayer']['playback']['shuffle'] = array(
170 '#type' => 'select',
171 '#options' => $options['bool'],
172 '#default_value' => $saved['shuffle'],
173 '#title' => t('Shuffle'),
174 '#description' => t('Shuffle media randomly. (<em>shuffle</em>)'),
175 );
176 $form['wijering4_mediaplayer']['playback']['volume'] = array(
177 '#type' => 'textfield',
178 '#default_value' => $saved['volume'],
179 '#size' => 8,
180 '#maxlength' => 3,
181 '#title' => t('Volume'),
182 '#description' => t('Starting volume of the player. (<em>volume</em>)'),
183 );
184 $form['wijering4_mediaplayer']['interaction'] = array(
185 '#type' => 'fieldset',
186 '#title' => t('Interaction'),
187 '#collapsible' => TRUE,
188 '#collapsed' => TRUE,
189 );
190 $form['wijering4_mediaplayer']['interaction']['captions'] = array(
191 '#type' => 'textfield',
192 '#default_value' => $saved['captions'],
193 '#title' => t('Captions URL'),
194 '#description' => t('Full url used to an external textfile with captions. (<em>captions</em>)'),
195 );
196 $form['wijering4_mediaplayer']['interaction']['link'] = array(
197 '#type' => 'textfield',
198 '#default_value' => $saved['link'],
199 '#title' => t('Link URL'),
200 '#description' => t('Web address linked to logo watermark. (<em>link</em>)'),
201 );
202 $form['wijering4_mediaplayer']['interaction']['linktarget'] = array(
203 '#type' => 'select',
204 '#default_value' => $saved['linktarget'],
205 '#options' => $options['linktarget'],
206 '#title' => t('Link target'),
207 '#description' => t('Target of "Link URL". (<em>linktarget</em>)'),
208 );
209 $form['wijering4_mediaplayer']['interaction']['streamscript'] = array(
210 '#type' => 'textfield',
211 '#default_value' => $saved['streamscript'],
212 '#title' => t('Streaming script URL'),
213 '#description' => t('Full url to \'fake\' streaming script. (<em>streamscript</em>)'),
214 );
215 $form['wijering4_mediaplayer']['interaction']['type'] = array(
216 '#type' => 'select',
217 '#options' => $options['type'],
218 '#default_value' => $saved['type'],
219 '#title' => t('File type'),
220 '#description' => t('Specify a default filetype, the default setting will auto-detect. (<em>type</em>)'),
221 );
222 $form['wijering4_mediaplayer']['interaction']['fullscreen'] = array(
223 '#type' => 'select',
224 '#options' => $options['bool'],
225 '#default_value' => $saved['fullscreen'],
226 '#title' => t('Allow use of fullscreen'),
227 '#description' => t('Determine whether to allow fullscreen functionality. (<em>usefullscreen</em>).<br /><em>Allow full screen mode</em> must also be enabled on the SWF Tools embedding settings page.'),
228 );
229
230 $form['#tree'] = TRUE;
231
232 $form['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'), '#submit' => array('swftools_admin_form_submit') );
233 $form['reset'] = array('#type' => 'submit', '#value' => t('Reset to defaults'), '#submit' => array('swftools_admin_form_submit') );
234 $form['#theme'] = 'system_settings_form';
235
236 return $form;
237
238 }

  ViewVC Help
Powered by ViewVC 1.1.2