From ac967cb60f30724dcc908679322271645b8ccfe6 Mon Sep 17 00:00:00 2001 From: Heshan Wanigasooriya Date: Sun, 9 Jan 2011 15:18:57 +0000 Subject: Adding imagecache formatter. --- video.field.inc | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/video.field.inc b/video.field.inc index 9d9eeda..1a00484 100644 --- a/video.field.inc +++ b/video.field.inc @@ -440,16 +440,14 @@ function video_field_formatter_info() { // ), ); //setup our imagecache presets - if (module_exists('imagecache')) { - //we need formatters for each of our thumbnails. - $thumb_types = array('video_nodelink'); //array('video_colorbox', 'video_nodelink'); - foreach ($thumb_types as $types) { - foreach (imagecache_presets () as $preset) { - $formatters[$preset['presetname'] . '__' . $types] = array( - 'label' => t('[Video] @preset @label', array('@preset' => $preset['presetname'], '@label' => $formatters[$types]['label'])), - 'field types' => array('video'), - ); - } + //we need formatters for each of our thumbnails. + $thumb_types = array('video_nodelink'); //array('video_colorbox', 'video_nodelink'); + foreach ($thumb_types as $types) { + foreach (image_styles () as $preset) { + $formatters[$preset['name'] . '__' . $types] = array( + 'label' => t('[Video] @preset @label', array('@preset' => $preset['name'], '@label' => $formatters[$types]['label'])), + 'field types' => array('video'), + ); } } return $formatters; -- cgit v1.2.3