You are here

function shadowbox_get_types in Shadowbox 6

Same name and namespace in other branches
  1. 5.2 shadowbox.module \shadowbox_get_types()
  2. 5 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_header in ./shadowbox.module
Build the Shadowbox header by adding the necessary CSS and JS files.

File

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

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',
        'pl',
        'php',
        'php3',
        'php4',
        'php5',
        'phtml',
        'rb',
        'rhtml',
        'shtml',
        'txt',
        'vbs',
      );
      break;
    default:
      return FALSE;
      break;
  }
}