Jump to:
| Project: | Views Bonus Pack |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I'm trying to generate an XML feed to bring Drupal-managed images into Flash. I'm running into a strange issue, however.
It seems that somewhere in its internal mechanism the feed generation code is assuming that images are actually audio files. What I want to be able to do is easily assigned attributes for filename, width, and height, but when I dump out the contents of node_data_field_image_cache_field_image_cache_data, it contains attributes like audio_bitrate_mode, audio_channel_mode, and so on, as though an assumption has been made somewhere that it's meant to be used for a podcast.
Also, it does contain parameters for width and height, but they seem to be the attributes for the original image, not the imagecache profile version that I've selected for output in the feed.
Any suggestions on how to fix this would be greatly appreciated.
Comments
#1
You can try using some code from
theme_imagecache()<?php// $path is the path to your original image.
// $presetname is the imagecache preset.
if ($image = image_get_info(imagecache_create_path($presetname, $path))) {
$attributes['width'] = $image['width'];
$attributes['height'] = $image['height'];
}
?>
This will only work if the derivative already exists, so the first time you hit the image you won't get it's width and height, but from then on you should.
#2
The Views Bonus Export code just displays what ever the views theme system gives it so my guess this is some other modules interacting strangely. Do you have any custom modules? What other modules might be interacting here? Can you upload an export of the view?
#3