You are here

function swftools_update_6005 in SWF Tools 6.3

Adds the additional flowplayer3 settings to the controls array.

File

./swftools.install, line 298
Install, update and uninstall functions for the SWF Tools module.

Code

function swftools_update_6005() {

  // Initialise a results array
  $ret = array();

  // Get current values
  $defaults = variable_get('swftools_flowplayer3_mediaplayer', 0);

  // If there are some values then update with new setting
  if ($defaults) {

    // Add new setting
    $defaults['controls'] += array(
      'borderRadius' => '',
      'volumeSliderGradient' => 'none',
      'scrubberHeightRatio' => 0.4,
      'scrubberBarHeightRatio' => 1,
      'volumeSliderHeightRatio' => 0.4,
      'volumeBarHeightRatio' => 1,
      'timeBgHeightRatio' => 0.7,
      'hideDelay' => 4000,
    );
    $defaults['play'] = array(
      'url' => '',
      'opacity' => '',
      'label' => 'Play',
      'replayLabel' => 'Play again',
      'fadeSpeed' => '',
      'rotateSpeed' => '',
      'height' => '',
      'width' => '',
    );

    // Store new defaults
    variable_set('swftools_flowplayer3_mediaplayer', $defaults);

    // Set return message
    $ret = array(
      array(
        'success' => TRUE,
        'query' => 'FlowPlayer3 settings updated.',
      ),
    );
  }

  // Return results
  return $ret;
}