function video_image_admin_settings in Video 5
Same name and namespace in other branches
- 6 plugins/video_image/video_image.module \video_image_admin_settings()
- 6.2 plugins/video_image/video_image.module \video_image_admin_settings()
Settings form
1 string reference to 'video_image_admin_settings'
- video_image_menu in plugins/
video_image/ video_image.module - Implementation of hook_menu()
File
- plugins/
video_image/ video_image.module, line 54 - Enable image support for video module.
Code
function video_image_admin_settings() {
if (module_exists('video_upload') && variable_get('video_image_auto_thumbnail', 0)) {
$upload_weight = db_result(db_query("SELECT weight FROM {system} WHERE name='video_upload'"));
db_query("UPDATE {system} SET weight=" . ($upload_weight + 1) . " WHERE name='video_image'");
}
$form = array();
$form['video_image_publish_thumbnail'] = array(
'#type' => 'checkbox',
'#title' => t('Publish the video thumbnails'),
'#description' => t('Checking this value will cause the video thumbnail image nodes to be published and therefore could show up in blocks. Usually, this is not what you want because then you could end up with both the thumbnail node and the video node showing up and since there is no way to link the image node to the video node, this is not desirable. However, with this unchecked, the administrator will end up with a lot of unpublished nodes.'),
'#default_value' => _video_image_publish_thumbnails(),
);
$form['video_image_promote_thumbnail'] = array(
'#type' => 'checkbox',
'#title' => t('Promote the thumbnails to the front page'),
'#default_value' => _video_image_promote_thumbnails(),
);
$form['autothumb'] = array(
'#type' => 'fieldset',
'#title' => t('Automatic video thumbnailing'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#description' => t('This feature requires the \'video_ffmpeg_helper\' module'),
);
$auto_thumb_disable = !module_exists('video_ffmpeg_helper');
$form['autothumb']['video_image_auto_thumbnail'] = array(
'#type' => 'checkbox',
'#title' => t('Auto thumbnail for videos'),
'#description' => t('If set up correctly, this will auto-generate a thumbnail for each video created.'),
'#default_value' => variable_get('video_image_auto_thumbnail', false) && !$auto_thumb_disable,
'#disabled' => $auto_thumb_disable,
);
/*
$form['autothumb']['video_image_auto_thumbnail_only'] = array(
'#type' => 'checkbox',
'#title' => t('Use auto-thumbnailer exclusively for video images'),
'#description' => t('If checked, this will disable the file upload box for the user-supplied thumbnail. Only check this if you have checked to be sure that auto-thumbnailing works. Auto thumbnail must be selected for this to be enabled.'),
'#default_value' => variable_get('video_image_auto_thumbnail_only', false),
'#disabled' => !variable_get('video_image_auto_thumbnail', false),
);
*/
$form['autothumb']['video_image_auto_thumbnail_debug'] = array(
'#type' => 'checkbox',
'#title' => t('Debug automatic thumbnail process'),
'#default_value' => variable_get('video_image_auto_thumbnail_debug', false),
'#description' => t('Automatic thumbnailing of videos is dependent on the actual video types. Some video types may not be able to be automatically thumbnailed. Setting this option will allow messages to be show when posting and editing of videos that can be automatically thumbnailed.'),
'#disabled' => $auto_thumb_disable,
);
return system_settings_form($form);
}