BigChris, sorry mate, did not get any notification email from the post, until it's been bumped. for what it's worth. ^_^ You may try create your own image class like the following:
class ImageGalleryPageImage extends DataObject {
static $db = array(
);
static $has_one = array(
'ParentImageGalleryPage' => 'ImageGalleryPage',
'GalleryImage' => 'ImageGalleryPageImage_CustomImage',
//'GalleryImage' => 'Image'
);
function getCMSFields_forPopup() {
$fields = new FieldSet();
$fields->push( new ImageField( 'GalleryImage', 'Gallery Image' ) );
$fields->push( new LiteralField( 'literalfield_1', '<div>For best result, use image size of 930x500.</div><br>' ) );
return $fields;
}
public function getTooltipThumbnail() {return $this->GalleryImage()->BackendThumbnail();}
}
class ImageGalleryPageImage_CustomImage extends Image {
function generateCustomImage($gd){
$gd->setQuality(85);
return $gd->resizeRatio(930, 500);
}
function generateCustomThumbnailImage($gd){
$gd->setQuality(85);
return $gd->paddedResize(98, 66, '#000000');
}
function generateBackendThumbnail($gd){
$gd->setQuality(85);
return $gd->resizeRatio(300, 300);
}
}
Please take a note that instead of using default class 'Image', just use your custom image class
'GalleryImage' => 'ImageGalleryPageImage_CustomImage',
//'GalleryImage' => 'Image'
then in the ss template, you may use it like this:
<% control ImageGalleryPageImages %>
<li>
<!--IMAGE-->
<div class="thumbnail">
<a href="$GalleryImage.CustomImage.URL" class="thumb">
<img src="$GalleryImage.CustomThumbnailImage.URL"<% if ImageTitle %> alt="$ImageTitle"<% end_if %> />
</a>
</div>
<div class="caption"></div>
<!--/IMAGE-->
</li>
<% end_control %>
Hope it can still be useful, since we all need to maintain the old site. ^_^