You are here

function asset_bonus_swfobject_options in Asset 6

Same name in this branch
  1. 6 asset_bonus/asset_bonus.module \asset_bonus_swfobject_options()
  2. 6 contrib/asset_bonus/asset_bonus.module \asset_bonus_swfobject_options()
Same name and namespace in other branches
  1. 5 asset_bonus/asset_bonus.module \asset_bonus_swfobject_options()

File

contrib/asset_bonus/asset_bonus.module, line 194

Code

function asset_bonus_swfobject_options($asset) {
  require_once drupal_get_path('module', 'asset_bonus') . '/swfheader/swfheader.class.php';
  $swf = new swfheader();
  $swf
    ->getDimensions($asset->filepath);
  $form['width'] = array(
    '#type' => 'textfield',
    '#title' => t('Width'),
    '#description' => t('Width in pixels'),
    '#default_value' => !isset($_GET['width']) ? $swf->width : filter_xss($_GET['width']),
    '#size' => 5,
    '#required' => true,
  );
  $form['height'] = array(
    '#type' => 'textfield',
    '#title' => t('Height'),
    '#description' => t('Height in pixels'),
    '#default_value' => !isset($_GET['height']) ? $swf->height : filter_xss($_GET['height']),
    '#size' => 5,
    '#required' => true,
  );
  $form['version'] = array(
    '#type' => 'textfield',
    '#title' => t('Minimum Version'),
    '#default_value' => $swf->version,
    '#size' => 5,
    '#required' => true,
  );
  $form['bgcolor'] = array(
    '#type' => 'textfield',
    '#title' => t('Background Color'),
    '#description' => t('Hex formatted background color like #FFFFFF. Make sure to include the #.'),
    '#default_value' => '#FFFFFF',
    '#size' => 7,
    '#required' => true,
  );
  return $form;
}