Announcement: New plug-in SuperSizer

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am
Location: London

Re: Announcement: New plug-in SuperSizer

Post by applejack »

Thanks Jeremy I appreciate it.

Before your regex



after is


Website Design & Production
http://www.applejack.co.uk
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post by JeremyBASS »

applejack wrote: Thanks Jeremy I appreciate it.

Before your regex



after is

off the top again... try

{content block="My WYSIWYG Image" assign="file"}
{capture assign=regex}(){/capture}
{assign var=file value=$file|regex_replace:$regex:'$2'}
{supersizer path="$file"}
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am
Location: London

Re: Announcement: New plug-in SuperSizer

Post by applejack »

Jeremy

Thanks but that deletes everything.

I came up with a work around using a combination of smarty replace and regex_replace which is not neat but it works for the time being. The regex_replace part is far more of a guess than anything some of it is probably useless and no doubt can be far more elegantly done.

{content block="My WYSIWYG Image" assign="file"}

{supersizer path=$file|replace:'':''}

Website Design & Production
http://www.applejack.co.uk
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post by JeremyBASS »

well you got it to go so that is what counts :D
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am
Location: London

Re: Announcement: New plug-in SuperSizer

Post by applejack »

Somewhat more concise versions

{supersizer path=$file|replace:'<img src="':''|regex_replace:"/[\"]+[\S\D]+/":''}

or

{supersizer path=$file|regex_replace:"/<img\s+src=\"/":''|regex_replace:"/[\"]+[\S\D]+/":''}

Website Design & Production
http://www.applejack.co.uk
mfal55
Forum Members
Forum Members
Posts: 131
Joined: Fri Jan 09, 2009 10:00 pm

Re: Announcement: New plug-in SuperSizer

Post by mfal55 »

Hi Jeremy - this is great! Thanks for putting this together!

I am wondering, along the same lines of the recent posts - is there a way to, instead of having an additional content block (ie: My WYSIWYG Image), that there is some way to call to an image that is added to the main content block?  So, essentially, user makes a new page, enters the text in the content block and then clicks the image icon in that content block, the supersizer script takes that image and resizes it.  Just a thought that I'm not sure if it's even feasible, but thought I would put it out there.

Again, thanks so much for this great tool! :)
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post by JeremyBASS »

mfal55 wrote: Hi Jeremy - this is great! Thanks for putting this together!

I am wondering, along the same lines of the recent posts - is there a way to, instead of having an additional content block (ie: My WYSIWYG Image), that there is some way to call to an image that is added to the main content block?  So, essentially, user makes a new page, enters the text in the content block and then clicks the image icon in that content block, the supersizer script takes that image and resizes it.  Just a thought that I'm not sure if it's even feasible, but thought I would put it out there.

Again, thanks so much for this great tool! :)
Thanks for the kind words... as far as the content block... if you area meaning in the main content block via the wysiwyg ATM no... but if you mean as an image content block (  {content block="My WYSIWYG Image" assign="file"}   )

that it is

{content block="My WYSIWYG Image" assign="file"}
{supersizer path=$file|regex_replace:"/<img\s+src="/":''|regex_replace:"/["]+[\S\D]+/":''}

as applejack posted...


Now there are many other places to add this plugin and I'd refer you to the wiki for the how to on the UDT... yep that's right :D I filled it out hehe
http://wiki.cmsmadesimple.org/index.php ... rsizer#FAQ

As far as the in the main content block via the wysiwyg that will come later when I get time... and I will add a stripTag=true param in version 1.1

version 1.1 will have

stripTag=true
fix the gif/png transparence issue
fix interlaced jpeg

and I think there was something else but I'll have to remember what it is...

I will product the new version as soon as I can but it'll fall to the time/funds monster at this point since this works 100% for the client that paid for it.

Cheers
Jeremy
mfal55
Forum Members
Forum Members
Posts: 131
Joined: Fri Jan 09, 2009 10:00 pm

Re: Announcement: New plug-in SuperSizer

Post by mfal55 »

Oh how I hear those woahs! (re: time/funds monster)

Well, I thank you for your speedy reply and yes I was referring to the main content block via the wysiwyg. I look forward to seeing any updates you do the the plugin - I think it is/will be an extremely useful tool. 

Now if only I would get paid by my clients so I can help this along! ;) alas...

Thanks Jeremy!

ps - what doesl the stripTag=true parameter you mention do?
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post by JeremyBASS »

mfal55 wrote: Oh how I hear those woahs! (re: time/funds monster)

Well, I thank you for your speedy reply and yes I was referring to the main content block via the wysiwyg. I look forward to seeing any updates you do the the plugin - I think it is/will be an extremely useful tool. 

Now if only I would get paid by my clients so I can help this along! ;) alas...

Thanks Jeremy!

ps - what doesl the stripTag=true parameter you mention do?
the stripTag param will take the image call from mods and the image content block  which output something like



and turn into

uploads/images/shop/umbrella.jpg


so for example

{content block="My WYSIWYG Image" assign="file"}
{supersizer path=$file|regex_replace:"/<img\s+src="/":''|regex_replace:"/["]+[\S\D]+/":''}

would become

{content block="My WYSIWYG Image" assign="file"}
{supersizer path=$file}

well it needs a size or it'd default to 25%...

hope that helps clear it up...  ;D
mfal55
Forum Members
Forum Members
Posts: 131
Joined: Fri Jan 09, 2009 10:00 pm

Re: Announcement: New plug-in SuperSizer

Post by mfal55 »

Ah sweet! Very cool.  Thanks for explaining to me... always learnin' ;)
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post by JeremyBASS »

Hello, I had to make a few quick additions to this.. sorry, I didn't get to the strip tags yet or the alpha fixes... Here is what I needed to add...

  • noOutPut (optional) - just sizes the image.  This is good for galleries
  • Prefix (optional) - Add a Prefix to the temp file name
  • Suffix (optional) - Add a Suffix to the temp file name
you can see the reason for that here

http://www.visitnorthcentralidaho.org/

just roll over the cycling main img... those thumbs there are outputted but SuperSizer... if you look at the code you'll know why I needed those new params so bad... but the short is that the files needed to be named like this..


General1.-w0-h35-p0_thumb.jpg
General2.-w0-h35-p0_thumb.jpg
General3.-w0-h35-p0_thumb.jpg

where the main image is just

1.jpg
2.jpg
3.jpg


I will get to the other FR's as soon as I can...

Cheers
Jeremy
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am
Location: London

Re: Announcement: New plug-in SuperSizer

Post by applejack »

Hi Jeremy

Another idea would be to add a random rotation where the tag would be the maximum percentage of rotation. I think you can do this using GD. This would be great for galleries instead of showing them all straight.

Website Design & Production
http://www.applejack.co.uk
mfal55
Forum Members
Forum Members
Posts: 131
Joined: Fri Jan 09, 2009 10:00 pm

Re: Announcement: New plug-in SuperSizer

Post by mfal55 »

Hey Jeremy!
Thought I would try to implement your faboo supersizer into the custom image for CG Calendar and I'm just not getting it right.  Can you share with me how I would write it out?

This calls to my image:


How do I work the magic of supersizer into this?
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am
Location: London

Re: Announcement: New plug-in SuperSizer

Post by applejack »

{supersizer path="uploads/images/events/$event.fields.Photo" alt="$event.event_title"}

Website Design & Production
http://www.applejack.co.uk
mfal55
Forum Members
Forum Members
Posts: 131
Joined: Fri Jan 09, 2009 10:00 pm

Re: Announcement: New plug-in SuperSizer

Post by mfal55 »

Hiya Applejack! Thanks for your reply! Unfortunately that doesn't seem to work for me. :(  Does it work for you?  Here's the error I receive:

(it's copied from the source because it's hard to select from the front end)

Warning:  getimagesize(uploads/images/events/Array.fields.Photo) [function.getimagesize]: failed to open stream: No such file or directory in /home/asira/public_html/clg/plugins/function.supersizer.php on line 112




Warning:  imagesx(): supplied argument is not a valid Image resource in /home/asira/public_html/clg/plugins/function.supersizer.php on line 164



Warning:  imagesy(): supplied argument is not a valid Image resource in /home/asira/public_html/clg/plugins/function.supersizer.php on line 165




Warning:  imagecopyresized(): supplied argument is not a valid Image resource in /home/asira/public_html/clg/plugins/function.supersizer.php on line 293

Locked

Return to “Modules/Add-Ons”