Hi guys,
If you include the same gallery (pictures from the same folder) in various content items, EVERY content item will show the thumbnails in the size from the last gallery, that was cached.
Example:
Let's say in the mambot parameters we specified the image thumbnail width as 80 and in our layout that creates 4 columns of thumbnails.
Then in
content item A the following line creates the thumbnails in 4 columns:
{gallery}slideshow_xy{/gallery}
And in
content item B the following line creates the thumbnails in 3 columns:
{gallery}slideshow_xy:120{/gallery}
Let's suppose we set the thumbnail cache time to 10 minutes.
What happens next is a problem:
- Say we visit content item A, then the thumbnails are created with a width of 80 pixels. And they are correctly displayed in content item A in 4 columns.
- In the next minute we visit content item B. The thumbnails should be 120 pixels wide and 3 columns. But what we see is
all thumbnails are still 80 pixels wide. However they are arranged in 3 columns, since the width is calculated correctly set via CSS (my guess).
Reason: The still cached images from earlier have a different size than specified here.
- After ten minutes if we reload content item B, the thumbnails will be 120 wide.
- But if we visit immediately after that content item A, then the thumbnails there are arranged in 4 columns, as expected, but 120 pixels wide instead of 80. That crams the images in the columns and creates clipping.
The reason for this behaviour is, that in plugin_jw_sigpro.php in various lines the filename for the cached file is build only from two identifying characteristics, that stay the same in every content item:
md5($_images_dir_.$name).".".$format
This behaviour can be resolved, or at least improved so the thumbnails can be defined for every content item individually, if you include the content item id in the cached thumbs' filenames:
$row->id.md5($_images_dir_.$name).".".$format
or probably also
md5($row->id.$_images_dir_.$name).".".$format
It would be good to include this in the next release.
Do you agree?