aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeshan Wanigasooriya <heshanmw@gmail.com>2011-01-09 15:18:57 +0000
committerHeshan Wanigasooriya <heshanmw@gmail.com>2011-01-09 15:18:57 +0000
commitac967cb60f30724dcc908679322271645b8ccfe6 (patch)
treeb19ed383caa925ac9131b4e90d092ac050f300d6
parent0e1abe9e84fc2b2c72af1f5f740ea378e6881f8f (diff)
downloadvideo-ac967cb60f30724dcc908679322271645b8ccfe6.tar.gz
video-ac967cb60f30724dcc908679322271645b8ccfe6.tar.bz2
Adding imagecache formatter.
-rw-r--r--video.field.inc18
1 files 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;