I'm trying to get uc_manufacturer to use an imagecache preset for the block... this keeps files consistent and makes uploading new files easier (e.g. don't have to resize them beforehand). It would probably be better to use a different preset than the one setup for the manufacturer page, because that one is pretty small.

Comments

goodeit’s picture

Looking further into it, uc_manufacturer_block should probably be a theme function.

goodeit’s picture

Status: Active » Needs review

Here's my first stab at it... seems to work fine (but its not themed). all I did was comment out line 283 and then add:

 $content .= l(theme('imagecache', 'manufacturer_block', $man->logo, $man->name, $man->name), ($man->url ? $man->url : uc_manufacturer_path($man)), array('target' => '_blank'), null, null, false, true);

the imagecache preset is called 'manufacturer_block'.

blagrone’s picture

hi gooedit,

Thanks!
It worked for me. I'm a nube.;), so I also tried this code; both worked just fine.

$content .= l('<img src="'. base_path() . 'files/imagecache/manufacturer_block/' . $man->logo .'" alt="'. $man->name .' Logo" />', $man->url, array('target' => '_blank'), null, null, false, true);

What's the proper way to add this to the code? a patch, theme function? Happy to contrib, if anyone can point me int he right direction, me being a nube and all.