function _eminline_url_settings in Embedded Media Field 5
Same name and namespace in other branches
- 6.3 contrib/eminline/eminline.module \_eminline_url_settings()
- 6 contrib/eminline/eminline.module \_eminline_url_settings()
- 6.2 contrib/eminline/eminline.module \_eminline_url_settings()
Settings form for filter.
Parameters
int format: The format id.
Return value
array
1 call to _eminline_url_settings()
- eminline_filter in contrib/
eminline/ eminline.module - Implemenation of hook_filter().
File
- contrib/
eminline/ eminline.module, line 158
Code
function _eminline_url_settings($format) {
// Get the settings that are avaliable to the cck widget.
$form['eminline_' . $format] = video_cck_widget_settings('form', array(
'type' => 'video_cck_textfields',
));
$form['eminline_' . $format]['provider_list']['providers']['#default_value'] = variable_get('eminline_providers_' . $format, array());
$video_default = variable_get('eminline_video_' . $format, array());
foreach ($video_default as $key => $value) {
$form['eminline_' . $format]['video'][$key]['#default_value'] = $value;
}
$preview_default = variable_get('eminline_preview_' . $format, array());
foreach ($preview_default as $key => $value) {
$form['eminline_' . $format]['preview'][$key]['#default_value'] = $value;
}
$tn_default = variable_get('eminline_tn_' . $format, array());
foreach ($tn_default as $key => $value) {
$form['eminline_' . $format]['tn'][$key]['#default_value'] = $value;
}
// Add select for choosing display format.
$form['eminline_' . $format]['node_display'] = array(
'#type' => 'select',
'#title' => t('Video display in node view'),
'#default_value' => variable_get('eminline_full_node_' . $format, ''),
'#options' => array(
'video_video' => t('Video'),
'video_preview' => t('Preview'),
'video_thumbnail' => t('Thumbnail'),
),
'#weight' => -999,
);
$form['eminline_' . $format]['#type'] = 'fieldset';
$form['eminline_' . $format]['#title'] = t('Embed inline');
$form['eminline_' . $format]['#collapsible'] = TRUE;
$form['eminline_' . $format]['#tree'] = TRUE;
// My submit && validator plz, kthxbi.
$form['#validate'] = array(
'_eminline_url_settings_form_validate' => array(
$format,
),
);
$form['#submit'] = array(
'_eminline_url_settings_form_submit' => array(
$format,
),
);
return $form;
}