Page 1 of 1

Make module Image Compressor work again in CMSMS 2.2.x?

Posted: Wed Jan 11, 2023 8:40 am
by creopard
Would anybody be willing to make the useful module "Image Compressor" work again?
http://dev.cmsmadesimple.org/projects/imagecompressor

I tried to replace the old coding in class.imagecompressor_utils.php

Code: Select all

const SMUSHIT_API_URL = 'http://www.smushit.com/ysmush.it/ws.php?img=%s';
with the new api addresses

Code: Select all

const SMUSHIT_API_URL = 'http://api.resmush.it/ws.php?img=%s';
and in action.ajax.php

Code: Select all

if(strpos($source, 'http://ysmushit.zenfs.com/results') !== 0)
with the new api addresses

Code: Select all

if(strpos($source, 'resmush.it/output') !== 0)
which used to work in the CMSMS 1.x versions

But no luck in CMSMS 2.2.x

I also removed the (obsolete?) coding in function.admin_imagelist_tab.php as it gave me a fatal error and the variable "$admintheme" seems not to be used anywhere:

Code: Select all

$admintheme = cmsms()->get_variable('admintheme');
Althought jquery is available and also being processed, it seems "action.ajax.php" is not triggered somehow

Re: Make module Image Compressor work again in CMSMS 2.2.x?

Posted: Mon Feb 06, 2023 1:04 pm
by creopard
anybody got any idea how to fix this?

Re: Make module Image Compressor work again in CMSMS 2.2.x?

Posted: Tue Feb 07, 2023 12:52 pm
by manuel
Don't know about fixing it but for processing images I use CGSmartImage
Maybe you can use it as an alternative solution?

Re: Make module Image Compressor work again in CMSMS 2.2.x?

Posted: Tue Feb 07, 2023 1:14 pm
by velden
manuel wrote: Tue Feb 07, 2023 12:52 pm Don't know about fixing it but for processing images I use CGSmartImage
Maybe you can use it as an alternative solution?
Better use the fork SmartImage now as CGSmartImage is abandonware

Re: Make module Image Compressor work again in CMSMS 2.2.x?

Posted: Thu Feb 09, 2023 1:20 pm
by creopard
Thanks, but SmartImage / CGSmartImage will not optimize the size of an image but "only" apply filters or resize it.

Re: Make module Image Compressor work again in CMSMS 2.2.x?

Posted: Mon Feb 13, 2023 10:30 am
by manuel
@Velden Thx, I didn't know!
Could maybe be usefull to mention on the stale module page?

@1541 Sorry I couldn't help :/ You can set the image quality, that's about it for "optimising" I guess...