Announcement: New plug-in SuperSizer

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post 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
User avatar
pukka
Forum Members
Forum Members
Posts: 119
Joined: Thu Nov 12, 2009 6:02 pm

Re: Announcement: New plug-in SuperSizer

Post 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
Peace & Love

--------------------------------------------------------------------------
Useful stuff: {$entry->fields|@print_r}

web design london
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post 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
User avatar
pukka
Forum Members
Forum Members
Posts: 119
Joined: Thu Nov 12, 2009 6:02 pm

Re: Announcement: New plug-in SuperSizer

Post by pukka »

Thanks for the info.

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

Many Thanks.
Peace & Love

--------------------------------------------------------------------------
Useful stuff: {$entry->fields|@print_r}

web design london
nicmare
Power Poster
Power Poster
Posts: 1150
Joined: Sat Aug 25, 2007 9:55 am
Location: Berlin

Re: Announcement: New plug-in SuperSizer

Post 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
Last edited by nicmare on Wed Nov 24, 2010 7:23 pm, edited 1 time in total.
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post 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
NaN

Re: Announcement: New plug-in SuperSizer

Post 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?
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: Announcement: New plug-in SuperSizer

Post 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?
Last edited by Jos on Tue Dec 07, 2010 12:41 pm, edited 1 time in total.
NaN

Re: Announcement: New plug-in SuperSizer

Post 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.
Last edited by NaN on Tue Dec 07, 2010 3:19 pm, edited 1 time in total.
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post 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
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post 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
NaN

Re: Announcement: New plug-in SuperSizer

Post 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.
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: Announcement: New plug-in SuperSizer

Post by Wishbone »

I just found SuperSizer and started using it. Fantastic! Thanks Jeremy.
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post by JeremyBASS »

Thanks.. It's almost 100% complete and ready for v1.0 :)
Sonya

Re: Announcement: New plug-in SuperSizer

Post 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.
Locked

Return to “Modules/Add-Ons”