function scald_flash_scald_fetch in Scald: Media Management made easy 7
Implements hook_scald_fetch.
File
- modules/
providers/ scald_flash/ scald_flash.module, line 66 - Defines a flash provider for Scald.
Code
function scald_flash_scald_fetch($atom, $type) {
// Get the flash thumbnail.
$file = file_load($atom->base_id);
$atom->base_entity = $file;
$atom->file_source = $file->uri;
if ($items = field_get_items('scald_atom', $atom, 'scald_thumbnail')) {
$atom->thumbnail_source = $items[0]['uri'];
}
else {
$atom->thumbnail_source = drupal_get_path('module', 'scald_flash') . '/icons/flash.png';
}
}