You are here

function scald_gallery_scald_player_settings_form in Scald: Gallery 7

Implements hook_scald_player_settings_form().

File

./scald_gallery.module, line 64
Scald Gallery is a Scald Atom Provider for image galleries.

Code

function scald_gallery_scald_player_settings_form($form, &$form_state) {
  $form['theme'] = array(
    '#type' => 'textfield',
    '#title' => t('Galleria theme'),
    '#description' => t('Theme that should be used for Galleria display. Defaults to "classic".'),
    '#size' => 40,
    '#default_value' => $form['#scald']['player_settings']['theme'],
  );
  $form['width'] = array(
    '#type' => 'textfield',
    '#title' => t('Galleria width'),
    '#description' => t('Width of Galleria in px.'),
    '#size' => 40,
    '#default_value' => $form['#scald']['player_settings']['width'],
  );
  $form['height'] = array(
    '#type' => 'textfield',
    '#title' => t('Galleria height'),
    '#description' => t('Height of Galleria in px.'),
    '#size' => 40,
    '#default_value' => $form['#scald']['player_settings']['height'],
  );
  $styles = image_styles();
  $image_styles = array(
    'original' => t('Original image'),
  );
  foreach ($styles as $key => $style) {
    $image_styles[$key] = $style['name'];
  }
  $form['thumb_style'] = array(
    '#type' => 'select',
    '#title' => t('Thumbnail style'),
    '#description' => t('Select image style that should be used for thumbnails.'),
    '#options' => $image_styles,
    '#default_value' => $form['#scald']['player_settings']['thumb_style'],
  );
  $form['normal_style'] = array(
    '#type' => 'select',
    '#title' => t('Normal style'),
    '#description' => t('Select image style that should be used for standard images (big images in Galleria).'),
    '#options' => $image_styles,
    '#default_value' => $form['#scald']['player_settings']['normal_style'],
  );
  $form['big_style'] = array(
    '#type' => 'select',
    '#title' => t('Big style'),
    '#description' => t('Select image style that should be used for fullscreen images.'),
    '#options' => $image_styles,
    '#default_value' => $form['#scald']['player_settings']['big_style'],
  );
  return $form;
}