You are here

function _imagerotator_settings in SWF Tools 6.2

Same name and namespace in other branches
  1. 6 imagerotator/imagerotator.module \_imagerotator_settings()

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

2 calls to _imagerotator_settings()
imagerotator_admin_form in imagerotator/imagerotator.admin.inc
_imagerotator_flashvars in imagerotator/imagerotator.module
This function is called from imagerotator_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…

File

imagerotator/imagerotator.module, line 66

Code

function _imagerotator_settings($player) {
  $opts = _imagerotator_options();
  switch ($player) {
    case WIJERING_IMAGEROTATOR:

      // Define the settings list.
      $defaults['boolean'] = array(
        'shuffle' => 'default',
        'shownavigation' => 'default',
        'linkfromdisplay' => 'default',
        'showicons' => 'default',
        'enablejs' => 'default',
      );
      $defaults['color'] = array(
        'backcolor' => '',
        'frontcolor' => '',
        'lightcolor' => '',
      );
      $defaults['url'] = array(
        'logo' => '',
        'link' => '',
      );
      $defaults['integer'] = array(
        'width' => '400',
        'height' => '320',
        'rotatetime' => '3',
      );
      $defaults['other'] = array(
        'transition' => 'default',
        'linktarget' => 'default',
        'overstretch' => 'default',
      );
      $saved_settings = variable_get('swftools_' . WIJERING_IMAGEROTATOR, 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;
}