function flickrfield_field_formatter_info in Flickr 6
Same name and namespace in other branches
- 5 field/flickrfield.module \flickrfield_field_formatter_info()
- 7 field/flickrfield.module \flickrfield_field_formatter_info()
Implements hook_field_formatter_info().
File
- field/
flickrfield.module, line 230 - Defines a Flickr field type.
Code
function flickrfield_field_formatter_info() {
require_once drupal_get_path('module', 'flickr') . '/flickr.inc';
$sizes = flickr_photo_sizes();
// Formatters for general Flickr CCK field.
foreach ($sizes as $size => $info) {
$formatters[$size] = array(
'label' => $info['label'],
'field types' => array(
'flickrfield',
),
);
}
// Formatters for Flickr photoset CCK field.
foreach ($sizes as $size => $info) {
$formatters['photoset_primaryphoto_size' . $size . '_nolink'] = array(
'label' => t('Primary set photo at size "@size"', array(
'@size' => $info['label'],
)),
'field types' => array(
'flickrfield_photoset',
),
);
$formatters['photoset_primaryphoto_size' . $size . '_linknode'] = array(
'label' => t('Primary set photo at size "@size" with link to node', array(
'@size' => $info['label'],
)),
'field types' => array(
'flickrfield_photoset',
),
);
$formatters['photoset_primaryphoto_size' . $size . '_linkflickrcomset'] = array(
'label' => t('Primary set photo at size "@size" with link to set on Flickr.com', array(
'@size' => $info['label'],
)),
'field types' => array(
'flickrfield_photoset',
),
);
}
$formatters['photoset_flickrcomslideshow'] = array(
'label' => 'Embedded Flickr.com slideshow (Flash)',
'field types' => array(
'flickrfield_photoset',
),
);
$formatters['photoset_flickrcomslideshow_simple'] = array(
'label' => 'Embedded Flickr.com slideshow (non Flash)',
'field types' => array(
'flickrfield_photoset',
),
);
$formatters['photoset_flickrcomsetlink'] = array(
'label' => 'Link to photo set on Flickr.com',
'field types' => array(
'flickrfield_photoset',
),
);
return $formatters;
}