-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauditioneer.module
490 lines (463 loc) · 23.3 KB
/
auditioneer.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
<?php
function _auditioneer_display_bits(){
drupal_add_js(drupal_get_path('module', 'auditioneer') . '/auditioneer.js', array('type' => 'file', 'scope' => 'footer'));
drupal_add_css(drupal_get_path('module', 'auditioneer') . '/auditioneer.css', array('group' => CSS_DEFAULT, 'type' => 'file'));
$settings = array(
'timeblock_checked' => variable_get('auditioneer_timeblock_checked', "PaleGreen"),
'timeblock_unchecked' => variable_get('auditioneer_timeblock_unchecked', "LightPink"),
'timeblock_checked_text' => variable_get('auditioneer_timeblock_checked_text', "black"),
'timeblock_unchecked_text' => variable_get('auditioneer_timeblock_unchecked_text', "white"),
);
drupal_add_js(array('auditioneer' => $settings), 'setting');
}
foreach (array("manage", "signup", "content_type") as $file){
module_load_include('inc', 'auditioneer', 'includes/'.$file);
}
/**
* Implements hook_help().
*
* Displays help and module information.
*
* @param path
* Which path of the site we're using to display help
* @param arg
* Array that holds the current path as returned from arg() function
*/
function auditioneer_help($path, $arg) {
_auditioneer_display_bits();
switch ($path) {
case "admin/help#auditioneer":
return '<p>' . t("Content types and other code for auditions") . '</p>';
break;
}
}
function auditioneer_element_validate_css_color($element, &$form_state){
$css_colors = array("AliceBlue", "AntiqueWhite", "Aqua", "Aquamarine", "Azure", "Beige", "Bisque", "Black", "BlanchedAlmond", "Blue", "BlueViolet", "Brown", "BurlyWood", "CadetBlue", "Chartreuse", "Chocolate", "Coral", "CornflowerBlue", "Cornsilk", "Crimson", "Cyan", "DarkBlue", "DarkCyan", "DarkGoldenRod", "DarkGray", "DarkGrey", "DarkGreen", "DarkKhaki", "DarkMagenta", "DarkOliveGreen", "DarkOrange", "DarkOrchid", "DarkRed", "DarkSalmon", "DarkSeaGreen", "DarkSlateBlue", "DarkSlateGray", "DarkSlateGrey", "DarkTurquoise", "DarkViolet", "DeepPink", "DeepSkyBlue", "DimGray", "DimGrey", "DodgerBlue", "FireBrick", "FloralWhite", "ForestGreen", "Fuchsia", "Gainsboro", "GhostWhite", "Gold", "GoldenRod", "Gray", "Grey", "Green", "GreenYellow", "HoneyDew", "HotPink", "IndianRed", "Indigo", "Ivory", "Khaki", "Lavender", "LavenderBlush", "LawnGreen", "LemonChiffon", "LightBlue", "LightCoral", "LightCyan", "LightGoldenRodYellow", "LightGray", "LightGrey", "LightGreen", "LightPink", "LightSalmon", "LightSeaGreen", "LightSkyBlue", "LightSlateGray", "LightSlateGrey", "LightSteelBlue", "LightYellow", "Lime", "LimeGreen", "Linen", "Magenta", "Maroon", "MediumAquaMarine", "MediumBlue", "MediumOrchid", "MediumPurple", "MediumSeaGreen", "MediumSlateBlue", "MediumSpringGreen", "MediumTurquoise", "MediumVioletRed", "MidnightBlue", "MintCream", "MistyRose", "Moccasin", "NavajoWhite", "Navy", "OldLace", "Olive", "OliveDrab", "Orange", "OrangeRed", "Orchid", "PaleGoldenRod", "PaleGreen", "PaleTurquoise", "PaleVioletRed", "PapayaWhip", "PeachPuff", "Peru", "Pink", "Plum", "PowderBlue", "Purple", "RebeccaPurple", "Red", "RosyBrown", "RoyalBlue", "SaddleBrown", "Salmon", "SandyBrown", "SeaGreen", "SeaShell", "Sienna", "Silver", "SkyBlue", "SlateBlue", "SlateGray", "SlateGrey", "Snow", "SpringGreen", "SteelBlue", "Tan", "Teal", "Thistle", "Tomato", "Turquoise", "Violet", "Wheat", "White", "WhiteSmoke", "Yellow", "YellowGreen");
if(!preg_match("/^#[abcdef0-9]{6}$/i", $element['#value']) &&
!preg_grep("/^".$element['#value']."$/i", $css_colors)
){
form_error($element, t('You must enter a valid CSS color.'));
}
}
/**
* Implements hook_menu().
*/
function auditioneer_admin() {
_auditioneer_display_bits();
$form = array();
$form['auditioneer_signup_path'] = array(
'#type' => 'textfield',
'#title' => t('Signup page path'),
'#default_value' => variable_get('auditioneer_signup_path'),
'#description' => t("The path to the signup page where all pending auditions will be visible to users (currently <a href='/".variable_get('auditioneer_signup_path')."'>/".variable_get('auditioneer_signup_path')."</a>). <strong>You may need to clear the site cache for changes to this setting to take effect.</strong>"),
'#required' => TRUE
);
$form['auditioneer_notify_from'] = array(
'#type' => 'textfield',
'#title' => t('Send notification emails from:'),
'#size' => 25,
'#default_value' => variable_get('auditioneer_notify_from'),
'#description' => t("Sets the <strong>From</strong> address for notification emails. Set to an address that will be read by a live person, able to answer questions from auditioners."),
'#required' => TRUE
);
$form['auditioneer_resume_upload_path'] = array(
'#type' => 'textfield',
'#title' => t('Resumé upload path'),
'#size' => 25,
'#default_value' => variable_get('auditioneer_resume_upload_path'),
'#description' => t("Where to store uploaded headshots/resumés, as a Drupal file URI. Recommended value: <strong>private://</strong>. You must first ensure that the Private file system path is correctly configured at <a href='/admin/config/media/file-system'>/admin/config/media/file-system</a>. Uploaded resumés will be anonymously accessible if this is set to <strong>public://</strong>."),
'#required' => TRUE
);
$form['auditioneer_firstname_field'] = array(
'#type' => 'textfield',
'#title' => t('Given name field:'),
'#size' => 25,
'#default_value' => variable_get('auditioneer_firstname_field'),
'#description' => t("If user accounts on this site have extra fields for storign a user's real name, set this to the field name of the first name/given name (e.g. field_firstname))"),
'#required' => FALSE
);
$form['auditioneer_lastname_field'] = array(
'#type' => 'textfield',
'#title' => t('Surname field:'),
'#size' => 25,
'#default_value' => variable_get('auditioneer_lastname_field'),
'#description' => t("If user accounts on this site have extra fields for storign a user's real name, set this to the field name of the last name/surname (e.g. field_lastname)"),
'#required' => FALSE
);
$form['auditioneer_messaging'] = array(
'#type' => 'fieldset',
'#collapsed' => true,
'#collapsible' => true,
'#title' => "Signup Form Messages"
);
$form['auditioneer_messaging']['auditioneer_signup_open_message'] = array(
'#type' => 'textarea',
'#title' => t('Open signup instructions'),
'#default_value' => variable_get('auditioneer_signup_open_message'),
'#cols' => 50,
'#rows' => 3,
'#maxlength' => 300,
'#description' => t("The message to show on an audition signup form when the signups are open and the user has not yet signed up."),
'#required' => TRUE,
);
$form['auditioneer_messaging']['auditioneer_signup_signedup_message'] = array(
'#type' => 'textarea',
'#title' => t('Instructions to update an existing audition signup'),
'#default_value' => variable_get('auditioneer_signup_signedup_message'),
'#cols' => 50,
'#rows' => 3,
'#maxlength' => 300,
'#description' => t("The message to show on an audition signup form when the signups are open and the user HAS signed up."),
'#required' => TRUE,
);
$form['auditioneer_messaging']['auditioneer_signup_closed_message'] = array(
'#type' => 'textarea',
'#title' => t('Closed signup message'),
'#default_value' => variable_get('auditioneer_signup_closed_message'),
'#cols' => 50,
'#rows' => 3,
'#maxlength' => 300,
'#description' => t("The message to show on an audition signup form when the signups are closed, the user has signed up, and the assignments have not yet been drawn."),
'#required' => TRUE,
);
$form['auditioneer_messaging']['auditioneer_signup_closed_nosignup_message'] = array(
'#type' => 'textarea',
'#title' => t('Closed signup message for users who have not signed up'),
'#default_value' => variable_get('auditioneer_signup_closed_nosignup_message'),
'#cols' => 50,
'#rows' => 3,
'#maxlength' => 300,
'#description' => t("The message to show on a lottery audition signup form when the lottery is closed and the user has NOT signed up."),
'#required' => TRUE,
);
$form['auditioneer_messaging']['auditioneer_signup_finalized_waitlisted_message'] = array(
'#type' => 'textarea',
'#title' => t('Signup form message for users who have been assigned to the waitlist'),
'#default_value' => variable_get('auditioneer_signup_finalized_waitlisted_message'),
'#cols' => 50,
'#rows' => 3,
'#maxlength' => 300,
'#required' => TRUE,
);
$form['auditioneer_messaging']['auditioneer_signup_finalized_ineligible_message'] = array(
'#type' => 'textarea',
'#title' => t('Signup form message for users who have been marked ineligible.'),
'#default_value' => variable_get('auditioneer_signup_finalized_ineligible_message'),
'#cols' => 50,
'#rows' => 3,
'#maxlength' => 300,
'#required' => TRUE,
);
$form['auditioneer_corner_banner'] = array(
'#type' => 'fieldset',
'#collapsed' => true,
'#collapsible' => true,
'#title' => "Signup Form Corner Banner"
);
$form['auditioneer_corner_banner']['auditioneer_signup_open_banner'] = array(
'#type' => 'textfield',
'#title' => t('Banner text for open auditions.'),
'#default_value' => variable_get('auditioneer_signup_open_banner'),
'#size' => 15,
'#maxlength' => 18,
'#description' => t("The text for the corner banner on a lottery audition signup form when the lottery is open and the user has not yet signed up."),
'#required' => false,
);
$form['auditioneer_corner_banner']['auditioneer_signup_open_color'] = array(
'#type' => 'textfield',
'#title' => t('Banner background color for open auditions.'),
'#default_value' => variable_get('auditioneer_signup_open_color'),
'#size' => 20,
'#maxlength' => 15,
'#element_validate' => array('auditioneer_element_validate_css_color'),
'#description' => t("The background color for the corner banner on a lottery audition signup form when the lottery is open and the user has not yet signed up."),
'#required' => TRUE,
);
$form['auditioneer_corner_banner']['auditioneer_signup_signedup_banner'] = array(
'#type' => 'textfield',
'#title' => t('Banner text for auditions the user has entered.'),
'#default_value' => variable_get('auditioneer_signup_signedup_banner'),
'#size' => 15,
'#maxlength' => 18,
'#description' => t("The text for the corner banner on a lottery audition signup form when the user HAS signed up."),
'#required' => false,
);
$form['auditioneer_corner_banner']['auditioneer_signup_signedup_color'] = array(
'#type' => 'textfield',
'#title' => t('Banner background color for auditions the user has entered.'),
'#default_value' => variable_get('auditioneer_signup_signedup_color'),
'#size' => 20,
'#maxlength' => 15,
'#element_validate' => array('auditioneer_element_validate_css_color'),
'#description' => t("The background color for the corner banner on a lottery audition signup form when the user HAS signed up."),
'#required' => TRUE,
);
$form['auditioneer_corner_banner']['auditioneer_signup_closed_nosignup_banner'] = array(
'#type' => 'textfield',
'#title' => t('Banner text for closed auditions.'),
'#default_value' => variable_get('auditioneer_signup_closed_nosignup_banner'),
'#size' => 15,
'#maxlength' => 18,
'#description' => t("The text for the corner banner on a lottery audition signup form when the lottery is closed and the user has NOT signed up."),
'#required' => false,
);
$form['auditioneer_corner_banner']['auditioneer_signup_closed_nosignup_color'] = array(
'#type' => 'textfield',
'#title' => t('Banner background color for closed auditions.'),
'#default_value' => variable_get('auditioneer_signup_closed_nosignup_color'),
'#size' => 20,
'#maxlength' => 15,
'#element_validate' => array('auditioneer_element_validate_css_color'),
'#description' => t("The background color for the corner banner on a lottery audition signup form when the lottery is closed and the user has NOT signed up."),
'#required' => TRUE,
);
$form['auditioneer_corner_banner']['auditioneer_signup_unfinalized_banner'] = array(
'#type' => 'textfield',
'#title' => t('Banner text for auditions past the signup deadline but not yet finalized.'),
'#default_value' => variable_get('auditioneer_signup_unfinalized_banner'),
'#size' => 15,
'#maxlength' => 18,
'#required' => false,
);
$form['auditioneer_corner_banner']['auditioneer_signup_unfinalized_color'] = array(
'#type' => 'textfield',
'#title' => t('Banner background color for auditions past the signup deadline but not yet finalized.'),
'#default_value' => variable_get('auditioneer_signup_unfinalized_color'),
'#size' => 20,
'#maxlength' => 15,
'#element_validate' => array('auditioneer_element_validate_css_color'),
'#required' => TRUE,
);
$form['auditioneer_corner_banner']['auditioneer_signup_gotslot_banner'] = array(
'#type' => 'textfield',
'#title' => t('Banner text for finalized auditions where the user has been assigned a definite slot.'),
'#default_value' => variable_get('auditioneer_signup_gotslot_banner'),
'#size' => 15,
'#maxlength' => 18,
'#description' => t("The text for the corner banner on a lottery audition signup form when the lottery is finalized and the user has been assigned a definite slot."),
'#required' => false,
);
$form['auditioneer_corner_banner']['auditioneer_signup_gotslot_color'] = array(
'#type' => 'textfield',
'#title' => t('Banner background color for auditions for which the user has been assigned a definite slot.'),
'#default_value' => variable_get('auditioneer_signup_gotslot_color'),
'#size' => 20,
'#maxlength' => 15,
'#element_validate' => array('auditioneer_element_validate_css_color'),
'#description' => t("The background color for the corner banner on a lottery audition signup form when the lottery is finalized and the user has been assigned a slot."),
'#required' => TRUE,
);
$form['auditioneer_corner_banner']['auditioneer_signup_waitlist_banner'] = array(
'#type' => 'textfield',
'#title' => t('Banner text for finalized auditions where the user has been assigned to the waitlist.'),
'#default_value' => variable_get('auditioneer_signup_waitlist_banner'),
'#size' => 15,
'#maxlength' => 18,
'#description' => t("The text for the corner banner on a lottery audition signup form when the lottery is finalized and the user has been assigned to the waitlist."),
'#required' => false,
);
$form['auditioneer_corner_banner']['auditioneer_signup_waitlist_color'] = array(
'#type' => 'textfield',
'#title' => t('Banner background color for auditions for which the user has been assigned to the waitlist.'),
'#default_value' => variable_get('auditioneer_signup_waitlist_color'),
'#size' => 20,
'#maxlength' => 15,
'#element_validate' => array('auditioneer_element_validate_css_color'),
'#description' => t("The background color for the corner banner on a lottery audition signup form when the lottery is finalized and the user has been assigned to the waitlist."),
'#required' => TRUE,
);
$form['auditioneer_corner_banner']['auditioneer_signup_ineligible_banner'] = array(
'#type' => 'textfield',
'#title' => t('Banner text for finalized auditions where the user has been marked ineligible.'),
'#default_value' => variable_get('auditioneer_signup_ineligible_banner'),
'#size' => 15,
'#maxlength' => 18,
'#description' => t("The text for the corner banner on a lottery audition signup form when the lottery is finalized and the user has been marked ineligible."),
'#required' => false,
);
$form['auditioneer_corner_banner']['auditioneer_signup_ineligible_color'] = array(
'#type' => 'textfield',
'#title' => t('Banner background color for auditions for which the user has been marked ineligible.'),
'#default_value' => variable_get('auditioneer_signup_ineligible_color'),
'#size' => 20,
'#maxlength' => 15,
'#element_validate' => array('auditioneer_element_validate_css_color'),
'#description' => t("The background color for the corner banner on a lottery audition signup form when the lottery is finalized and the user has been marked ineligible."),
'#required' => TRUE,
);
$form['auditioneer_timeblock'] = array(
'#type' => 'fieldset',
'#collapsed' => true,
'#collapsible' => true,
'#title' => "Signup Form Time Block Styling"
);
$form['auditioneer_timeblock']['auditioneer_timeblock_checked_text'] = array(
'#type' => 'textfield',
'#title' => t('Foreground color for time blocks the user has selected.'),
'#default_value' => variable_get('auditioneer_timeblock_checked_text'),
'#size' => 15,
'#maxlength' => 20,
'#element_validate' => array('auditioneer_element_validate_css_color'),
'#required' => TRUE,
);
$form['auditioneer_timeblock']['auditioneer_timeblock_checked'] = array(
'#type' => 'textfield',
'#title' => t('Background color for time blocks the user has selected.'),
'#default_value' => variable_get('auditioneer_timeblock_checked'),
'#size' => 15,
'#maxlength' => 20,
'#element_validate' => array('auditioneer_element_validate_css_color'),
'#required' => TRUE,
);
$form['auditioneer_timeblock']['auditioneer_timeblock_unchecked_text'] = array(
'#type' => 'textfield',
'#title' => t('Foreground color for time blocks the user has NOT selected.'),
'#default_value' => variable_get('auditioneer_timeblock_unchecked_text'),
'#size' => 15,
'#maxlength' => 20,
'#element_validate' => array('auditioneer_element_validate_css_color'),
'#required' => TRUE,
);
$form['auditioneer_timeblock']['auditioneer_timeblock_unchecked'] = array(
'#type' => 'textfield',
'#title' => t('Background color for time blocks the user has NOT selected.'),
'#default_value' => variable_get('auditioneer_timeblock_unchecked'),
'#size' => 15,
'#maxlength' => 20,
'#element_validate' => array('auditioneer_element_validate_css_color'),
'#required' => TRUE,
);
$form['css_colors_guide'] = array(
'#type' => 'item',
'#markup' => '<em>Color fields accept any valid CSS color string. See the <a href="http://www.w3schools.com/colors/default.asp" target="_blank">W3 Schools</a> guide on CSS/HTML colors for more information.</em>',
'#weight' => 9
);
return system_settings_form($form);
}
/**
* Implements hook_menu().
*/
function auditioneer_menu() {
global $user;
_auditioneer_display_bits();
$items = array();
$items['admin/config/people/auditions'] = array(
'title' => 'Auditions',
'description' => 'Manage slot assignments and settings for the Auditions module.',
'type' => MENU_NORMAL_ITEM,
'access callback' => 'user_access',
'access arguments' => array('administer auditions')
);
$auditions = node_load_multiple(array(), array('type' => "auditioneer_audition"));
uasort($auditions, '_auditioneer_sort_by_date');
foreach ($auditions as $nid => $audition){
list($start, $end) = _auditioneer_get_times($audition);
if($end < time()){
continue;
}
$items['admin/config/people/auditions/'.$nid] = array(
'title' => "Audition: ".$audition->title,
'description' => drupal_render(field_view_field('node', $audition, 'field_auditioneer_time_blocks', 'auditioneer_audition_signup_form')),
'page callback' => 'auditioneer_manage',
'page arguments' => array(4, 5),
'access callback' => 'user_access',
'access arguments' => array('administer auditions'),
'type' => MENU_NORMAL_ITEM
);
}
$items['admin/config/people/auditions/audition_settings'] = array(
'title' => 'Global Audition Settings',
'weight' => -100,
'description' => 'Configuration settings for the Auditioneer module. Use this to customize signup messaging, colors, etc.',
'page callback' => 'drupal_get_form',
'page arguments' => array('auditioneer_admin'),
'access callback' => 'user_access',
'access arguments' => array('administer auditions'),
'type' => MENU_NORMAL_ITEM
);
$items[variable_get('auditioneer_signup_path')] = array(
'title' => 'Audition Signups',
'description' => 'Sign up for pending auditions.',
'page callback' => 'auditioneer_signup_page',
'access callback' => 'user_access',
'access arguments' => array('view and sign up for auditions')
);
return $items;
}
/**
* Implements hook_theme_registry_alter().
*/
function auditioneer_theme_registry_alter(&$theme_registry) {
_auditioneer_display_bits();
// Defined path to the current module.
$module_path = drupal_get_path('module', 'auditioneer')."/templates";
// Find all .tpl.php files in this module's folder recursively.
$template_file_objects = drupal_find_theme_templates($theme_registry, '.tpl.php', $module_path);
// Iterate through all found template file objects.
foreach ($template_file_objects as $key => $template_file_object) {
// If the template has not already been overridden by a theme.
if (!isset($theme_registry[$key]['theme path']) || !preg_match('#/themes/#', $theme_registry[$key]['theme path'])) {
// Alter the theme path and template elements.
$theme_registry[$key]['theme path'] = $module_path;
$theme_registry[$key] = array_merge($theme_registry[$key], $template_file_object);
$theme_registry[$key]['type'] = 'module';
}
}
}
/**
* Manipulate our plain old lottery object into a signup form for itself. This
* is what should always be displayed to end users, whatever the context (page,
* views, etc), so give the templatessomething they can render.
*/
function auditioneer_preprocess_node(&$variables){
if($variables['type'] == "auditioneer_audition"){
$variables['audition_signup_form'] = auditioneer_signup_page($variables['nid'], $variables['elements']);
}
}
function _auditioneer_form_builder($form, &$form_state, $args){
_auditioneer_display_bits();
if(preg_match("/^audition_signup_\d+$/", $form_state['build_info']['form_id'])){
return(_auditioneer_signup_form($form, $form_state, $args));
} else if(preg_match("/^audition_mgmt_\d+$/", $form_state['build_info']['form_id'])){
return(_auditioneer_mgmt_form($form, $form_state, $args));
}
return($form);
}
function auditioneer_theme($existing, $type, $theme, $path){
$themes = array(
'auditioneer_components' => array(
'render element' => 'element'
),
);
return $themes;
}
/**
*/
function auditioneer_permission(){
return array(
'administer auditions' => array(
'title' => t('Administer Auditioneer'),
'description' => t('Adjust style settings for audition signups and administer auditions'),
),
'view and sign up for auditions' => array(
'title' => t('Sign up for Auditioneer auditions'),
'description' => t('Users with this permission can see pending auditions and sign up for them. If this permission is granted to anonymous users, name, email, and headshot/resumes will be automatically collected.'),
)
);
}
/*
* Workaround for nitwit hosting providers still on PHP 5.2 (?!!!)
*/
class AuditioneerDateTime extends DateTime
{
public function setTimestamp( $timestamp )
{
$date = getdate( ( int ) $timestamp );
$this->setDate( $date['year'] , $date['mon'] , $date['mday'] );
$this->setTime( $date['hours'] , $date['minutes'] , $date['seconds'] );
}
public function getTimestamp()
{
return $this->format( 'U' );
}
}