Announcement: New plug-in SuperSizer

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
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 »

jeremy, i hardly understand your documentation. i allways have to check all 19 (for now) pages in this thread.
what is the paramter "passthru" and "overwrite"? didnt find out whats the main idea of those parameters.
can u please add it to the documentation in your wiki page? thanks!
kendo451

Crop positioning

Post by kendo451 »

Hi Jeremy,

I suggest the for the final cut on crop positioning, that you use the same convention as CSS background positioning, since almost anyone who uses your plugin is familiar with it.

Essentially, once you do the resize, you now have a picture that matches one dimension of the crop but not the other.  Rather than attempting to position from the center of the picture, positioning from the top left corner is easily understood and doesn't require learning a new coordinate system and techniques for getting a top edge match.

Ken
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post by JeremyBASS »

@nicmare yeah I hope to be able to fix that this week.. In philly for vaca and biz, but that should give me the time needed to update all the docs ...

@kendo451 yeah I'm still thinking on this.. the deal is this, I want and am currently working on a way to use a jQuery and a flash cropper...

Tk you guys... Cheers -J
User avatar
NikNak
Forum Members
Forum Members
Posts: 183
Joined: Fri Oct 02, 2009 2:28 pm

Re: Announcement: New plug-in SuperSizer

Post by NikNak »

Hi Jeremy

With regard to the cropping - Surely it is essential that it crops from the middle of the image. I cannot see a benefit to cropping into a corner as previously mentioned as the chances are the focus of the image will be in the middle rather than the corner. I would suggest that cropping to a corner would be counter intuitive.

I have appraised about four scripts for resizing images, similar to Supersizer, and all of them crop to the middle, as you would expect.

If you do choose to crop into a corner, I'd love to know sooner rather than later so I can move to a different resizing method altogether (which would be rather a shame for me).

Cheers

Nik
kendo451

Re: Announcement: New plug-in SuperSizer

Post by kendo451 »

I speak from practical experience.  Product photos generally tend to be "portrait" or "landscape" shaped based on the shape of the item.

When you have a portrait shaped object being cropped to fit in a landscape sized thumbnail, a center crop cuts off both top and bottom, but if you align to the top edge, the photo looks complete.

Keep in mind that the method I am suggesting gives you the flexibility to position the resized image "behind" your crop frame how you want: top left, center, whatever according to CSS background position syntax.  So if you want a center crop you just specify center center, or 50% 50%, or 50xx 50px for a 100 x 100 thumbnail.
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post by JeremyBASS »

I'm still on the road...

but the way the crop is going to be tooled is this.. you say top, Left or center, center or center right.. that is the basic.... I'll have more up on it later but it'll work much like the CSS background... Crop is the next and last function before the main point release.. don't worries it'll be dead simple and will be flexible.  .. hope this clears some of it up.. Cheers. -Jeremy
nicmare
Power Poster
Power Poster
Posts: 1150
Joined: Sat Aug 25, 2007 9:55 am
Location: Berlin

Re: SuperSizer (Delete SuperSizer created Images on News Article Deletion)

Post by nicmare »

JeremyBASS wrote:
The tag...
{capture assign=imgIs}{$entry->file_location}/{$field->value}{/capture}
{supersizer path=$imgIs height="303"  width="456" crop='true' Quality=80 Subdir=$entry->id alt="Place caption field value here"}

So Make a UDT (deleteNewsArtclePics):

Code: Select all


global $gCms;
include 'plugins/function.supersizer.php';

$config =& $gCms->GetConfig();
$dirpath=$config['uploads_path']."/SuperSizerTmp/".$params['news_id']."/";
function recursive_rmdir($dir)
	 {
		// all subdirectories and contents:
		if(is_dir($dir)){
			$dir_handle=opendir($dir);
		}else{
			return false;
		}
		while($file=readdir($dir_handle))
		{
		if($file!="." && $file!="..")
		{
		if(!is_dir($dir."/".$file))unlink ($dir."/".$file);
		else $this->recursive_rmdir($dir."/".$file);
		}
		}
		closedir($dir_handle);
		rmdir($dir);
		return true;
	}

echo "$dirpath <br/>If you see this, that is an error";
recursive_rmdir($dirpath);





Add it to the event.  In this case

Module Name:News
Event Name:NewsArticleDeleted
UDT added:deleteNewsArtclePics

Sent when an article is deleted the folder is too.

Note: the tag has Subdir=$entry->id but you would want Subdir="news/$id" or Subdir="feuUser/$id" if you had more then one mod using supersizer...

Test it out.. Do this on a test server first.

Hope this helps,
Cheers
Jeremy

*tested on lastest version
i added the udt and your snippet but the images remains in the tmp dir of supersizer when i delete the image in the news article. did i miss something? what do you mean with "events"? where do i call the UDT?
NaN

Re: Announcement: New plug-in SuperSizer

Post by NaN »

In Backend: "Extensions->EventManager" look for the event that is sent when a news article is deleted.
Click on it.
Select your UDT.
Add it.
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 »

hmm, never has used this before. actually i didnt know that this exists :D
and finally, it works! very nice! thank you.
btw: any ideas how to delete the folder if i just delete the image of the article but not the article itself? or when i change the image.
User avatar
NikNak
Forum Members
Forum Members
Posts: 183
Joined: Fri Oct 02, 2009 2:28 pm

Re: Announcement: New plug-in SuperSizer

Post by NikNak »

Hi again Jeremy

How is the cropping functionality coming along?  No pressure - I just need to make some decisions on the cropping script used on a few sites in development. The cropping issue on supersizer is the only thing holding me back from using it currently.

Kind regards and thanks for your help

Nik
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post by JeremyBASS »

You know.. It got lost in the mix of me working on ScriptDeploy, MediaDeploy, paid work and cmsms stuff... I do have it working somewhat correctly now (the "left,top" or "center,center" etc. with scale and a % as an alt for the css style croping).. just testing it and checking for bugs.. Since it's now again up in my mind I'll work on getting the new one out in a few days.. Cheers -Jeremy
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post by JeremyBASS »

ok.. here it is.. please test but here is the test I have

http://www.corbensproducts.com/users/1/ ... .html#crop

you do it like this..

   * crop="left,top"
   * crop="right,top"
   * crop="center,top"
   * crop="left,bottom"
   * crop="right,bottom"
   * crop="center,bottom"
   * crop="center,center"
    * crop="left,center"
    * crop="right,center"


for now I took out the scale but scale is coming.. you can still do it by the pixel by pixel way too.. and I'll add the % in later.. Cheers Jeremy
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

Last edited by JeremyBASS on Tue Jul 13, 2010 5:09 am, edited 1 time in total.
rubberglover
Forum Members
Forum Members
Posts: 53
Joined: Mon Jul 23, 2007 5:30 pm

Re: Announcement: New plug-in SuperSizer

Post by rubberglover »

I've just started using supersizer for the first time and had to post; what an absolutely brilliant resource... thank you so much Jeremy!

The majority of sites I build are for charities and public sector clients, so almost 90% of the time I end up handing over a CMSMS site to someone who is not very technically proficient, and sometimes doesn't know a single line of HTML. For years I've struggled with finding a really simple way for these folk to add images to their news posts and blog posts without eating through hard drive space on their server.

Supersizer addresses this problem in the best way I can think of, and I'll be setting it up for most of my previous CMSMS builds over the coming weeks - you've just made life a lot easier for a whole bunch of really great people working for some really great charities  :) This goes for CMSMS as a whole too actually, because in my opinion it's the best CMS out there, especially when it comes to making something that's easy for the end client to use.

Just thought I'd share that, as I'm sure it sometimes feels like you put in a load of work and mainly just get requests for more features and bug reports in return! Thanks for all your hard work, and for supporting those who use it.
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post by JeremyBASS »

rubberglover wrote: I've just started using supersizer for the first time and had to post; what an absolutely brilliant resource... thank you so much Jeremy!

The majority of sites I build are for charities and public sector clients, so almost 90% of the time I end up handing over a CMSMS site to someone who is not very technically proficient, and sometimes doesn't know a single line of HTML. For years I've struggled with finding a really simple way for these folk to add images to their news posts and blog posts without eating through hard drive space on their server.

Supersizer addresses this problem in the best way I can think of, and I'll be setting it up for most of my previous CMSMS builds over the coming weeks - you've just made life a lot easier for a whole bunch of really great people working for some really great charities  :) This goes for CMSMS as a whole too actually, because in my opinion it's the best CMS out there, especially when it comes to making something that's easy for the end client to use.

Just thought I'd share that, as I'm sure it sometimes feels like you put in a load of work and mainly just get requests for more features and bug reports in return! Thanks for all your hard work, and for supporting those who use it.
Thank you for the kind words.  It means a lot.. I ways wish for donations to help keep things up, but like you I do a lot of charities, and well that is why this is here.. :D  can't lie, would love it if every download came with $5 for it, heck I'd have like a 1-2 month’s rent by now.. but it's just as important to help others if nothing more than for the sole.. Cheers and thank you for taking the time for the kodos.. :D
rubberglover
Forum Members
Forum Members
Posts: 53
Joined: Mon Jul 23, 2007 5:30 pm

Re: Announcement: New plug-in SuperSizer

Post by rubberglover »

an't lie, would love it if every download came with $5 for it, heck I'd have like a 1-2 month’s rent by now.. but it's just as important to help others if nothing more than for the sole..
Just made a donation; thanks again :)
Locked

Return to “Modules/Add-Ons”