aboutsummaryrefslogtreecommitdiff
path: root/includes/video_helper.inc
diff options
context:
space:
mode:
authorHeshan <heshan@heidisoft.com>2011-03-14 20:58:44 +0530
committerHeshan <heshan@heidisoft.com>2011-03-14 20:58:44 +0530
commit14c097ff41e0410784aa1fdae7b4312ec70ff5e0 (patch)
tree6a7f7ab3c6abe600ad320dbbfc7cf3c49ec95570 /includes/video_helper.inc
parent0d300315ee1144b50bdf666f364cd02dceb2e5cf (diff)
downloadvideo-14c097ff41e0410784aa1fdae7b4312ec70ff5e0.tar.gz
video-14c097ff41e0410784aa1fdae7b4312ec70ff5e0.tar.bz2
Move common codes from the insert and update, and formate the helper thumbnails
Diffstat (limited to 'includes/video_helper.inc')
-rw-r--r--includes/video_helper.inc16
1 files changed, 7 insertions, 9 deletions
diff --git a/includes/video_helper.inc b/includes/video_helper.inc
index e47830c..cd743c7 100644
--- a/includes/video_helper.inc
+++ b/includes/video_helper.inc
@@ -89,21 +89,19 @@ class video_helper {
$thumbnail->filepath = '';
$thumbnail->url = '';
//@todo future enhancements for our thumbnails
- $thumbnail->alt = '';
- $thumbnail->title = '';
- $thumbnail->description = '';
-
+ $thumbnail->alt = $variables['entity']->title;
+ $thumbnail->title = $variables['entity']->title;
+// $thumbnail->description = '';
// Setup our thumbnail path.
- $default_thumbnail = file_load($field_settings['default_video_thumbnail']);
- $use_default_img = isset($variables['item']['use_default_video_thumb']) ?
- $variables['item']['use_default_video_thumb'] : FALSE;
+ $use_default_img = isset($variables['item']['use_default_video_thumb']) ? TRUE : FALSE;
if ($use_default_img && !empty($field_settings['default_video_thumbnail'])) {
+ $default_thumbnail = file_load($field_settings['default_video_thumbnail']['fid']);
// Check the checkbox to use default thumbnail on node
$thumbnail->filepath = $default_thumbnail->uri;
- } elseif (isset($variables['item']['video_thumb']) ? $variables['item']['video_thumb'] : FALSE) {
+ } elseif (isset($variables['item']['thumbanail']) ? TRUE : FALSE) {
// actual video thumbnails is present
- $thumbnail_load = file_load($variables['item']['video_thumb']);
+ $thumbnail_load = file_load($variables['item']['thumbanail']);
$thumbnail->filepath = $thumbnail_load->uri;
} else {
//need some type of default if nothing is present