You are here

function _eminline_url_settings in Embedded Media Field 6

Same name and namespace in other branches
  1. 5 contrib/eminline/eminline.module \_eminline_url_settings()
  2. 6.3 contrib/eminline/eminline.module \_eminline_url_settings()
  3. 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 159

Code

function _eminline_url_settings($format) {
  $form['format'] = array(
    '#type' => 'value',
    '#value' => $format,
  );

  // Get the settings that are avaliable to the cck widget.
  $form['eminline_' . $format] = emvideo_widget_settings('form', array(
    'type' => 'emvideo_textfields',
  ));
  $form['eminline_' . $format]['provider_list']['providers']['#default_value'] = variable_get('eminline_providers_' . $format, array_keys($form['eminline_' . $format]['provider_list']['providers']['#options']));
  $video_default = variable_get('eminline_video_' . $format, _eminline_default_filter_settings('video'));
  foreach ($video_default as $key => $value) {
    $form['eminline_' . $format]['video'][$key]['#default_value'] = $value;
  }
  $preview_default = variable_get('eminline_preview_' . $format, _eminline_default_filter_settings('preview'));
  foreach ($preview_default as $key => $value) {
    $form['eminline_' . $format]['preview'][$key]['#default_value'] = $value;
  }
  $tn_default = variable_get('eminline_tn_' . $format, _eminline_default_filter_settings('tn'));
  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, 'video_video'),
    '#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;
  return $form;
}