Summary:
Autothumbnail size possible fix
Detailed Description:
Great work on the Album module for CMSMS, I'm a real fan and will be using this
a lot.
I've noted the issue in the help file with the autothumbnailsize, and thought
I'd share a hack I've done to make this more 'friendly'.
In class.Album.php, I altered the following lines
// Make tall thumnails fit in box
if ($picture->thumbnailheight > 72)
{
$picture->autothumbnailsize = ' height="72"';
}
else
{
$picture->autothumbnailsize = ' height="'.$picture->thumbnailheight.'"';
}
To:
if ($picture->thumbnailheight * 4/3 < $picture->thumbnailwidth)
{
if ($picture->thumbnailwidth > $this->Lang('maxthumbnailwidth'))
{
// Make wide thumbnails fit in box
$picture->autothumbnailsize = '
width="'.$this->Lang('maxthumbnailwidth').'"';
}
else
{
$picture->autothumbnailsize = ' width="'.$picture->thumbnailwidth.'"';
}
}
else
{
if ($picture->thumbnailheight > $this->Lang('maxthumbnailheight'))
{
// Make tall thumnails fit in box
$picture->autothumbnailsize = '
height="'.$this->Lang('maxthumbnailheight').'"';
}
else
{
$picture->autothumbnailsize = ' height="'.$picture->thumbnailheight.'"';
}
}
In the language file en_US.php, I added the following lines:
$lang['maxthumbnailheight'] = 72;
$lang['maxthumbnailwidth'] = 96;
The coding's not very pretty, and I'm not sure whether putting configuration
options into the LANG file is the right thing to do, but it works for me.
Cheers,
BenH