function brightcove_cck_field_formatter_info in Brightcove Video Connect 6
Same name and namespace in other branches
- 6.2 brightcove_cck/brightcove_cck.module \brightcove_cck_field_formatter_info()
Implementation of hook_formatter_info().
File
- brightcove_cck/
brightcove_cck.module, line 251 - Brightcove CCK module provides a Content Construction Kit module to developers, allowing them to browse videos in their Brightcove Studio and upload them.
Code
function brightcove_cck_field_formatter_info() {
$formatters = array(
'default' => array(
'label' => t('Standard video player'),
'field types' => array(
'brightcove_video',
),
'multiple values' => CONTENT_HANDLE_CORE,
),
);
$formatters['node_link_videoStillURL'] = array(
'label' => t('Default still image linked to node'),
'field types' => array(
'brightcove_video',
),
'multiple values' => CONTENT_HANDLE_CORE,
);
$formatters['node_link_thumbnailURL'] = array(
'label' => t('Default thumbnail linked to node'),
'field types' => array(
'brightcove_video',
),
'multiple values' => CONTENT_HANDLE_CORE,
);
$formatters['node_image_videoStillURL'] = array(
'label' => t('Default still image'),
'field types' => array(
'brightcove_video',
),
'multiple values' => CONTENT_HANDLE_CORE,
);
$formatters['node_image_thumbnailURL'] = array(
'label' => t('Default thumbnail'),
'field types' => array(
'brightcove_video',
),
'multiple values' => CONTENT_HANDLE_CORE,
);
if (module_exists('lightbox2')) {
$formatters['lightbox2_player_videoStillURL'] = array(
'label' => t('Default still image -> Lightbox2 player'),
'field types' => array(
'brightcove_video',
),
'multiple values' => CONTENT_HANDLE_CORE,
);
$formatters['lightbox2_player_thumbnailURL'] = array(
'label' => t('Default thumbnail -> Lightbox2 player'),
'field types' => array(
'brightcove_video',
),
'multiple values' => CONTENT_HANDLE_CORE,
);
}
if (module_exists('imagecache')) {
$presets = imagecache_presets();
foreach ($presets as $preset_id => $preset) {
if (module_exists('lightbox2')) {
$formatters['lightbox2_imagecache_' . $preset['presetname'] . '__thumbnailURL'] = array(
'label' => t('Imagecache @preset thumbnail -> Lightbox2 player', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'brightcove_video',
),
'multiple values' => CONTENT_HANDLE_CORE,
);
$formatters['lightbox2_imagecache_' . $preset['presetname'] . '__videoStillURL'] = array(
'label' => t('Imagecache @preset still image -> Lightbox2 player', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'brightcove_video',
),
'multiple values' => CONTENT_HANDLE_CORE,
);
}
$formatters['node_link_imagecache_' . $preset['presetname'] . '__videoStillURL'] = array(
'label' => t('Imagecache @preset still image linked to node', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'brightcove_video',
),
'multiple values' => CONTENT_HANDLE_CORE,
);
$formatters['node_link_imagecache_' . $preset['presetname'] . '__thumbnailURL'] = array(
'label' => t('Imagecache @preset thumbnail linked to node', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'brightcove_video',
),
'multiple values' => CONTENT_HANDLE_CORE,
);
$formatters['node_image_imagecache_' . $preset['presetname'] . '__videoStillURL'] = array(
'label' => t('Imagecache @preset still image', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'brightcove_video',
),
'multiple values' => CONTENT_HANDLE_CORE,
);
$formatters['node_image_imagecache_' . $preset['presetname'] . '__thumbnailURL'] = array(
'label' => t('Imagecache @preset thumbnail', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'brightcove_video',
),
'multiple values' => CONTENT_HANDLE_CORE,
);
}
}
return $formatters;
}