function video_cck_vimeo_settings in Embedded Media Field 5
hook video_cck_PROVIDER_settings this should return a subform to be added to the video_cck_settings() admin settings page. note that a form field will already be provided, at $form['PROVIDER'] (such as $form['vimeo']) so if you want specific provider settings within that field, you can add the elements to that form field.
File
- contrib/
video_cck/ providers/ vimeo.inc, line 40
Code
function video_cck_vimeo_settings() {
$form['vimeo']['color'] = array(
'#type' => 'fieldset',
'#title' => t('Embedded video player color'),
'#description' => t('If allowed, this color, in hexidecimal form (#RRGGBB), will be used to change the skin of the Vimeo player.'),
'#collapsible' => true,
'#collapsed' => true,
);
$form['vimeo']['color']['video_cck_vimeo_color_override'] = array(
'#type' => 'checkbox',
'#title' => t('Override player color'),
'#default_value' => variable_get('video_cck_vimeo_color_override', FALSE),
);
$form['vimeo']['color']['video_cck_vimeo_color'] = array(
'#type' => 'textfield',
'#title' => t('Color'),
'#default_value' => variable_get('video_cck_vimeo_color', VIDEO_CCK_VIMEO_COLOR_DEFAULT),
);
$form['vimeo']['player_options'] = array(
'#type' => 'fieldset',
'#title' => t('Embedded video player options'),
'#collapsible' => true,
'#collapsed' => true,
);
$form['vimeo']['player_options']['video_cck_vimeo_on_screen_info'] = array(
'#type' => 'checkboxes',
'#title' => t('On-screen info'),
'#default_value' => variable_get('video_cck_vimeo_on_screen_info', array(
'portrait',
'title',
'byline',
)),
'#options' => array(
'portrait' => t('Show video author\'s portrait'),
'title' => t('Show video title'),
'byline' => t('Show byline'),
),
'#description' => t('Provide additional video information on the Vimeo player.'),
);
$form['vimeo']['player_options']['video_cck_vimeo_full_screen'] = array(
'#type' => 'checkbox',
'#title' => t('Allow fullscreen'),
'#default_value' => variable_get('video_cck_vimeo_full_screen', 1),
'#description' => t('Allow users to view video using the entire computer screen.'),
);
$form['vimeo']['video_cck_vimeo_api_key'] = array(
'#type' => 'textfield',
'#title' => t('Vimeo API Key'),
'#default_value' => variable_get('video_cck_vimeo_api_key', ''),
);
$form['vimeo']['video_cck_vimeo_api_secret'] = array(
'#type' => 'textfield',
'#title' => t('Vimeo API Shared Secret'),
'#default_value' => variable_get('video_cck_vimeo_api_secret', ''),
);
$form['vimeo']['video_cck_vimeo_thumb_size'] = array(
'#type' => 'select',
'#title' => t('Vimeo Thumbnail Size'),
'#options' => array(
'96' => '96',
'100' => '100',
'160' => '160',
'200' => '200',
'460' => '460',
),
'#default_value' => variable_get('video_cck_vimeo_thumb_size', '160'),
);
return $form;
}