You are here

function shadowbox_get_types in Shadowbox 6.2

Same name and namespace in other branches
  1. 5.2 shadowbox.module \shadowbox_get_types()
  2. 5 shadowbox.module \shadowbox_get_types()
  3. 6 shadowbox.module \shadowbox_get_types()
  4. 6.3 shadowbox.module \shadowbox_get_types()

Helper function to get default values for supported media types.

Parameters

$input: The type of supported media options to return.

Return value

An array with default values for each type.

4 calls to shadowbox_get_types()
shadowbox_construct_header in ./shadowbox.module
Build the Shadowbox header by adding the necessary CSS and JS files.
shadowbox_get_settings in ./shadowbox.module
Construct the JS settings array.
shadowbox_global_settings in ./shadowbox.module
FAPI definition for the Shadowbox global settings form.
shadowbox_global_settings_validate in ./shadowbox.module
Validate admin settings form inputs.

File

./shadowbox.module, line 976
Shadowbox, a JavaScript media viewer application for displaying content in a modal dialogue.

Code

function shadowbox_get_types($type) {
  switch ($type) {
    case 'image':
      return array(
        'png',
        'jpg',
        'jpeg',
        'gif',
        'bmp',
      );
      break;
    case 'swf':
      return array(
        'swf',
      );
      break;
    case 'flv':
      return array(
        'flv',
        'mp4',
        'mov',
      );
      break;
    case 'quicktime':
      return array(
        'dv',
        'mov',
        'moov',
        'movie',
        'mp4',
      );
      break;
    case 'wmp':
      return array(
        'asf',
        'wm',
        'wmv',
      );
      break;
    case 'qtwmp':
      return array(
        'avi',
        'mpg',
        'mpeg',
      );
      break;
    case 'iframe':
      return array(
        'asp',
        'aspx',
        'cgi',
        'cfm',
        'htm',
        'html',
        'pdf',
        'pl',
        'php',
        'php3',
        'php4',
        'php5',
        'phtml',
        'rb',
        'rhtml',
        'shtml',
        'txt',
        'vbs',
      );
      break;
  }
}