You are here

function video_general_admin_settings in Video 7.2

Same name and namespace in other branches
  1. 6.5 video.admin.inc \video_general_admin_settings()
  2. 6.4 video.admin.inc \video_general_admin_settings()
  3. 7 modules/video_ui/video.admin.inc \video_general_admin_settings()

Video general admin settings

1 string reference to 'video_general_admin_settings'
video_ui_menu in modules/video_ui/video_ui.module
Implements hook_menu().

File

modules/video_ui/video.admin.inc, line 173
Provides the administration settings for the Video Drupal module.

Code

function video_general_admin_settings() {
  $hastranscoder = variable_get('video_convertor') !== '';
  $form = array();
  $form['video_autoplay'] = array(
    '#type' => 'checkbox',
    '#title' => t('Automatically start video on page load'),
    '#default_value' => variable_get('video_autoplay', FALSE),
    '#description' => t('Start the video when the page and video loads'),
  );
  $form['video_autobuffering'] = array(
    '#type' => 'checkbox',
    '#title' => t('Automatically start video buffering'),
    '#default_value' => variable_get('video_autobuffering', TRUE),
    '#description' => t('Start buffering video when the page and video loads'),
  );
  $form['video_bypass_conversion'] = array(
    '#type' => 'checkbox',
    '#title' => t('Bypass video conversion'),
    '#default_value' => variable_get('video_bypass_conversion', FALSE),
    '#description' => t('Bypass video conversion when creating videos.'),
    '#access' => $hastranscoder,
  );
  $form['video_convert_on_save'] = array(
    '#type' => 'checkbox',
    '#title' => t('Video convert on node submit'),
    '#default_value' => variable_get('video_convert_on_save', FALSE),
    '#description' => t('Convert videos on node submit will enable by default for all users.'),
    '#access' => $hastranscoder,
  );
  $form['video_use_default_thumb'] = array(
    '#type' => 'checkbox',
    '#title' => t('Override video thumbnails with default thumbnail'),
    '#default_value' => variable_get('video_use_default_thumb', FALSE),
    '#description' => t('Override auto thumbnails with default thumbnail.'),
    '#access' => $hastranscoder,
  );
  $form['video_publish_on_complete'] = array(
    '#type' => 'checkbox',
    '#title' => t('Publish when conversion complete'),
    '#default_value' => variable_get('video_publish_on_complete', FALSE),
    '#description' => t('This feature is now fully controlled by !rules module. Download the module and configure rules to take effect when video conversions have completed or failed.', array(
      '!rules' => l(t('Rules'), 'http://drupal.org/project/rules'),
    )),
    '#disabled' => TRUE,
    '#access' => $hastranscoder,
  );
  $form['video_dimensions'] = array(
    '#type' => 'textarea',
    '#title' => t('Available dimensions for converting and displaying videos'),
    '#description' => t('Enter one dimension per line. Each resolution must be in the form of <code>width</code>x<code>height</code>. Example dimensions: <code>1280x720</code>.'),
    '#default_value' => variable_get('video_dimensions', video_utility::getDefaultDimensions()),
    '#required' => TRUE,
    '#wysiwyg' => FALSE,
  );
  return system_settings_form($form);
}