Hi Jeremy :)
First, I want to thank you for this great plug-in.. really rocks! Something like this lacked from this great system, IMHO.
So, I'm testing
Supersizer along with
CGBlog module, you can take a look at the main thread I started:
http://forum.cmsmadesimple.org/index.ph ... 356.0.html
...hopefully you'll know some other issues related to CGBlog
I'm sticking here to Supersizer usage and testing, have some questions and thoughts.
Basically, I used images (defined several file type fields) uploaded from frontend (cgblog fesubmit action), and assigned them to blogs article along with text.
So, I modified the Summary and Details Templates like this (showing just relevant part of a code):
Summary Template
{if isset($entry->fields)}
{foreach from=$entry->fields item='field'}
{if $field->type == 'file'}
{if $field->name == 'image1'}
{* image1 is the field name of first image uploaded, as I want to show only one thumbnail on Summary page *}
{assign var=Photo value=$field->value}
{assign var=Location value=$entry->file_location}
detail_url alt="{$entry->title}">
{supersizer path="$Location/$Photo" width='80' Quality="100"}
{/if}
{else}
{$field->name}: {eval var=$field->value}
{/if}
{/foreach}
{/if}
Detail Template
{if isset($entry->fields)}
{foreach from=$entry->fields item='field'}
{if $field->type == 'file'}
{assign var=Photo value=$field->value}
{assign var=Location value=$entry->file_location}
{supersizer path="$Location/$Photo" height="450" URL=true Assign="MainPic" Protect =false Quality="100"}
{supersizer path="$Location/$Photo" height="80" URL=true Assign="MinnyPic" Quality="100"}
{else}
{$field->name}: {eval var=$field->value}
{/if}
{/foreach}
{/if}
This code works, but I get an error on both summary and detail pages:
'Warning: filemtime() [function.filemtime]: stat failed for
http://localhost/cms-1.6.6/uploads/cgbl ... G_5094.JPG in C:\xampp\htdocs\cms-1.6.6\plugins\function.supersizer.php on line 469'
When I comment that elseif (from line 469) statement:
elseif(filemtime($filename) < filemtime($path)){
unlink ($filename); }
I get no errors at all, works perfectly. It's just that I'm not a developer and don't like to modify core php files.. let me know what you think, any side effects etc..
Regarding quality
It seems that the parameter Quality doesn't work for me. When I change this, I get the same result. So, Quality=1 is equal to Quality=100. I tried to remove all the files from SupersizerTmp folder, and to change Quality parameter, but no luck. The images are of the same quality and file size (in byte). When I set the thumbnail to 80px width I get pixelated image of not such a good quality (see attached image). For larger images I'm opening on Details page with lightbox, Supersizer works great.
Regarding aspect ratio
When site visitors upload their images through frontend, there will be images with different aspect ratios - both landscape and portrait formats. So now I think how to set dimensions for thumbnails, to look nice. Ideally, all the thumbs should be of the same square size, but I think this is not possible without stretching the image, right? I'm aware that this could be hard to achieve, as it would involve resize and crop ... just asking.
I'm using all latest versions, developing @ localhost.
That's it at the moment, and sorry for this long post.
Thank you very much,
Darko