Page 29 of 33

Re: Announcement: New plug-in SuperSizer

Posted: Sat Nov 20, 2010 12:32 am
by JeremyBASS
@kendo451 .. if you want please do share.. but the way I normally handle this, when I have unruly cleints uploading what ever,  is limit the points the cleint is uploading thru ... do the first normalized size once on the upload... then the rest inline.. this way there is just that much less getting processed.  

@pukka  if you can be a little more clear I'd be happy to help when I get back in..

Cheers -Jeremy

Re: Announcement: New plug-in SuperSizer

Posted: Mon Nov 22, 2010 11:37 pm
by pukka
Hey Jeremy,

The problem was that i set my supersizer to something like this:

{supersizer path="$imglocation/$products_image" width="210" height="240" strip_tags="true" class="hlistimg" }

For the most part this was fine however when the client uploaded an image that had a size of say - width="195" height="240"  - the image would not show up on the frontend of the website.

I basically reduced the size from width="210" height="240" to something smaller (width="190" height="230".


Pukka

Re: Announcement: New plug-in SuperSizer

Posted: Mon Nov 22, 2010 11:45 pm
by JeremyBASS
@pukka yes I have clients like that to.. I do one of two things.. just use protect=false and it'll size them up.. most of the time that will be ok as SuperSizer does a great keeping quality.  the other is way more complicated and uses udt on upload which is noted blow back on page um.. 12 I think.. Hope that helps.. Cheers -Jeremy

Re: Announcement: New plug-in SuperSizer

Posted: Tue Nov 23, 2010 12:29 am
by pukka
Thanks for the info.

I'm using protect=false and it's working just fine.

Many Thanks.

Re: Announcement: New plug-in SuperSizer

Posted: Wed Nov 24, 2010 7:21 pm
by nicmare
can i assign just the path? now i do it this way which is a lil bit complicated ;)

Code: Select all

{supersizer width=100 height=100 crop=true path=$imgpath strip_tags=true assign=thumbpath}
<input type="hidden" name="image" value={$thumbpath|replace:"<img src=":""|replace:" ":""|replace:'alt=""/>':''}/>
just for achieving that:
before:

Code: Select all

<img src="cms/uploads/SuperSizerTmp/IMG_7549.-w100-h100-p0-q85-F-----S1-c1.jpg?1290516631"    alt=""    />
after:

Code: Select all

cms/uploads/SuperSizerTmp/IMG_7549.-w100-h100-p0-q85-F-----S1-c1.jpg?1290516631

Re: Announcement: New plug-in SuperSizer

Posted: Wed Nov 24, 2010 10:54 pm
by JeremyBASS
yes .. it's the param url=true .. what that you don't even need to waste the memory with assign so you would have



hth cheers -Jeremy

Re: Announcement: New plug-in SuperSizer

Posted: Mon Dec 06, 2010 7:15 pm
by NaN
Hi there.

I can't figure out what the from and to params are for.
All i want to do is to resize images and override the original with the resized one.

Example: I put this in a foreach loop of the gallery module template to make sure that the large images are all the same max size...

{foreach from=$images item=image}

{supersizer from=$image->file|escape:'url'|replace:'%2F':'/' to=from="$image->file|escape:'url'|replace:'%2F':'/' unique=false width="1024" height="768" no_output=true}

{/foreach}

As i understand it should resize the original image to 1024x768 and override the original image with the resized one, right?
So all images would have a max size of 1024x768.
No matter in what size they where uploaded.

But this doesn't do anything.
Am i doing something wrong?

Re: Announcement: New plug-in SuperSizer

Posted: Tue Dec 07, 2010 12:39 pm
by Jos
I notice you do use $image->file|escape:'url'|replace:'%2F':'/' in the SuperSizer tag.

Some time back I altered the output of $image->file so Gallery would not cause any problem with SuperSizer. This change made it necesary for some *box systems to use $image->file|escape:'url'|replace:'%2F':'/' in their template.

Does {supersizer from=$image->file} not work?

Re: Announcement: New plug-in SuperSizer

Posted: Tue Dec 07, 2010 12:58 pm
by NaN
Thanks for your reply.
It is solved now.

First issue was that the folder- and filenames contains whitespaces. I told the editors to NEVER EVER use f*cking whitespaces on folder- or filenames! They just don't get it ::)
There are more than 2000 images now.
I'm not going to rename them.

{$image->file} did not work here since it seems to be urlencoded.
When using the debug param of SuperSizer i noticed that SuperSizer uses rawurldecode on the path to get the original file from but not on the path to store the resized file. So source and destination path just didn't match. And because i turned off error reporting i didn't notice that the script was unable to write the file to the destination path since there was no such path.

Additionally the files were uploaded via FTP. So owner was the FTP user what results in a filepermission issue. That means SuperSizer was not able to overwrite the original files. I changed the permission of the Gallery folder (and hundreds of subfolders and thousands of images... ::) ) to umask 0777.

I now use this in my Gallery template:

{supersizer from=$image->file|escape:'url'|rawurldecode to=$image->file|escape:'url'|rawurldecode width=1024 height=768 quality=100 unique=false overwrite=true no_output=true}

This works nice for me.

Re: Announcement: New plug-in SuperSizer

Posted: Tue Dec 07, 2010 4:55 pm
by JeremyBASS
With overwrite you just need path IIRC... Also since it's overwrite you don't need the unique=false  as well.. so..

{supersizer path=$image->file overwrite=true width=1024 height=768 quality=100 no_output=true}

should be all you need.. hth some.. cheers -Jeremy

Re: Announcement: New plug-in SuperSizer

Posted: Tue Dec 07, 2010 5:06 pm
by JeremyBASS
Oh.. and @ the question "I can't figure out what the from and to params are for."  So that gives you the power to take an image from the, let's say from News folder in uploads to and make a new folder in uploads that is in the Gallery folder.. so you could build a master Gallery automatically...

{supersizer from=$image->file to="/uploads/`$entry->id`/`$someFooName`.jpg" width=1024 height=768 quality=100 no_output=true}

You can even change image type.. Or I think that you should be able to.. hope that make sense
Cheers -Jeremy

Re: Announcement: New plug-in SuperSizer

Posted: Tue Dec 07, 2010 9:56 pm
by NaN
JeremyBASS wrote: With overwrite you just need path IIRC... Also since it's overwrite you don't need the unique=false  as well.. so..

{supersizer path=$image->file overwrite=true width=1024 height=768 quality=100 no_output=true}

should be all you need.. hth some.. cheers -Jeremy
Thanks. Yes you're right. This works too. I guess the main problem was the filepermission stuff.

Re: Announcement: New plug-in SuperSizer

Posted: Sat Dec 11, 2010 4:56 am
by Wishbone
I just found SuperSizer and started using it. Fantastic! Thanks Jeremy.

Re: Announcement: New plug-in SuperSizer

Posted: Sat Dec 11, 2010 7:23 pm
by JeremyBASS
Thanks.. It's almost 100% complete and ready for v1.0 :)

Re: Announcement: New plug-in SuperSizer

Posted: Fri Dec 17, 2010 10:05 pm
by Sonya
Jeremy, can you please add a possibility to suppress ugly red error messages when something went wrong (e. g. image is not found). I suggest adding another parameter like debug and only if it is set to true to echo messages on the website, if not - nothing should be shown at all.