You are here

function shadowbox_get_types in Shadowbox 5

Same name and namespace in other branches
  1. 5.2 shadowbox.module \shadowbox_get_types()
  2. 6 shadowbox.module \shadowbox_get_types()
  3. 6.2 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.

2 calls to shadowbox_get_types()
shadowbox_admin_settings in ./shadowbox.module
FAPI definition for the Shadowbox admin settings form.
shadowbox_get_settings in ./shadowbox.module
Construct the JS settings array.

File

./shadowbox.module, line 767
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 '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;
  }
}