limit the size of zoom
Permalink
I have a high-res file of about 4000 x 3000 px but I want only the zoom to go 800px.
Is there a way to do this other than physically resizing the image.
Is there a way to do this other than physically resizing the image.
You could create a custom template and restrict the size of both images. Do you have some basic PHP skills? All the code you need to change is herehttps://github.com/Remo/concrete5-zoom-image/blob/master/blocks/zoom...
I don't have.
I managed to manipulate php's like, footer, header by using the browser's inspect element and searching the web for the codes.
But if you can give me a bit more details just to give a lead, that will be appreciated.
I managed to manipulate php's like, footer, header by using the browser's inspect element and searching the web for the codes.
But if you can give me a bit more details just to give a lead, that will be appreciated.
Sorry, took me a while to get back to you, things are a bit hectic right now. Not enough unemployed people..
I think it should work if you copy /packages/zoom_image/blocks/zoom_image/view.php to /blocks/zoom_image/view.php (you probably have to create the directories too!) and then modify the file to make it look like this:
There only change is in this line:
I think it should work if you copy /packages/zoom_image/blocks/zoom_image/view.php to /blocks/zoom_image/view.php (you probably have to create the directories too!) and then modify the file to make it look like this:
<?php defined('C5_EXECUTE') or die('Access Denied.'); $version_arr = explode('.', APP_VERSION); if ($version_arr[1] < 2) die("This block doesn't support concrete" . APP_VERSION); if ($version_arr[1] == 2) { $fo = $controller->getAssetFileObject(); $fileName = $fo->getFileRelativePath(); $thumbnail = $fo->getThumbnail(intval($controller->thumbnailWidth), intval($controller->thumbnailHeight)); } else { $ih = Loader::helper('image'); $fo = $controller->getFileObject(); $fileName = $fo->getRelativePath(); $thumbnail = $ih->getThumbnail($fo, intval($controller->thumbnailWidth), intval($controller->thumbnailHeight)); }
Viewing 15 lines of 28 lines. View entire code block.
There only change is in this line: