diff --git a/video_embed_field.field.inc b/video_embed_field.field.inc index 3f2b1cc..81b92e3 100755 --- a/video_embed_field.field.inc +++ b/video_embed_field.field.inc @@ -153,7 +153,7 @@ function video_embed_field_field_presave($entity_type, $entity, $field, $instanc $items[$delta]['video_url'] = trim($item['video_url']); // Try to load thumbnail URL - $info = video_embed_field_thumbnail_url($item['video_url']); + $info = video_embed_field_thumbnail_url($item['video_url']); if (isset($info['url']) && $info['url']) { $thumb_url = $info['url']; $local_path = 'public://video_embed_field_thumbnails/' . $info['handler'] . '/' . $info['id'] . '.jpg'; @@ -264,7 +264,7 @@ function video_embed_field_field_formatter_settings_form($field, $instance, $vie if ($display['type'] == 'video_embed_field_thumbnail') { $link_types = array( - 'node' => t('Node'), + 'content' => t('Content'), 'source' => t('Video Source'), ); $element['image_link'] = array( @@ -392,9 +392,9 @@ function video_embed_field_field_formatter_view($entity_type, $entity, $field, $ $element[$delta]['#prefix'] = $link[0]; $element[$delta]['#suffix'] = $link[1]; } - elseif ($settings['image_link'] == 'node') { - $nid = $entity->nid; - $link = explode('|||', l('|||', 'node/' . $nid)); + else if($display['settings']['image_link'] == 'content'){ + $uri = entity_uri($entity_type, $entity); + $link = explode('|||', l('|||', $uri['path'])); $element[$delta]['#prefix'] = $link[0]; $element[$delta]['#suffix'] = $link[1]; }