Advanced Image (Block and Helper)
Permalink 1 user found helpful
I created a slightly enhanced Image Block. It should be – cache-wise – backwards-compatible to the standard image block.
What's different?
1. No optional mouseover image (I just really would never need that, and it's confusing to editors)
2. Resize-Mode: Fit or Fill (currently just filled center-middle)
3. Slightly different resize behaviour (eg. I will also upscale if necessary)
There's a new helper file based on the image helper, which obviously should be put into the helpers directory.
Hope this is of any help for somebody :-)
What's different?
1. No optional mouseover image (I just really would never need that, and it's confusing to editors)
2. Resize-Mode: Fit or Fill (currently just filled center-middle)
3. Slightly different resize behaviour (eg. I will also upscale if necessary)
There's a new helper file based on the image helper, which obviously should be put into the helpers directory.
Hope this is of any help for somebody :-)
How did you override the image helper?!
"Fatal error: Cannot redeclare class ImageHelper in /home/murray/public_html/helpers/image.php on line 20"
"Fatal error: Cannot redeclare class ImageHelper in /home/murray/public_html/helpers/image.php on line 20"
you would need to extend it instead of just overriding it and add Site before the name..
like this
same goes for extending all helper classes.
like this
class SiteImageHelper extends ImageHelper { public function myCustomFunction() { return 'hola'; } }
same goes for extending all helper classes.
Crops the image within the max dimensions, and you can position it along the longer axis.
If that sounds good, here's where to find the block:
http://www.concrete5.org/community/forums/block_requests/image-bloc...