Where do I put the "SCale Image" Code?

Permalink
Hi,

Thanks for the tutorial, I made it work on my site (www.manimanteatro.it) even if I have to work a bit on the CSS.

But I didn't understand WHERE to paste the "scale image" code you write.

Can you help me?

Thanks

 
12345j replied on at Permalink Reply
12345j
In your site's empty root-level blocks/ folder, create a folder named image, and copy concrete/blocks/image/view.php into blocks/image/. Then, open it in a text editor and make the changes below:
<div class="main-image">
<?
$v = View::getInstance();
if ($v->getThemeHandle() == 'c5touch') { 
   $ih = Loader::helper('image');
   $ih->outputThumbnail($f, 275, 1000);
   ?>
<? } else { ?>
   <div><img src="<?=$f->getRelativePath()?>" class="footer-image" 
width="<?=$f->getAttribute('width')?>" height="<?=$f->getAttribute('height')?>" 
alt="footer image" /></div>
<? } ?>
<? if ($altText) { ?>
<div class="main-image-caption"><?=$altText?></div>
<? } ?>
sed74 replied on at Permalink Reply
Sorry to bother you again, but I did what you wrote and it keeps not working.
Plus, I didn't understand if I have to replace the code contained in the view.php file with the one you enclosed and save it in root/blocks/image or to add the code.

I tried either way, but it doesn't work:
when I open the site from a computer, I have 2 different behaviour:
1. the site is displayed until the first image is found, then blank.
2. everything but the background is blank.

What am I doing wrong?

Thanks
12345j replied on at Permalink Reply
12345j
im pretty sure you have to add it, and use an new image block, but im not sure. just got the code fromhttp://andrewembler.com/concrete5/optimizing-your-concrete5-website...
so if it still doesn't work id try asking around there. or pming andrew.