function kaltura_get_field_thumbs in Kaltura 5
Same name and namespace in other branches
- 6.2 plugins/field_kaltura/field_kaltura.module \kaltura_get_field_thumbs()
- 6 plugins/field_kaltura/field_kaltura.module \kaltura_get_field_thumbs()
- 7.3 plugins/field_kaltura/field_kaltura.module \kaltura_get_field_thumbs()
- 7.2 plugins/field_kaltura/field_kaltura.module \kaltura_get_field_thumbs()
2 calls to kaltura_get_field_thumbs()
- field_kaltura_remix_textfield_process in plugins/
field_kaltura/ field_kaltura.module - Process an individual element.
- field_kaltura_textfield_process in plugins/
field_kaltura/ field_kaltura.module - Process an individual element.
File
- plugins/
field_kaltura/ field_kaltura.module, line 503 - kaltura integration module - functions to provide kaltura as CCK field
Code
function kaltura_get_field_thumbs($field_value, $field_name, $type, $required) {
global $_kaltura_thumbnail_base_url;
$thumbs = array();
$entries = explode(',', $field_value);
foreach ($entries as $entry) {
if ($entry) {
$thumbs[] = '<div class="kaltura_field_thumb"><img src="' . $_kaltura_thumbnail_base_url . '/entry_id/' . $entry . '" /><br />' . '<input type="button" title="remove item" onclick="remove_item_from_field(\'' . $field_name . '\', \'' . $entry . '\', \'' . $_kaltura_thumbnail_base_url . '\');" class="remove_media" /></div>';
}
}
$span_required = $required ? '<span class="form-required" title="This field is required.">*</span>' : '';
return '<div class="title">Added ' . $type . ': ' . $span_required . '</div>' . implode('', $thumbs) . '<div class="clear-block"></div>';
}