You are here

function _wijering_settings in SWF Tools 6

Same name and namespace in other branches
  1. 5 wijering/wijering.module \_wijering_settings()
  2. 6.2 wijering/wijering.module \_wijering_settings()

These are the default settings as they are stored in the database and displayed on the settings page.

2 calls to _wijering_settings()
wijering_admin_form in wijering/wijering.admin.inc
_wijering_flashvars in wijering/wijering.module
This function is called from wijering_swftools_flashvars() which is called from swf() It will return the default flashvar configuration, just prior to any overrides passed into swf(). We start with the settings defined on admin/swf/wijering which are…

File

wijering/wijering.module, line 70

Code

function _wijering_settings($player) {
  $opts = _wijering_options();
  switch ($player) {
    case WIJERING_MEDIAPLAYER:

      // Define the settings list.
      $defaults['boolean'] = array(
        'largecontrols' => 'default',
        'shuffle' => 'default',
        'linkfromdisplay' => 'default',
        'usecaptions' => 'default',
        'usefullscreen' => 'default',
        'usekeys' => 'default',
        'autoscroll' => 'default',
        'showdigits' => 'default',
        'showeq' => 'default',
        'showicons' => 'default',
        'thumbsinplaylist' => 'default',
        'autostart' => 'default',
        'enablejs' => 'default',
      );
      $defaults['color'] = array(
        'backcolor' => '',
        'frontcolor' => '',
        'lightcolor' => '',
      );
      $defaults['url'] = array(
        'logo' => '',
        'callback' => '',
        'captions' => '',
        'fsbuttonlink' => '',
        'link' => '',
        'streamscript' => '',
      );
      $defaults['integer'] = array(
        'width' => '400',
        'height' => '320',
        'displayheight' => '',
        'displaywidth' => '',
        // default is blank, otherwise overrides 'displayheight'
        'bufferlength' => '',
        'rotatetime' => '',
        'volume' => '',
      );
      $defaults['other'] = array(
        'type' => '',
        // Defaults to the filename extension.
        'repeat' => 'default',
        // This false is part of {true,false,list}
        'linktarget' => 'default',
        'overstretch' => 'default',
      );
      $saved_settings = variable_get('swftools_' . WIJERING_MEDIAPLAYER, array());
      break;
  }

  // Overwrite initialised variables with those that might be already saved.
  foreach ($defaults as $category => $vars) {
    foreach ($vars as $key => $setting) {
      if (isset($saved_settings[$key])) {
        $defaults[$category][$key] = $saved_settings[$key];
      }
    }
  }
  return $defaults;
}