Imagecache is NOT supported

Superchicken - June 30, 2009 - 18:15
Project:Dynamic display block
Version:6.x-1.0-rc6
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hi,

I have:

FileField 6.x-3.0
ImageCache 6.x-2.0-beta9
Dynamic display block 6.x-1.0-rc6

I can create a ddblock, but I cannot use the imagecache pics. Even if I select "use imagecache presets" the module pulls out the original images, and not the presets.

For the time being I am using:

<?php
// use imagecache (imagecache, preset_name, file_path, alt, title, array of attributes)
if (module_exists('imagecache') && is_array(imagecache_presets()) && $vars['imgcache_slide'] <> '<none>'){
 
$slider_items[$key1]['slide_image'] =
   
'<img src="' . base_path() .
   
str_replace('sites/default/files/','sites/default/files/imagecache/'. $vars['imgcache_slide'] . '/',$filepath) .
   
'" alt="' . $result->node_title . '"/>';
} else {
 
$slider_items[$key1]['slide_image'] = '<img src="' . base_path() . $filepath . '" alt="' . $result->node_title . '"/>';
}
?>

It works, but I would appreciate any suggestion on how to make something better than that.

Thank you for the awesome module!

#1

ppblaauw - July 1, 2009 - 03:11
Status:active» postponed (maintainer needs more info)

When you use the imagecache presets the image cache files are used. (If you check the path the image is coming from, you would see it comes from image cache).

The problem you have maybe is that the default CSS of the module shows the image in a particular size to fit the slideshow. For other image sizes you can adjust the image width and height or if you want to let the presets set the image size, delete the image width and height from the CSS file.

For example:

change:

div.ddblock-cycle-upright10 div.slide-inner img{height:303px;margin:0 !important;padding:0 !important;width:478px;}

to

div.ddblock-cycle-upright10 div.slide-inner img{margin:0 !important;padding:0 !important;}

Or only delete only the height setting and make your preset the width of the slideshow.
This way you would have a fixed width and a flexible height for the images.

Hope this helps you further, please let me know.

#2

Superchicken - July 6, 2009 - 16:39

I checked the filepath with firebug, and it pointed to the original files, not the imagecached versions.

Just to make sure, i even printed ot the filepaths that ddblock was using, and actually that's how I came out with my horrible hack.

#3

ppblaauw - July 7, 2009 - 06:02

I don't know what causes the issue in your installation. Must be something wrong with the preprocess functions you use.

Can you send your template.php file with the preprocess functions when the issue happened.

I assume that you set:

  • Use imagecache
  • Choose a preset for content and pager

Please send the template.php file so I can help you better.

#4

ppblaauw - August 23, 2009 - 10:25
Category:bug report» support request

Did you solve your issue?

#5

ppblaauw - October 26, 2009 - 13:55
Status:postponed (maintainer needs more info)» closed

close issue, 9 weeks without activity.

 
 

Drupal is a registered trademark of Dries Buytaert.