Osclass forums

Development => Plugins => Topic started by: teseo on February 19, 2016, 06:48:20 pm

Title: [Plugin] Pre-resize Images (v. 2.3.0 released)
Post by: teseo on February 19, 2016, 06:48:20 pm
(http://market.osclass.org/oc-content/uploads/market/496.jpg)

Pre-resize Images

Hi,

This plugin is aimed to save PHP memory on images uploading. No more "Fatal error: Allowed memory size of xxxxxxxxx bytes exhausted" when your users try to send their big smartphone images! :D

It's already in the Market for a while now, but I didn't want to announce it here until having a quite solid version (1.1.0 now). Some issues have been detected by its first users and now they are fixed. Download, configure and enjoy:

http://market.osclass.org/plugins/miscellaneous/pre-resize-images_496

Regards

Title: Re: [Plugin] Pre-resize Images
Post by: ala on February 20, 2016, 09:29:16 am
i replace it here but it not work for me


<div class="box photos">
               
                        <?php
                            if(osc_images_enabled_at_items()) {
                                if(cammarket_is_fineuploader()) {
                                    // new ajax photo upload
                                    //ItemForm::ajax_photos();
                                    if (function_exists('przi_ajax_uploader')) przi_ajax_photos();
else ItemForm::ajax_photos();
                                }
                            } else { ?>
                        <h2><?php _e('Photos', 'tt'); ?></h2>
                        <div id="photos">
                            <div class="row">
                                <input type="file" name="photos[]" />
                            </div>
                        </div>
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on February 20, 2016, 12:33:45 pm
Hi,

What theme are you using and what is the name of that file (item-post.php, item-edit.php)? ???

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: gnoe on February 21, 2016, 12:09:32 am
Anyone wanting to translate text strings to another lang, you can do it on index.php
e.g "Make primary image" on line 315

Don't forget to convert the file to UTF-8 from ANSI.
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on February 21, 2016, 12:20:33 am
Hi,

That string is included in oc-content/languages/[language code]/core.po, so it should appear already translated to the current language... ???

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: ala on February 21, 2016, 08:23:05 am
I use one theme

It also in item post and edit the same code
Title: Re: [Plugin] Pre-resize Images
Post by: gnoe on February 21, 2016, 09:06:24 am
yep, found 'Make primary image' string on latest 3.6.1 core lang file. Had to update it. ;)

Some other strings are still not translated.
e.g
'Cancel','Retry','Delete' around 113 line.


Title: Re: [Plugin] Pre-resize Images
Post by: teseo on February 21, 2016, 03:05:22 pm
Hi,

Some other strings are still not translated.
e.g
'Cancel','Retry','Delete' around 113 line.

You're right, will be fixed on next update 1.1.1

I use one theme

I've sent you a PM.

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: PaulBoss on March 02, 2016, 10:19:20 am
Thx the plugin work's great. Can you please add the image rotator with the plugin?
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on March 02, 2016, 12:47:22 pm
Hi,

Sorry, what do you mean by "image rotator"? ???

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: ala on March 03, 2016, 07:49:00 am
it's like olx ..
images uploaded can rotation and drag for main photo,
i think may be you can do it well with js

regard
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on March 03, 2016, 12:58:50 pm
My main goal was to stop PHP memory errors from happening. The plugin already adds "Make primary" thas is missing in most themes, but I included it only because the basis is already there and it wasn't too hard. So no plans to add new features, sorry.

i replace it here but it not work for me

I assume you got it working and there's no bug in the current code...

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: SteveJohnson on March 03, 2016, 06:07:14 pm
Osclass needed such a plugin. Will check soon, and write back.
Thanks teseo!
Title: Re: [Plugin] Pre-resize Images
Post by: pecke on March 04, 2016, 12:39:47 am
I must say thanks too, i use it on my site.
Title: Re: [Plugin] Pre-resize Images
Post by: itcafeonline on March 04, 2016, 02:37:10 pm
teseo, can we make this work with the backend (admin) as well, meaning for images uploaded from admin section please?
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on March 04, 2016, 03:15:16 pm
teseo, can we make this work with the backend (admin) as well, meaning for images uploaded from admin section please?

No. Again, this is just a replacement for Ajax Uploader where it is already working (frontend).

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: p206ab on March 04, 2016, 07:12:27 pm
Thanks teseo, this looks great. But for some reason, I get an error about wrong format of the file, should be .jpg, .png of gif, but the file I'm attaching is .jpg?
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on March 04, 2016, 07:30:41 pm
Hi,

???

What theme are you using? Please copypaste here the exact error message.

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: p206ab on March 04, 2016, 08:35:33 pm
Theme is Infinity. Nothing in debug.log though.

"File has an invalid extension, it should be one of png,gif,jpg,jpeg."

I've changed like it says in plugin:

from
Code: [Select]
<?php if( osc_images_enabled_at_items() ) {
                           
ItemForm::ajax_photos();
                         } 
?>
to
Code: [Select]
                        <?php if( osc_images_enabled_at_items() ) {
                            if (
function_exists('przi_ajax_uploader')) przi_ajax_photos();
else 
ItemForm::ajax_photos();
                         } 
?>
Title: Re: [Plugin] Pre-resize Images
Post by: sunshine on March 04, 2016, 08:45:16 pm
Hi teseo,
When I upload .jpg pictures on my website, then your plugin resize the images but it feels like it does not stop uploading the pictures so that I can continue to click on publish the ad.
When I click on publish button the ad with pictures is published and the pictures are resized.
BUT before I clicked on the publish button, It feels like it continues to upload the picture forever and does not stop uploading as it does when I did not use your plugin. This is a very good plugin but please explain why it does not finish uploading the pictures?
Do you have a  solution for this?
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on March 04, 2016, 09:12:33 pm
Theme is Infinity. Nothing in debug.log though.

??? No problems with Infinity theme here... Have you tried with different images? Can you test it with another theme?

...........

@sunshine, what theme are you using?

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: sunshine on March 04, 2016, 09:21:23 pm
I am using this theme: http://market.osclass.org/themes/general/ctg-classifieds_422
I am using the browser: Google Chrome.

Title: Re: [Plugin] Pre-resize Images
Post by: p206ab on March 04, 2016, 11:31:16 pm
Theme is Infinity. Nothing in debug.log though.

??? No problems with Infinity theme here... Have you tried with different images? Can you test it with another theme?


Yeah, sorry, my fault, I've tried on another site with OsclassWizard and works like a charm.
I should have known that like most of plugins this will have issues with me, since, as you may remember, I have complex and quite modified website (twenty sites, same image folder etc..), so I would have to make adjustments also here.
But congrats on great plugin, will keep using it on second site! ;)
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on March 05, 2016, 12:25:41 am
Oh, I see. This modification here:

http://forums.osclass.org/general-help/upload-path/msg133389/#msg133389

If you kept it to make the whole thing working, you need to do the same in the plugin (index.php line 307), because that whole core function ajax_photos() is being replaced by the modified clone przi_ajax_photos().

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: p206ab on March 05, 2016, 10:21:29 am
Oh, I see. This modification here:

http://forums.osclass.org/general-help/upload-path/msg133389/#msg133389

If you kept it to make the whole thing working, you need to do the same in the plugin (index.php line 307), because that whole core function ajax_photos() is being replaced by the modified clone przi_ajax_photos().

Regards

index.php line 307 is this
Code: [Select]
$(li).append('<div class="ajax_preview_img"><img src="<?php echo osc_base_url(); ?>oc-content/uploads/temp/' + responseJSON.uploadName + '" alt="' + responseJSON.uploadName + '"></div>');and the message in upload path topic you are referring to, suggest i should edit this like I did row 1485 in item.form.class.php, If I understand you correctly.

But if you check below that post, you told me this is not the right way and provided a great solution, which worked and didn't require modification of any other file than functions.php. So I believe this (modifying plugin index as item.form.class) wouldn't work here as well?
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on March 05, 2016, 12:58:08 pm
Hm... Those functions I gave you operate after ad submission and the Ajax Uploader part is executed before, so everything that works with vanilla mechanism should work with the plugin... ??? As i saw you had changed oc-content/uploads/temp/ (this is the folder used by the Ajax Uploader) seemed to me like a possible cause of your issue, but looks like the problem is elsewhere... ???

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: p206ab on March 05, 2016, 02:43:01 pm
Hm... Those functions I gave you operate after ad submission and the Ajax Uploader part is executed before, so everything that works with vanilla mechanism should work with the plugin... ??? As i saw you had changed oc-content/uploads/temp/ (this is the folder used by the Ajax Uploader) seemed to me like a possible cause of your issue, but looks like the problem is elsewhere... ???

Regards

Well, I'll look into it when I'll have time, but for now thank you teseo, don't waste your time figuring out, as not many of others here complicate their lives with a website like mine, so it won't be useful to general public :P I'm planning on buying your multilanguage custom field plugin next week though, maybe I'll need you there ;)
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on March 05, 2016, 07:14:37 pm
When I upload .jpg pictures on my website, then your plugin resize the images but it feels like it does not stop uploading the pictures so that I can continue to click on publish the ad.

Not really a plugin issue, your theme "insists" in showing elements of same type as the spinner and the "Cancel" and "Retry" elements:

(http://s12.postimg.org/pa3mickrx/Issue.png)

Edit /oc-content/plugins/preResize_images/index.php

Find:

Code: [Select]
<style>
    .qq-hide {
        display: none;
    }

Replace with:

Code: [Select]
<style>
    .qq-hide {
        display: none !important;
    }

This little patch should fix your problem until next plugin update.

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: Syed on March 14, 2016, 10:34:46 am
Thanks for a great plugin,

I found some problem please fix if possible,
The thumbnails of uploaded images are not visible after following the bellow procedures.


1. Upload image other then supported format so that message "xxxxxxx.xxx has an invalid extension. Valid extension(s): png, gif, jpg, jpeg." appears.
2. Now upload supported format e.g JPEG
3. The image will be uploaded but will not be visible in thumbnails.

the same problem also occurs when
1. Upload some supported images.
2. Change primary image.
3. Upload another supported image(This image will not be visible in thumbnails).
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on March 14, 2016, 12:57:22 pm
Hi,

Confirmed. What theme are you using?

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: Syed on March 14, 2016, 01:13:22 pm
I am developing a new theme, it is based on bender theme.
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on March 15, 2016, 07:18:52 pm
@Syed, already fixed in next update 1.1.1 (pending of Market review).

Thanks for your input, regards
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on March 16, 2016, 01:12:44 pm
Hi,

That was quick...  :) Version 1.1.1 already available on the Market.

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: mandi007 on May 17, 2016, 07:46:24 pm
sir,
    does this plugin will work on modern theme version 3.4.3 . because some of the

allowed image extensions (jpg,jpeg) are saying message as"File has an invalid extension, it should be one of png,gif,jpg.", 

some times same images are accepted but showing as processing and no thumbnails are showing, if i click the post ad button than no image is uploaded.

how to solve this help me
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on May 17, 2016, 09:51:44 pm
Hi,

Modern 3.4.3? Are you sure that's the version of the theme, not Osclass? ??? Look in modern/index.php

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: SteveJohnson on May 18, 2016, 01:00:46 am
Hi Teseo,

Is there anyway we can reduce the intensity of the plugin. The lower resolution pictures seem to be pixelated with the plugin.

Thanks
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on May 18, 2016, 01:13:28 am
Hi,

Please give me a sample image where you notice that issue... ???

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: mandi007 on May 18, 2016, 09:01:33 am
Quote
sir,
    does this plugin will work on modern theme version 3.4.3 . because some of the

allowed image extensions (jpg,jpeg) are saying message as"File has an invalid extension, it should be one of png,gif,jpg.", 

some times same images are accepted but showing as processing and no thumbnails are showing, if i click the post ad button than no image is uploaded.

how to solve this help me
Modify message




sorry my mistake

it is osclass 3.4.3

modern theme 3.0.3

please tell me will this plugin works with this version
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on May 18, 2016, 12:23:02 pm
I'm afraid not, too old:

Quote
This plugin should be compatible with any theme that includes Ajax Uploader for images ("Click or drop for upload images").

This feature Ajax Uploader was introduced in Modern v. 4.0

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: mandi007 on May 18, 2016, 06:06:52 pm
ok will update my theme and report you back
Title: Re: [Plugin] Pre-resize Images
Post by: SteveJohnson on May 18, 2016, 06:13:43 pm
Hi,

Please give me a sample image where you notice that issue... ???

Regards

Here is one (there are a few more pictures which are pixelated a bit too much)


Title: Re: [Plugin] Pre-resize Images
Post by: teseo on May 18, 2016, 06:43:16 pm
But that's not the plugin fault, try disabling the plugin and you'll get same results. I guess it's something that should be fixed on Osclass core.

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: anuituanu on May 22, 2016, 01:16:27 am
thanks teseo
 ;D
work perfect on osclass 3.6.1 with OsclassWizards Free Responsive Theme v 2.0.4
(http://img.prntscr.com/img?url=http://i.imgur.com/VuFQk6U.png)

Title: Re: [Plugin] Pre-resize Images
Post by: SteveJohnson on May 22, 2016, 03:32:03 am
Teseo,

I just found something. Though the plugin works great on computers, when i  make a post using a mobile, i get this error -

"Warning : exif_read_data(qqfile_7547234.jpg) Illegal IFG size in ..../osclass/classes/imageresizer.php on line 59
Warning : exif_read_data(qqfile_7547234.jpg) Illegal IFG size in ..../osclass/classes/imageresizer.php on line 59
Warning : exif_read_data(qqfile_7547234.jpg) Illegal IFG size in ..../osclass/classes/imageresizer.php on line 59
Warning : exif_read_data(qqfile_7547234.jpg) Illegal IFG size in ..../osclass/classes/imageresizer.php on line 59"

Though the listing gets posted properly, but this error appears too.
Any ideas?
Thanks
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on May 22, 2016, 01:24:33 pm
Hi,

"Warning : exif_read_data(qqfile_7547234.jpg) Illegal IFG size in ..../osclass/classes/imageresizer.php on line 59
Thanks

First time I see that error. ??? At first glance, looks like a problem with a given image (EXIF information). Please specify browser and put here the original image that is provoking the error.

....

@anuituanu, you're most welcome. :)

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: yellow53 on May 30, 2016, 06:04:04 pm
Hi guys,

I have 3 osclass website, and all using Pre-resize Images plugin.
For 2 of these sites it's working 100% perfect.

For the third one, i'm having the same issue all time :

Warning: exif_read_data(qqfile_574c472e425a4.JPG): Illegal IFD size in /home/labour9/public_html/velos/oc-includes/osclass/classes/ImageResizer.php on line 59

Warning: exif_read_data(qqfile_574c472e425a4.JPG): Illegal IFD size in /home/labour9/public_html/velos/oc-includes/osclass/classes/ImageResizer.php on line 59


Do you know, where it could come from ?

all my osclass websites are using the same theme (flatter) with same plugin installed and same osclass version (3.6.1)


many thanks for you help
Vincent
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on May 30, 2016, 07:04:20 pm
Hi,

Check the message previous to yours (mine), I don't think that problem has anything to do with Osclass, but with a given image. ???

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: yellow53 on May 30, 2016, 10:13:53 pm
well, thanks for your reply, but i tried with around 20 different images.
So I don't think it's coming from here...

and these images are uploading correctly on my other osclass website.

any other idea which could help ? :)

thanks
vincent
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on May 30, 2016, 10:42:13 pm
I see. Please disable the plugin and repeat the test. No problems then?

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: yellow53 on May 30, 2016, 11:11:57 pm
i just tried after disable the plugin, and yes it's working well.

any idea?

Vincent
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on May 31, 2016, 01:47:36 am
 ???

Quote
all my osclass websites are using the same theme (flatter) with same plugin installed and same osclass version (3.6.1)

All three of them on the same server? ???

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: SteveJohnson on May 31, 2016, 06:37:58 pm
I'm facing a similar situation. It'd be great if there is a solution. For me, i see the error when using an ios mobile device
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on May 31, 2016, 07:34:48 pm
Hi,

As said, never saw this problem myself, but let's make a little experiment. Replace line 268 in oc-content/plugins/preResize_images/index.php:

Code: [Select]
includeExif:false,
with

Code: [Select]
includeExif:true,
Regards

Title: Re: [Plugin] Pre-resize Images
Post by: SteveJohnson on May 31, 2016, 07:48:17 pm

Code: [Select]
includeExif:false,with
Code: [Select]
includeExif:true,
Regards

Hi teseo,
Could you tell us what exactly does this change do (technically)?
Title: Re: [Plugin] Pre-resize Images
Post by: fog on May 31, 2016, 08:06:57 pm
hi, @stevejohnson on line : 268 on index.php file

Use notepad++ for find it

I not tried the plugin on live service... in soon I will do that.

Good plugin teseo  :)

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: SteveJohnson on May 31, 2016, 08:16:01 pm
hi, @stevejohnson on line : 268 on index.php file

Use notepad++ for find it

I not tried the plugin on live service... in soon I will do that.

Good plugin teseo  :)

Regards

That's not what i was asking Fog
Title: Re: [Plugin] Pre-resize Images
Post by: fog on May 31, 2016, 08:39:30 pm
Sorry my mistake.  :D

For part of your question, and is not a good answer by me to you, but you can find in jquery.fineuploader.min the code related.

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on May 31, 2016, 09:11:33 pm
Quote
Could you tell us what exactly does this change do (technically)?

Look for "exif' in Google ( sorry no internet connection right now)
Title: Re: [Plugin] Pre-resize Images
Post by: SteveJohnson on May 31, 2016, 11:41:40 pm
It appears EXIF is nothing but meta data about some file formats like jpeg, jpg. Well, nothing wrong in giving a shot. I'll try your test and reply here tomorrow.
Title: Re: [Plugin] Pre-resize Images
Post by: yellow53 on June 01, 2016, 12:30:09 am
Hi Teseo,

To reply to your question, yes it's the same server.

I just tried your solution and it's look like to work ;) great job !

many thanks
vincent
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on June 02, 2016, 03:36:48 pm
You're welcome. :) Waiting for the input of stevejohnson to release a new update of the plugin fixing this issue.

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: SteveJohnson on June 02, 2016, 08:39:44 pm
You're welcome. :) Waiting for the input of stevejohnson to release a new update of the plugin fixing this issue.

Regards

Hi teseo, pardon me for the delay. Right now i'm at work, give me 1 day and i will tell you.
(ps can't reply on PM, i don't know why the option to reply has been removed  :-\)
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on June 02, 2016, 09:01:38 pm
No problem, just want to confirm that yours is the same issue and this little modifcation fix it before releasing a new version.

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: SteveJohnson on June 05, 2016, 07:57:24 am
..the fix does not work for me teseo. I get the same errors.
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on June 05, 2016, 08:30:19 am
Hi,


"Warning : exif_read_data(qqfile_7547234.jpg) Illegal IFG size in ..../osclass/classes/imageresizer.php on line 59
Warning : exif_read_data(qqfile_7547234.jpg) Illegal IFG size in ..../osclass/classes/imageresizer.php on line 59
Warning : exif_read_data(qqfile_7547234.jpg) Illegal IFG size in ..../osclass/classes/imageresizer.php on line 59
Warning : exif_read_data(qqfile_7547234.jpg) Illegal IFG size in ..../osclass/classes/imageresizer.php on line 59"

Though the listing gets posted properly, but this error appears too.

Let's see, are we talking here about a mere warning and the images are indeed being published?

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: SteveJohnson on June 06, 2016, 01:26:04 am
That's correct. The image gets uploaded, resized, published... But when we push the publish button, a white screen with these errors appear.
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on June 06, 2016, 02:21:10 am
Make sure you have in your config.php:

Quote
define('OSC_DEBUG', false) ;
define('OSC_DEBUG_LOG', false);

so no warnings will be shown on frontside.

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: SteveJohnson on June 12, 2016, 10:05:31 pm
done, no errors now. thanks teseo
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on June 15, 2016, 12:43:01 pm
You're welcome.

Just released version 1.1.2 adding the original EXIF information to the resized images to address this latest issue.

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: sonerdinc on June 18, 2016, 03:24:46 pm
thank you for the plugin.
ı have problems with mobile image uploads.

ı  try Pre-resize Images.it's ok to upload but when ı publish it's going to white index page .therefore no images in the add
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on June 18, 2016, 04:55:26 pm
Hi,

May I see your site?

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: sonerdinc on June 18, 2016, 10:30:48 pm
alsat.tk

Title: Re: [Plugin] Pre-resize Images
Post by: teseo on June 18, 2016, 10:58:14 pm
Seems that you din't make the required modification on your theme item-post.php, look at the Help of the plugin.

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: sonerdinc on June 18, 2016, 11:29:48 pm
thnks for answer ı was trying someting else.
you can see it in action now from mobile.when ı try size 1,5 mb-2 mb size photo its going to white page
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on June 19, 2016, 12:25:13 am
Admin Dashboard / Settings / Media, which are your values for "Maximum size" (Current and max allowed)? ???
Title: Re: [Plugin] Pre-resize Images
Post by: dev101 on June 20, 2016, 02:03:20 am
FU is free again :)
Title: Re: [Plugin] Pre-resize Images
Post by: sonerdinc on June 20, 2016, 11:51:07 am
yes it 's ok.media size is 2048 kb in dashboard.(php limit) (alson in my another web site its 8 mb)
as ı say the plugin upload photo but when ı try to publish it's going to white index page.
Title: Re: [Plugin] Pre-resize Images
Post by: sonerdinc on June 24, 2016, 05:35:35 pm
ı couldn't find a solution for mobile image upload problem  :(
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on June 24, 2016, 05:49:57 pm
I think you have something wrong on your installation or you don't have enough memory to handle your images. ??? In any case, it's not the plugin fault, so this is all I can do for you.

@dev101: Thanks for the info, I'll take that into account for next update.

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: sonerdinc on June 25, 2016, 12:14:40 pm
I think you have something wrong on your installation or you don't have enough memory to handle your images. ??? In any case, it's not the plugin fault, so this is all I can do for you.

Regards

thanks for answer.

it's happening just on mobile.yes,it's not the plugin fault.
Title: Re: [Plugin] Pre-resize Images
Post by: Pirulina on June 27, 2016, 10:23:11 pm
so far  includeExif:false, did the trick.



from true to false... now , zero illegal IFD and such.


Regards. Thanks teseo.
Title: Re: [Plugin] Pre-resize Images
Post by: Anvar.in on June 28, 2016, 01:58:06 am
Hello Tesro,

There have any hope for changing the primary image from the admin panel..

Can you help me how to edit manually from the mysql database.
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on June 28, 2016, 01:32:11 pm
Hi everyone,

so far  includeExif:false, did the trick.

from true to false... now , zero illegal IFD and such.

 :o

So, looks like depending on the server setup, both presence and absence of EXIF may provoke problems? ??? Then I'm thinking that the best strategy will be to make this a configurable setting on the plugin...

There have any hope for changing the primary image from the admin panel..

Can you help me how to edit manually from the mysql database.

This is not the plugin domain. For the frontside there is this old plugin, Picture Director, for Admin there's no other way than alter the database directly. Here's how you may do that:

Run this query in PhpMyAdmin:

Quote
SELECT * FROM oc_t_item_resource WHERE fk_i_item_id = [Ad ID]

(Change here [Ad ID] -and table prefix oc_ if your tables have other).

Now, the primary image is determined by the lowest pk_i_id value, you need to manually switch the ID's: lowest pk_i_id <=> new primary pk_i_id.

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: SyrianDealer on June 28, 2016, 07:00:48 pm
Dear Teseo,
regrettably I did everything as in instructions , but still if the PHP LIMIT less than picture size , not allow to upload
I use Glider theme
please advise

best regards,

Title: Re: [Plugin] Pre-resize Images
Post by: teseo on June 28, 2016, 07:34:22 pm
Hi,

but still if the PHP LIMIT less than picture size , not allow to upload

I'm afraid that's normal and unavoidable, you still need to be able to handle images as if the plugin wasn't there. Ask your hosting to raise upload limits.

Regards

Title: Re: [Plugin] Pre-resize Images
Post by: SyrianDealer on June 28, 2016, 07:40:42 pm
thank you teseo
my PHP limit is up to 32000 but I have specified 2048
you mean that normal to maximize the limit and after upload your plugin will resize?

best regards,
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on June 28, 2016, 08:27:57 pm
my PHP limit is up to 32000 but I have specified 2048
you mean that normal to maximize the limit and after upload your plugin will resize?

Then you can't upload images bigger than 2MB, raise up that limit.

Osclass core code running in parallel to the plugin still needs to analyze the original image, and anyway, if your user is using some old browser like Internet Explorer 8, the plugin won't have any effect and you need to be able to handle the original image.

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: sonerdinc on July 06, 2016, 01:23:38 pm
ı notice that ,there is no "mobile image upload problem" when watermark is not on ..any advice or personal experiences?
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on July 06, 2016, 04:11:22 pm
Hi,

At first glance looks more like memory problems. ??? Enable debug:

https://doc.osclass.org/Debug_PHP_errors

Keep watermark and upload from mobile, then open /oc-content/debug.log to check for errors.

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: Aficionado on July 26, 2016, 10:17:50 pm
Hi,

At first glance looks more like memory problems. ??? Enable debug:


Since i have that error also, YES it seems like a short memory problem, since it happens once in a while ONLY to my multicountry Osclass and not to the others.

Title: Re: [Plugin] Pre-resize Images
Post by: p206ab on July 29, 2016, 11:24:09 am
Thanks teseo, this looks great. But for some reason, I get an error about wrong format of the file, should be .jpg, .png of gif, but the file I'm attaching is .jpg?

I've found the solution to this problem. It was not my custom modifications, it was the core itself. I had older version of Osclass (3.4.2) and it displayed this error, but when updated to 3.6.1 it works great. Now all I need is to figure out what else I edited so I can do it again in 3.6.1 ;)
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on July 29, 2016, 02:28:47 pm
Hi,

Thanks teseo, this looks great. But for some reason, I get an error about wrong format of the file, should be .jpg, .png of gif, but the file I'm attaching is .jpg?

I've found the solution to this problem. It was not my custom modifications, it was the core itself. I had older version of Osclass (3.4.2) and it displayed this error, but when updated to 3.6.1 it works great.

I'll study that issue to include a warning on the plugin info.

Quote
Now all I need is to figure out what else I edited so I can do it again in 3.6.1

For that I recommend using the free WinMerge (http://winmerge.org/) program. It'll show you the differences between files in two folders.

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: p206ab on July 29, 2016, 02:55:37 pm
Hi,

Thanks teseo, this looks great. But for some reason, I get an error about wrong format of the file, should be .jpg, .png of gif, but the file I'm attaching is .jpg?

I've found the solution to this problem. It was not my custom modifications, it was the core itself. I had older version of Osclass (3.4.2) and it displayed this error, but when updated to 3.6.1 it works great.

I'll study that issue to include a warning on the plugin info.

Quote
Now all I need is to figure out what else I edited so I can do it again in 3.6.1

For that I recommend using the free WinMerge (http://winmerge.org/) program. It'll show you the differences between files in two folders.

Regards

Awesome, that'll make things easier, thanks teseo! :)
Title: Re: [Plugin] Pre-resize Images
Post by: fais on August 13, 2016, 02:43:56 pm
Hi Teseo

Please help me my website has the invalid extention problem when you edit and upload images.

Here is the screenshot http://prntscr.com/c56m0z

Thanks in advance

Fais
Title: Re: [Plugin] Pre-resize Images
Post by: Andreas on September 28, 2016, 04:31:55 pm
Hello I use OSClassWizards theme and wonder
if you can somehow get to autorotate the picture with
Pre-resize images
when the users published the ad

Thanks in advance
and for a good plugin  :)
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on September 28, 2016, 06:01:28 pm
Hi,

Auto-rotation is only possible if the image itself includes instructions to do that (orientation in EXIF metadata). Is this what you are referring to? Because rotation on demand is not possible...

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: Andreas on September 28, 2016, 11:05:11 pm
Ok
but can you add a button to rotate image when it is uploaded ?
see image
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on September 28, 2016, 11:18:55 pm
Sorry, this plugin extends vanilla Fine Uploader plugin to compress original images, Fine Uploader doesn't include any other manipulation feature.

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: Andreas on September 28, 2016, 11:37:12 pm
ok thank you for the fast reply
Regards
Title: Re: [Plugin] Pre-resize Images
Post by: smartbingari on October 01, 2016, 05:16:09 pm
I need Help, the Plugin work on my bender theme but after installing another theme i get error file has invalid extension, it should be one of png, gif, jpg, jpeg and i have tried different images with all those extension but couldn't get it. i need help
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on October 01, 2016, 07:29:17 pm
Hi,

What theme is that?

Regards
Title: Re: [Plugin] Pre-resize Images
Post by: smartbingari on October 01, 2016, 07:41:33 pm
Hi,

What theme is that?

Regards

It's a mobile theme http://www.osclassmobile.com
Title: Re: [Plugin] Pre-resize Images
Post by: gnoe on October 25, 2016, 04:40:30 pm
Hi teseo,
is it possible to make this plugin compatible with Mcfly theme.
It doesn't use Fine Uploader but Dropzone.js

Regards.
Title: Re: [Plugin] Pre-resize Images
Post by: teseo on October 25, 2016, 04:46:01 pm
Hi,

I'm afraid that's not possible, this is a mod for Fine Uploader.

Regards
Title: Re: Pre-resize Images 2.0.0 (Major upgrade)
Post by: teseo on December 21, 2016, 03:19:50 pm
Hi,

Released v. 2.0.0, big enhancements:

Quote
Changelog:
 
Version: 2.0.0 (2016.12.14)
+ Upgrade to Fine Uploader 5.11.10 (MIT license).
+ Much better resizing of images by using Pica library (MIT license).
+ Now images to be uploaded are fully sortable by dragging thumbnails.
+ Support for Decent Mobile Theme plugin.
+ Added languages folder for translation of plugin specific strings.
+ Fixed a bug affecting proper rotation of images including EXIF orientation.
- Discarded embedding of original EXIF information of the images.

Now with the latest Fine Uploader going back to free license (MIT) and with a new mechanism to allow using a external library for resizing images, I've added Pica (https://github.com/nodeca/pica) to obtain perfect-looking final images even with the default maximum dimension of 1280 pixels (see attachments).

Also, no more "Make Primary image", now all freshly uploaded images are fully re-arrangeable (By "freshly" I mean that on Edit Ad, you only can do that for new images).

Enjoy!

Best regards
Title: Re: [Plugin] Pre-resize Images (v. 2.0.0 released, major update)
Post by: dollar4all on December 21, 2016, 06:28:08 pm
The plugin generated 1 characters of unexpected output during the installation. Output: " "  .. I can not install
Title: Re: [Plugin] Pre-resize Images (v. 2.0.0 released, major update)
Post by: teseo on December 21, 2016, 07:10:08 pm
Hi,

No, I still don't know what is provoking that with some plugins ??? but the plugin should have been installed anyway, please check again.

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.0.0 released, major update)
Post by: Aficionado on December 21, 2016, 09:54:36 pm
The plugin generated 1 characters of unexpected output during the installation. Output: " "  .. I can not install

Installs just fine, that error has been there for ages for many plugins (random) and doesn't seem to harm.
Title: Re: [Plugin] Pre-resize Images (v. 2.0.0 released, major update)
Post by: teseo on December 21, 2016, 10:02:57 pm
At last I've found it. :D index.php of the plugin ends like this:

Quote
?>[space]

That sneaky space is to blame for the infamous 1 characters of unexpected output during the installation. Output: " " :D

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.0.0 released, major update)
Post by: dollar4all on December 22, 2016, 08:24:51 am
At last I've found it. :D index.php of the plugin ends like this:

Quote
?>[space]

That sneaky space is to blame for the infamous 1 characters of unexpected output during the installation. Output: " " :D

Regards

Thank you. worked perfectly  :)
Title: Re: [Plugin] Pre-resize Images (v. 2.0.0 released, major update)
Post by: teseo on December 22, 2016, 02:33:44 pm
You're welcome. Anyway, it's a purely aesthetic matter, the plugin is correctly installed regardless that scary notice. ;)

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.0.0 released, major update)
Post by: buninsan on December 22, 2016, 10:21:13 pm
Hello.
Sorry, I write through a translator.
osclass 3.6.1
after the last update stopped working rss feed.
I had to be rolled back.
Title: Re: [Plugin] Pre-resize Images (v. 2.0.0 released, major update)
Post by: teseo on December 22, 2016, 10:51:18 pm
Hi,

I don't know how the plugin could be related to that problem, I've done the test here and normal RSS seems to be working fine (/search/sFeed,rss/category,cars). ??? Maybe are you using some plugin for RSS? ???

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.0.0 released, major update)
Post by: buninsan on December 23, 2016, 02:16:46 pm
I use a lot of plug-ins.
Weekend try to understand.
Title: Re: [Plugin] Pre-resize Images (v. 2.0.0 released, major update)
Post by: Henrich on December 27, 2016, 04:31:43 am
Hello,

thank you for great plugin.

I have a little problem with installing this version. It seems it is installed and it works but I get this message.

And also I want able to just update it automatically because I've got message that it is paid plugin and I should buy it first.

Thank you

Title: Re: [Plugin] Pre-resize Images (v. 2.0.0 released, major update)
Post by: teseo on December 27, 2016, 01:15:23 pm
Hi,

There's already a hotfix (v 2.0.1) waiting for approval on the market. In the meantime, you can download v 2.0.0 from here:

https://market.osclass.org/plugins/miscellaneous/pre-resize-images_496

Uncompress, edit index.php to delete that space after last ?> and upload to your server, oc-content/plugins.

If you already have a previous version, that would be all. In case contrary, Install.

Regards

PS.- The plugin is free, so the automatic update should work. If not so, it's a Market issue, I can't do anything about it. ???
Title: Re: [Plugin] Pre-resize Images (v. 2.0.0 released, major update)
Post by: buninsan on December 27, 2016, 01:26:52 pm
site.com/feed
-------------------------------------------
This page contains the following errors:

error on line 1 at column 7: XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error.
--------------------------------------------------------
localhost
site.com/feed
--------------------------------------------------------
Warning: Cannot modify header information - headers already sent by (output started at Z:\www\oc-content\plugins\preResize_images\index.php:339) in Z:\www\oc-includes\osclass\controller\search.php on line 562
Title: Re: [Plugin] Pre-resize Images (v. 2.0.0 released, major update)
Post by: teseo on December 27, 2016, 01:51:12 pm
Hi,

Quote
Warning: Cannot modify header information - headers already sent by (output started at Z:\www\oc-content\plugins\preResize_images\index.php:339) in Z:\www\oc-includes\osclass\controller\search.php on line 562

Likely the same problem that is provoking the message "The plugin generated 1 characters of unexpected output..." on install. Follow the procedure described on my previous post.

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.0.0 released, major update)
Post by: buninsan on December 27, 2016, 03:52:42 pm
Ok. Thank you.
Title: Re: [Plugin] Pre-resize Images (v. 2.0.0 released, major update)
Post by: teseo on December 28, 2016, 04:24:45 pm
Hi,

v. 2.0.1 with a hotfix addressing this problem is already available in the Market:

https://market.osclass.org/plugins/miscellaneous/pre-resize-images_496

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.0.0 released, major update)
Post by: xop32 on January 08, 2017, 01:20:45 am
hello Tesco

I was just wondering if you ever do freelance work on osclass based sites, I am currently looking for someone to help me on a project
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: teseo on January 23, 2017, 04:36:44 pm
Hi,

Already available update 2.1.0:

Quote
Changelog:

+ Fixed Drag & Drop images on Microsoft IE 11 / Edge (Thanks to developerchris :)
+ Restored "Make Primary Image" buttons (only on Publish Ad).
+ Fixed bug on Edit Ad when Decent Mobile Theme plugin is used.

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: dev101 on January 24, 2017, 11:53:29 pm
Thanks teseo, really nice update! ;)
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: SmaRTeY on March 03, 2017, 04:35:59 pm
Hi teseo,

can you have a look at the deletion of uploaded files in latest version?
After uploading 5 files with ad, deleting two again I can see in tmp folder still all 5 uploaded files, they are not removed.

In code I see you call the Osclass "delete_ajax_upload" in url but when looking at Osclass ajax.php it also needs a parameter called "qquuid" to actually delete the uploaded file in the temp folder. I messed around with the url string by adding "&qquuid=" but I haven't been succesful in getting the right filename/id when deleting an image.


Regards,
Eric
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: teseo on March 03, 2017, 07:23:10 pm
Hi Eric,

Couldn't see any issue here, when I click on Delete on the frontside, the file in /oc-content/uploads/temp is immediately deleted... ???

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: dev101 on March 04, 2017, 02:32:55 am
Even if not deleted (could be permissions/user issue), cron should take care of them in an hour or two, eventually.
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: SmaRTeY on March 04, 2017, 03:27:22 am
Hmmm weird.

Uploads/tmp folder is owned by apache and has correct rights.

If I upload images they appear in uploads/temp folder as expected.
When I upload three images at once and I do not publish the ad and start removing the images I just uploaded only 1 out of three is removed from temp folder. -> Not good.

Now if I upload only 1 image, do not publish ad and remove image again the image is indeed removed from the temp folder. -> Good
 
Scenario Publish Ad:
Upload images -> I do publish ad -> OK - all images have been moved from temp folder to image folder and ad is published -> Good

Scenario Edit Published:
Edit published ad, removing images OK - images are removed from image folder -> Good

Now, I am pretty sure if 1 gets deleted or all get moved there is no issue of folder rights/ownership.
The issue is ONLY happening when uploading more than 1 image and in all cases only 1 image really gets deleted and all others are not removed from temp folder.


Regards,
Eric

Hi Eric,

Couldn't see any issue here, when I click on Delete on the frontside, the file in /oc-content/uploads/temp is immediately deleted... ???

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: SmaRTeY on March 04, 2017, 03:30:08 am
:)

As for the cron cleaning, I wasn't aware of that.
Should that also work with auto-cron turned off using a serverside cron?

Asking because I noticed the load of files in my temp folder after having messing around with ads and images while testing whole system looking for PHP warnings/notices to get rid of.


Regards,
Eric

Even if not deleted (could be permissions/user issue), cron should take care of them in an hour or two, eventually.
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: dev101 on March 04, 2017, 01:38:24 pm
Yes, cron is cron, however triggered.
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: SmaRTeY on March 04, 2017, 07:44:59 pm
Thanks dev, meaning even if bug in system it would not be flooded with left-over files. (http://forums.osclass.org/Smileys/default/grin.gif)

With regard to cron I have other finding/question.
I have seen plugins that make use of the Osclass 'cron' hooks but found that these will *not* run if you have disabled the auto-cron in Admin and using a server cron for Osclass jobs. So in short, the Osclass cron created on server-side does run but somehow plugin that hooks into an Osclass cron is not triggered. Is this correct?

Yes, cron is cron, however triggered.
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: dev101 on March 05, 2017, 01:51:46 am
Hi SmaRTeY,

I think I might found a "bug" in cleanup function, which, under certain conditions, might return "wrong" values. Do you still keep your rogue qq files on your server, if you do I'd like you to run some simple test? update: never mind, I have figured it out, will propose some changes to the cron file.

Sorry, just haven't much time lately, so I just "glide" through forum posts, obviously skipping messages:

Quote
With regard to cron I have other finding/question.
I have seen plugins that make use of the Osclass 'cron' hooks but found that these will *not* run if you have disabled the auto-cron in Admin and using a server cron for Osclass jobs. So in short, the Osclass cron created on server-side does run but somehow plugin that hooks into an Osclass cron is not triggered. Is this correct?

I have no idea, care to elaborate? I don't see how this can happen, cron mechanism is a simple hook system where functions are triggered, if they are properly "hooked" and still do not work, something else might be wrong with them (assuming you are sure cron ran (past tense) in the first place).
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: SmaRTeY on March 05, 2017, 12:43:11 pm
Cool, something to benefit :)

Quote
I have no idea, care to elaborate? I don't see how this can happen, cron mechanism is a simple hook system where functions are triggered, if they are properly "hooked" and still do not work, something else might be wrong with them (assuming you are sure cron ran (past tense) in the first place).
Sure, I will have to dig in a little to be able to elaborate more but will do so. I 'solved' the issue in the mean time by taking it out of the cron-hook and use on of the hooks when someone visits the site.

Thanks
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: dev101 on March 05, 2017, 01:03:49 pm
Quote
and use on of the hooks
:) ? (don't understand what you mean by this)

In any case, I always disable auto-cron on production servers, as I do not wish to collide or shift my custom/precise definitions in the server's crontab.

P.S.
here's the fix/finding of the "bug": https://github.com/osclass/Osclass/pull/2136
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: SmaRTeY on March 06, 2017, 01:36:55 am
Thanks dev!

Quote
and use on of the hooks
Should be: and use onE of the hooks :)

Elaboration of cron-hook will follow a bit later, for now working on some other changes.
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: Veromon on May 04, 2017, 01:01:32 am
Hi Teseo, after last osclass upgrade (i think 99%), your plugin not working from mobiles. I tried to uninstall/install the plugin, change php version ...etc, but i recive this error when i upload any image "Failed to scale". From deskop is working fine.
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: teseo on May 04, 2017, 01:48:44 pm
Hi,

That's latest Osclass 3.7.3? Have you tried with different mobile devices?

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: TangoX on May 04, 2017, 05:39:07 pm
@Teseo Any chance of getting an update to the latest Fine Uploader (https://github.com/FineUploader/fine-uploader/releases) and Pica (https://github.com/nodeca/pica) versions?

Thanks!
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: Veromon on May 04, 2017, 11:15:55 pm
Tested with 2 phones:

Samsung S5 - is working fine with Chrome and Default browser "Internet"
Samsung S6 - is working fine with Chrome and the error appear only in Default browser "Internet" - with plugin disabled, is working fine with both.

Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: teseo on May 07, 2017, 01:47:50 pm
@Veromon,

What can I tell you?  :( You can see there how an older device works fine while the newest is failing. I'm afraid Android Stock Browser is a real nightmare for any programmer (just take look at this page (http://slides.com/html5test/the-android-browser#/)).

In fact in the Scaling page of the Fine Uploader docs (Scaling is the key feature for this plugin), they state:

Quote
Supported Browsers

This feature is supported on all browsers other than IE9 and older, Android 2.4 or older, and Safari 5.1 or older. Note that Android's stock browser is also not supported, due to multiple long-standing bugs in that browser with Blobs and data URIs. Chrome on Android is supported, though.

All I could do is to disable the plugin if Android Stock browser is detected (and even that looks quite difficult, seems that there's no real standards for this browser) :(

Any chance of getting an update to the latest Fine Uploader (https://github.com/FineUploader/fine-uploader/releases) and Pica (https://github.com/nodeca/pica) versions?


I'll consider this for the next update.

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: Veromon on May 09, 2017, 10:25:07 pm
I understand, thank you for your time.
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: SteveJohnson on May 11, 2017, 06:01:03 am

All I could do is to disable the plugin if Android Stock browser is detected (and even that looks quite difficult, seems that there's no real standards for this browser) :(


..sounds like a fairly good solution Teseo. Thanks.
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: yeribel on May 18, 2017, 07:29:40 pm
Hi, How can I Turn the "Post image" to responsive.

When user try to upload photos, that part is hard in cellphones
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: teseo on May 19, 2017, 12:27:55 pm
Hi,

For that you need to modify your theme, nothing to do with this plugin.

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: lii240 on June 06, 2017, 07:26:23 pm
Is there any way to change the text "Click or drop for upload images"?
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: teseo on June 06, 2017, 08:16:09 pm
Hi,

See here:

https://forums.osclass.org/general-help/translation-of-'click-or-drop-for-upload-images'/

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: beginner on August 19, 2017, 03:39:06 pm
Hello,

I've tested this pluging with my osclass 3.4.3 bender, I have a problem :"File has an invalid extension, it should be one of png,gif,jpg,jpeg."

there is nothing on debug.log

thx
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: teseo on August 19, 2017, 04:23:52 pm
Hi,

https://market.osclass.org/plugins/miscellaneous/pre-resize-images_496

Quote
Compatibility: v3.5.0 - v3.7.4

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: beginner on August 19, 2017, 05:09:52 pm
thanks you
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: teseo on August 19, 2017, 08:25:06 pm
It occurs to me that if you can't upgrade Osclass because of massive modifications in core files, you could backport a bit of latest Osclass version code to make this plugin work.

oc-includes/osclass/classes/Scripts.php

Replace this function almost at the end of the script:

Code: [Select]
    /**
     *  Print the HTML tags to load the scripts
     */
    public function printScripts()
    {
        foreach($this->getScripts() as $script) {
            echo '<script type="text/javascript" src="' . $script . '"></script>' . PHP_EOL;
        }
    }

with:

Code: [Select]
    /**
     *  Print the HTML tags to load the scripts
     */
    public function printScripts()
    {
        foreach($this->getScripts() as $script) {
            echo '<script type="text/javascript" src="' . osc_apply_filter('theme_url', $script) . '"></script>' . PHP_EOL;
        }
    }

That should do it, regards
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: Aficionado on August 22, 2017, 08:13:43 pm
Teseo, any idea why all photos processed by your plugin become redish (a lot of red color) ?

Also with Firefox it works a bit strange (shaking) when selecting with drag and drop.

All images i tried.

Thanks

Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: teseo on August 22, 2017, 08:29:09 pm
Hi,

Quote
any idea why all photos processed by your plugin become redish (a lot of red color) ?

??? Weird, never seen that effect, as far as I can see the uploaded images are pretty much the same, color is all right.

Quote
Also with Firefox it works a bit strange (shaking) when selecting with drag and drop.

Yes, looks like latest versions of Firefox are provoking that issue:

https://github.com/FineUploader/fine-uploader/issues/1862

Regards

Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: Aficionado on August 22, 2017, 08:33:08 pm
Hi,

Quote
any idea why all photos processed by your plugin become redish (a lot of red color) ?

??? Weird, never seen that effect, as far as I can see the uploaded images are pretty much the same, color is all right.


You mean the images i uploaded here look the same color ?
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: teseo on August 22, 2017, 08:41:10 pm
No, indeed they are different, but I've just attached your original image to an ad on my installation and it's still all right, no reddish effect. ???

Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: Aficionado on August 22, 2017, 08:48:08 pm
No, indeed they are different, but I've just attached your original image to an ad on my installation and it's still all right, no reddish effect. ???

Well i have uploaded 10+ images from various sources and all appear red-ish. Tried both GD and Imagick, same problem.

Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: Aficionado on August 22, 2017, 09:11:47 pm
No, indeed they are different, but I've just attached your original image to an ad on my installation and it's still all right, no reddish effect. ???

Believe it or not, it is a Firefox only thing maybe from an addon. Damn. Chrome and Edge 100% right colors and all.

Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: Liath on August 22, 2017, 09:37:35 pm
do you have firefox 55.x or the nightly 57.x?


mozilla announced alot of changes for 57... but its only available as nightly version
https://www.mozilla.org/en-US/firefox/nightly/all/


maybe the error dont appear there
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: Aficionado on August 22, 2017, 09:45:06 pm
do you have firefox 55.x or the nightly 57.x?


mozilla announced alot of changes for 57... but its only available as nightly version
https://www.mozilla.org/en-US/firefox/nightly/all/


maybe the error dont appear there

No 55, 64 bit. I'm only following the official channel as all users do.
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: Aficionado on August 22, 2017, 09:51:34 pm
Thanks teseo for the plugin. Didn't had a use/need for it, until now.

Works great, again thank you very much. For everything you do here.

Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: Aficionado on August 22, 2017, 11:15:25 pm
do you have firefox 55.x or the nightly 57.x?


mozilla announced alot of changes for 57... but its only available as nightly version
https://www.mozilla.org/en-US/firefox/nightly/all/


maybe the error dont appear there

It is not a Firefox only problem Liath. Edge has problems also. The problem is that apparently we run a tired script, imho, called Osclass.

 ::)

Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: teseo on August 23, 2017, 01:35:09 pm
@aficionado: Too kind, thanks.

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: jose_portilla on August 24, 2017, 06:59:46 pm
Hi all.

i have installed Pre-resize images with veronika theme, but it not works.  when you want to publish an Item the "click or drop images" disapears from the publish page.

can you help me please.

Note: i follow carefully the plugin setting instructions.
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: teseo on August 25, 2017, 03:53:26 pm
Hi,

Sorry, looks like this plugin and Veronika theme might not be compatible.

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: jose_portilla on August 25, 2017, 06:31:18 pm
Thanks Teseo. :-[

Can you list all themes wich are compatible?

Especially Premium themes.

Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: teseo on August 25, 2017, 06:37:48 pm
That's not possible, a lot of premium themes out there and I couldn't buy them all just to test a free plugin... :D

Sometimes theme developers introduce their own modifications to standard Fine Uploader module, that might be the issue here. ???

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: frosticek on August 26, 2017, 12:03:04 am
Plugin generate javascript errors on a lot of themes, even there are no modifications on script of fine uploader and all the javascripts are added using osclass register function  ;)
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: SmaRTeY on August 26, 2017, 01:45:14 am
Maybe it is Osclass/theme using older libs related?
I remember having upgraded some scripts on my own and both Bender and my other theme are doing great with the pre-resizer plugin besides some smaller bugs which are being taken care of.

Plugin generate javascript errors on a lot of themes, even there are no modifications on script of fine uploader and all the javascripts are added using osclass register function  ;)
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: Aficionado on August 30, 2017, 12:50:51 pm
Some warnings/notices:

[28-Aug-2017 06:29:24 Europe/London] PHP Notice:  Undefined index: name in /home/oc-content/plugins/preResize_images/index.php on line 43

[30-Aug-2017 07:08:41 Europe/London] PHP Warning:  Invalid argument supplied for foreach() in /home/oc-content/plugins/preResize_images/index.php on line 68
Title: Re: [Plugin] Pre-resize Images (v. 2.1.0 released)
Post by: teseo on August 30, 2017, 02:16:52 pm
Thanks, will be fixed in the next update.

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: teseo on September 05, 2017, 01:39:03 pm
Hi,

Version 2.2.0 already available on the Market:

https://market.osclass.org/plugins/miscellaneous/pre-resize-images_496

   + Upgrade to Fine Uploader 5.15.0
   + Fixed Image Orientation bug when multiple images are being selected.
   + Optimization of scripts loading.
   + Several bugs fixed.

All the problems on Edit Ad should be addressed now. Also, PHP warnings and notices shouldn't appear anymore. Thanks to SmaRTeY and dev101 for their kind assistance. :)

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: Aficionado on September 07, 2017, 12:29:30 am
The latest update seems to freeze for a while Firefox. Works with difficulty.
Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: Aficionado on September 07, 2017, 11:14:13 am
Also Edge doesn't work at all.

Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: m6mmi on September 07, 2017, 11:39:07 am
Good update, teseo please make premium version of the plugin where it would be possible to change primary image and image order when editing listings.

We´re receiving so many letters from customers who hate the fact that they have to delete all images if they want to reorder images.
Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: teseo on September 07, 2017, 01:51:08 pm
Hi,

The latest update seems to freeze for a while Firefox. Works with difficulty.

There are problems with Drag & Drop on latest Firefox version (as we discussed in other thread, I think), flickering and not always working the first time, but it's the same with the previous Pre-resize 2.1.0. Please provide more details.

Regarding Edge, I don't have it, but Smartey was beta-testing using it and he said to me that everything is fine there... ??? I'll contact him again.

Good update, teseo please make premium version of the plugin where it would be possible to change primary image and image order when editing listings.

We´re receiving so many letters from customers who hate the fact that they have to delete all images if they want to reorder images.

Unfortunately once some images are already stored in the database, the process to reorder the images is totally different, you'd need a whole different plugin. There's this old plugin, Picture Director (https://forums.osclass.org/plugins/(new-plugin)-picture-director/) aimed to do that.

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: Aficionado on September 07, 2017, 01:57:53 pm

Regarding Edge, I don't have it, but Smartey was beta-testing using it and he said to me that everything is fine there... ??? I'll contact him again.

Regards

Checked once more a few minutes ago (just to be 100% sure) and it doesn't do anything. Doesn't work.

Apparently this is due to the uploader script. Pitty. Damn browsers. They force us to use Chrome and i don't want to do that.

Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: SmaRTeY on September 07, 2017, 06:41:08 pm
Hi Aficionado,

see if your edge works on my website, I'll email you a test account so you can try to upload some images using Edge.
I recently (yesterday) added a new ad with Edge and I am using (only) Edge but it also works fine for me using FF.

All I can say is that the plugin works fine in my setup, there were some minor issues but Teseo fixed those and all = A-OK. The thing is, there are more possible issues in a theme/system than only the plugin but that doesn't Always mean the plugin is not working correctly. In this case all I can say is that it works for me and if it works for me it should work for others as well.

I'm on Windows 10 Home with Edge, I haven't tried IE11 but I am pretty sure it will work just fine. Also using the plugin with my Windows mobile Phone (Edge) works great.

Whatever is bugging you, you never know a 100% but I'm pretty sure it is related to something else.


P.s. if you value a little privacy better not use Chrome, feels like 'legit' spyware to me having read the Google 'terms'.


Regards,
Eric


Regarding Edge, I don't have it, but Smartey was beta-testing using it and he said to me that everything is fine there... ??? I'll contact him again.

Regards

Checked once more a few minutes ago (just to be 100% sure) and it doesn't do anything. Doesn't work.

Apparently this is due to the uploader script. Pitty. Damn browsers. They force us to use Chrome and i don't want to do that.
Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: Aficionado on September 07, 2017, 07:58:02 pm
Eric,

I will test your site, but i don't think Edge works with drag'n'drop upload, with or without Teseo's plugin.

I have tested a virgin Bender also and it just doesn't work.

About Chrome: i never use Chrome because i also use ALL Google services (Adsense, Adwords) and i don't want Google to relate all that info. I always use Firefox for years now, but it seems 55 version is broken (in many areas).

Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: Aficionado on September 07, 2017, 08:44:02 pm
Tested it at Eric's site with Edge. Same behavior as mine (of cource).

If you try to drop the image inside the area, it doesn't work. IF you play with it, until GREEN hover shows, it may work. Actually you need to drop the image BELOW the actual area and that is something users don't know and they will fail.

(as we talked with Eric, a bigger area would help and also some kind of message for the users would help. Some message telling them how it works, that GREEN should show and then drop the image. or something like that)
Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: SmaRTeY on September 07, 2017, 10:25:40 pm
It's working ok, a bigger drop area might be a good improvement but anyway you can see it in action here: https://youtu.be/6bxfcLbvdDM

8)
Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: Aficionado on September 08, 2017, 12:53:02 am
It's working ok, a bigger drop area might be a good improvement but anyway you can see it in action here: https://youtu.be/6bxfcLbvdDM

8)

It is strange because in your video seems to work fine. When i tried your site, Edge didn't do so well.

who knows ....

Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: teseo on September 08, 2017, 04:11:28 pm
Hi,

Maybe you two have a different version of Edge? ???

I've managed to solve the issue on latest Firefox (flickering). I'll upload an update to the Market soon, still waiting to see if I'm able to do something about this other issue described in this thread (https://forums.osclass.org/general-help/image-distortion-after-upload-like-picasso). BTW, it would be most useful if more people could do some testing using Chrome on Android with large images and provide feedback.

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: Aficionado on September 08, 2017, 05:20:15 pm
Hi,

Maybe you two have a different version of Edge? ???


I'using Microsoft Edge 40.15063.0.0 (Microsoft EdgeHTML 15.15063) 64bit. This is the latest available.

Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: Aficionado on September 10, 2017, 12:17:59 pm
How about this (instead of the current drag and drop script used in the plugin and Osclass):

http://www.plupload.com/

Not sure if there are any licensing issues .....
Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: SmaRTeY on September 12, 2017, 02:21:02 pm
Interesting, there are more but this one does not seem to have the option for users to 'move' uploaded images and/or set a primary image which I think is added value for users uploading their images.

How about this (instead of the current drag and drop script used in the plugin and Osclass):

http://www.plupload.com/

Not sure if there are any licensing issues .....
Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: Aficionado on September 12, 2017, 02:29:38 pm
Interesting, there are more but this one does not seem to have the option for users to 'move' uploaded images and/or set a primary image which I think is added value for users uploading their images.

How about this (instead of the current drag and drop script used in the plugin and Osclass):

http://www.plupload.com/

Not sure if there are any licensing issues .....

Eric what is important IMHO is the "right" selection of a script like this. What Osclass currently use seems abandoned somehow at Github (they are looking for a maintainer).

So features are not so important, but the script's "future" is.

I 'm not an expert in all this, but i am an expert in research and in "trending". I always look what others do in my field and i try to follow (if i can).

What i posted above seems to be used by Wordpress. And i NEVER had any problems with WP drap/drop and uploads.

Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: teseo on September 12, 2017, 03:44:55 pm
Hi guys,

How about this (instead of the current drag and drop script used in the plugin and Osclass):

http://www.plupload.com/

Not sure if there are any licensing issues .....

Sorry, not an option for me, that would mean to build a completely different plugin.  :o

Anyway, @SmaRTeY, what's your Edge version on desktop? ???

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: Aficionado on September 12, 2017, 03:52:18 pm
Hi guys,

Sorry, not an option for me, that would mean to build a completely different plugin.  :o


I'm not asking for something like that. Just saying ....
Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: SmaRTeY on September 13, 2017, 02:53:40 am
Hi teseo,

Afaik simply latest version.

Desktop Edge:
- Microsoft Edge 40.15063.0.0
- Microsoft EdgeHTML 15.15063

It also works fine on my Windows Mobile 10 (Edge).


Regards,
Eric

Hi guys,

How about this (instead of the current drag and drop script used in the plugin and Osclass):

http://www.plupload.com/

Not sure if there are any licensing issues .....

Sorry, not an option for me, that would mean to build a completely different plugin.  :o

Anyway, @SmaRTeY, what's your Edge version on desktop? ???

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: SmaRTeY on September 13, 2017, 03:05:09 am
Well we have a working uploader and we have a plugin alternative so there's still some time ;)

Interesting, there are more but this one does not seem to have the option for users to 'move' uploaded images and/or set a primary image which I think is added value for users uploading their images.

How about this (instead of the current drag and drop script used in the plugin and Osclass):

http://www.plupload.com/

Not sure if there are any licensing issues .....

Eric what is important IMHO is the "right" selection of a script like this. What Osclass currently use seems abandoned somehow at Github (they are looking for a maintainer).

So features are not so important, but the script's "future" is.

I 'm not an expert in all this, but i am an expert in research and in "trending". I always look what others do in my field and i try to follow (if i can).

What i posted above seems to be used by Wordpress. And i NEVER had any problems with WP drap/drop and uploads.
Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: teseo on September 13, 2017, 04:15:29 pm
Hi,

I'using Microsoft Edge 40.15063.0.0 (Microsoft EdgeHTML 15.15063) 64bit. This is the latest available.

Desktop Edge:
- Microsoft Edge 40.15063.0.0
- Microsoft EdgeHTML 15.15063

Same version, usually this points to some cacheing problem on the client side. Did you clean up your cache, @Aficionado? ???

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: Aficionado on September 13, 2017, 04:50:11 pm

Well, i re-did the Edge test, after clearing everything locally and remotely, and ...

 :'( :'( :'( :'(

it works. For Edge that is.

 :-[ :-[



Hi,

I'using Microsoft Edge 40.15063.0.0 (Microsoft EdgeHTML 15.15063) 64bit. This is the latest available.

Desktop Edge:
- Microsoft Edge 40.15063.0.0
- Microsoft EdgeHTML 15.15063

Same version, usually this points to some cacheing problem on the client side. Did you clean up your cache, @Aficionado? ???

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.0 released)
Post by: teseo on September 13, 2017, 04:59:21 pm
Great! :)

Now I'm waiting for the results of some external tests (trying to solve this issue here (https://forums.osclass.org/general-help/image-distortion-after-upload-like-picasso)), then I'll release a new update.

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: teseo on September 26, 2017, 01:24:29 pm
Hi,

New update 2.2.1:

    + Solved image orientation issues when using ImageMagick on browsers not supporting pre-resizing.
    + Solved occasional image corruption in Chrome on Android.
    + Fixed flickering on Drag & Drop in Firefox.

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: Aficionado on September 26, 2017, 02:56:48 pm

New update 2.2.1:

    + Fixed flickering on Drag & Drop in Firefox.


Thanks for the update. Seems to work just fine with Firefox drag and drop.

 8)
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: teppy on September 27, 2017, 04:32:09 pm
Excellent plugin thank you very much Teseo.

Only issue is it doesn't validate the max amount of items allowed.
I can upload past that limit, but the listing doesn't show anything more than the limit.

before, I would get client side-validation that I can't upload more than X items (zara theme).

Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: teseo on September 27, 2017, 05:41:23 pm
Hi,

As far as I can see that's working fine, as in the previous versions. First a Javascript alert: "Too many items (5) would be uploaded. Item limit is 4." and then the same text on an internal error element.

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: teppy on September 27, 2017, 06:19:54 pm
Hmm, that's strange. I think it must be some modification I made to validation.
I'll have a look into it. Thanks again for the amazing plugin, honestly, saved me so much time.
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: bhattvatsal23 on October 05, 2017, 11:52:19 pm
When i uploaded Plugin and configured it in manner i was not able to Upload images when Image require plugin is enabled but after disabled image require plugin it worked well?
Can anyone suggest which Plugin's fault is it?
@Teseo have you checked it before?
And obviously Thanks for the Plugin
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: teseo on October 06, 2017, 03:15:31 pm
Hi,

Maybe nobody's fault, different plugins from different developers using same mechanisms to achieve their goal may be uncompatible. ???

I don't have that premium plugin so I can't tell you more, I guess you'll have to give up on one of them. :(

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: bhattvatsal23 on October 07, 2017, 01:39:01 pm
Hey, Teseo
Can you write me on bhattvatsal23@gmail.com and will talk more about this problem as I cannot attach that plugin I think!
I know no one is better than you to understand this plugin and you are the only one who can solve this problem Faster.
please consider this, to make your plugin more compatible, reliable and easy to use for all.
Thanks In advance!
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: donopi on October 22, 2017, 09:46:09 pm
when i try to upload an image using pre sized imagine plugin i get this error
upload failed
XHR returned response code 0 on google chrome, but i dont see on mozilla fire fox
Modify message
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: teseo on October 23, 2017, 01:44:41 pm
Hi,

Same image with both browsers? ???

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: SmaRTeY on October 25, 2017, 12:18:24 pm
To see if this is Plugin - Chrome related, are there others experiencing the same issue using Chrome?

I am now on Android 7 mobile and it all works fine, also using ff, ie and edge, I don't use Chrome myself.


when i try to upload an image using pre sized imagine plugin i get this error
upload failed
XHR returned response code 0 on google chrome, but i dont see on mozilla fire fox
Modify message
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: Aficionado on October 29, 2017, 04:06:34 pm
A small (?) problem with the latest version. It adds an empty script in the header:

Code: [Select]
<script type="text/javascript" src=""></script>
in the header. Not sure why. But disabling the plugin, that is gone. It was reported in Firefox debugger.

thanks !
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: teseo on October 29, 2017, 05:57:59 pm
Hi,

Couldn't reproduce the issue here. ??? Please check that these scripts are being loaded:

jquery.fineuploader.min.js
pica.min.js
jquery.ui.touch-punch.min.js

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: Aficionado on October 29, 2017, 06:19:45 pm
Hi,

Couldn't reproduce the issue here. ??? Please check that these scripts are being loaded:

jquery.fineuploader.min.js
pica.min.js
jquery.ui.touch-punch.min.js

Regards

Loaded where ? Home page ? Post page ?


ok, they load allright on Post pages.
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: Aficionado on October 29, 2017, 06:26:01 pm
@Teseo this shows ONLY at HOME page.
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: teseo on October 29, 2017, 06:29:48 pm
Yes, I just found that. Doesn't make any harm, I wanted to stop Fine Uploader from being loaded on pages other that Publish and Edit and this is the only way to ensure that safely.

Thanks, regards

Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: Aficionado on October 29, 2017, 08:57:27 pm
Yes, I just found that. Doesn't make any harm, I wanted to stop Fine Uploader from being loaded on pages other that Publish and Edit and this is the only way to ensure that safely.

Thanks, regards

If you did that for a reason and it doesn't hurt, no need to change anything.

 8)
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: yellow53 on December 14, 2017, 01:10:44 am
Can someone help me ? since today for no reason (I didn't change anything) I got this error message while trying to upload image

Upload failure reason unknown

where it could come from ?

many thanks
Vincent
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: mrtsoftware on December 19, 2017, 01:51:00 pm
Should this plugin reduce size / byte of uploaded images? On my sites, it is not reducing . If I load a photo 400 kb , it stays same into UPLOADS folder.

Even many times it is increasing bytes, When I loaded images 70-100 bytes, I see into UPLOADS folder 115-120 bytes.

I did not change OSCLASS orignal media sizes; 240x200, 480x340, 640x480,

Please advice how to reduce bytes of photos while loading, I see on many WP or other CMS portals big secreen photos max 40,50 kb,
into famous ads portals I tried to load 1 MB photos, after publishing ads I visited URL and download loaded images, I suprised, it is max 40-50 kb size my loaded 1 MB photos. How they reduce 1 MB photo to 40 KB and why I can not reduce with Osclass?

Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: teseo on December 19, 2017, 02:09:52 pm
Resizing of images to be uploaded is done only if the image has any dimention bigger that Maximum Size plugin setting (by default 1280 pixels), so for such small images your issue has nothing to do with the plugin.

I've answered in this other thread (https://forums.osclass.org/plugins/osclass-image-upload-size-higher-than-orginal-size-bender-theme) with all I know about internal Osclass mechanisms for this task, I can't help you with this.

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: ogbavictor on March 12, 2018, 12:14:29 am
Hey author. For some reason this plugin doesn't work for me. Tried everything a newbie can do.
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: teseo on March 15, 2018, 01:16:23 pm
Hi,

You don't provide any details, did you modify item-post.php in your theme as shown in Help page? ???

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: campusmart on March 21, 2018, 04:10:26 pm
Hello teseo,

I use Gum Theme, how do I set up this plugin

I have this in my  item-post.php

Code: [Select]
<div class="col-xs-12 form-group box-border"><?php _e('<strong>Add Photos: </strong>','gum'); ?><?php _e('If you have any issues uploading pictures,kindly use another browser','gum'); ?>          <?php if( osc_images_enabled_at_items() ) {                        GumItemForm::ajax_photos(); ?>                        <?php if(!$edit) { ?>                        <p class="text-info" style="font-weight: 600;"><i class="fa fa-info-circle"></i> <?php _e('Ads with 2-3 images get more views and sales.''gum'); ?></p>                         <?php  ?>                         <?php ?>                    </div>

Where do I pit this?
Code: [Select]
if (function_exists('przi_ajax_uploader')) przi_ajax_photos();else ItemForm::ajax_photos();
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: teseo on March 21, 2018, 04:57:01 pm
Hi,

Sorry, looks like Gum theme is not compatible with this plugin.

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: kirtaph on April 21, 2018, 03:03:46 pm
Hi Teseo and many thanks for shared with community this wonderful plugin.
So, I've one problem! All working fine but, sometimes "Make Primary" don't work and primary photo is set randomly.

Can you help me to find this bug? I'use WizEstate and OSClass 3.7.1

Thanks! Any help would appreciate.
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: teseo on April 21, 2018, 04:11:19 pm
Hi,

???

To reproduce the issue here I'd need a specific sequence of events that always produce that error. Or is it absolutely random?

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: kirtaph on April 21, 2018, 08:00:14 pm
Absolutely Random! It Work for some day then on some ads "Make Primary" doesn't work!

I used it on two site and the problem is on both.
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: teseo on April 22, 2018, 12:57:08 pm
In that case, I can't do anything about it. It might be something specific to your Osclass setup or server. ??? Come back if you find some kind of pattern.

Anyway, you can always change primary image dragging thumbnails, so at least there's that.

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: kirtaph on May 09, 2018, 01:17:10 pm
Hi, I've tested with the images that cause the bug but, the images upload with the correct filename as you seen in the next photo:

https://imgur.com/a/RqFtH3B (https://imgur.com/a/RqFtH3B)

When miniature or the slideshow is loaded the image fill in the inverse order as you seen in the next photo:

https://imgur.com/a/bKhfAjj (https://imgur.com/a/bKhfAjj)
https://imgur.com/a/zCGbgqe (https://imgur.com/a/zCGbgqe)

Have you any idea?!

I see now that in the Database the image as write in the inverse order:

https://imgur.com/a/Un3YMmk (https://imgur.com/a/Un3YMmk)

I think that is necessary to order the file before write in the database.
Title: [SOLVED] [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: kirtaph on May 09, 2018, 08:39:02 pm
Finally I've solved the bug!!! The solution is in the oc-includes/osclass/model/ItemResource.php on line 104

I add this code:  $this->dao->orderBy('pk_i_id', 'ASC');

and all working fine!
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: Sophia_OS on July 27, 2018, 07:49:43 am
hey teseo,
this plugin dosn't work with modern theme,
please test it with modern theme and see it,
when you are choosing the images, images don't sit correctly side by side!
i guess css file set just to bender
would you please help me to set the css file to modern?
thanks
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: Sophia_OS on July 29, 2018, 11:35:12 pm
In that case,

No help?
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: teseo on July 31, 2018, 01:14:25 pm
Hi,

I have tested the plugin with latest Modern 5.1.0 and I couldn't see other problem than the "Make Primary Image" link appearing inside the image sometimes (this is indeed a CSS issue). Of course, this is for desktop view, Modern theme has never been responsive.

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.3.0 released)
Post by: teseo on July 31, 2018, 01:24:43 pm
Hi everyone,

Version 2.3.0 is already available in the Market. Now the plugin includes a new system allowing full rearrangement of images in any circumstances (not only for newly uploaded images).

Please notice that texts shown to the user have changed, so you'll need to rebuild your translation file if you're using a language other than english or spanish (bundled with the plugin).

https://market.osclass.org/plugins/miscellaneous/pre-resize-images_496

Enjoy, regards
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: Sophia_OS on August 06, 2018, 01:00:17 am
Hi,

I have tested the plugin with latest Modern 5.1.0 and I couldn't see other problem than the "Make Primary Image" link appearing inside the image sometimes (this is indeed a CSS issue). Of course, this is for desktop view, Modern theme has never been responsive.

Regards

Please try different resolutions. When i test, images sort up to down, not side by side and left to right.
Yes its css problem. So can't we design a plugin that its css works in all themes?
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: Aficionado on August 06, 2018, 12:55:00 pm
Hi,

I have tested the plugin with latest Modern 5.1.0 and I couldn't see other problem than the "Make Primary Image" link appearing inside the image sometimes (this is indeed a CSS issue). Of course, this is for desktop view, Modern theme has never been responsive.

Regards



Please try different resolutions. When i test, images sort up to down, not side by side and left to right.
Yes its css problem. So can't we design a plugin that its css works in all themes?

Modern theme is discontinued and it hasn't been updated since 20 Jan 2016. So it is dead and buried.

No reason to support discontinued versions.

Title: Re: [Plugin] Pre-resize Images (v. 2.3.0 released)
Post by: steam on August 21, 2018, 01:03:50 pm
Hi @teseo,

First of all thank you very much for your effort and excellent plugin.  ;)

After updating to the latest version I have problems updating images in ad. I use the Amazon S3 plugin to save the images outside.

It seems that the images are renamed in application but in Amazon S3 they are left with the old name and then they are not found by url in frontend web
I think it's more Amazon S3 plugin problem and I have to add the hook "uploaded_file" on it

I have detected some errors in - function przi_reorder_photos_process would have to check if $new_order is array - if(is_array ($new_order))

Do you know how it would be best to fix the Amazon S3 plugin?

Would not it be easier to have a column in the table, such as "resource_order" instead of increasing index and renaming the files? Later sort or select images by this order?

Thanks
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: Sophia_OS on August 23, 2018, 10:44:34 pm
Hi,

I have tested the plugin with latest Modern 5.1.0 and I couldn't see other problem than the "Make Primary Image" link appearing inside the image sometimes (this is indeed a CSS issue). Of course, this is for desktop view, Modern theme has never been responsive.

Regards

Please try different resolutions. When i test, images sort up to down, not side by side and left to right.
Yes its css problem. So can't we design a plugin that its css works in all themes?

Teseo please help me to fix this thanks
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: Aficionado on August 23, 2018, 10:52:57 pm


Teseo please help me to fix this thanks

It is SAD SAD SAD people to bump topics, disrespect the users and developers and everyone. And it is not the first (or last) time.

It is also SAD that the forums are practically unmoderated and no care is taken for such bad-behaved and unpolite abusing users as youself.
Title: Re: [Plugin] Pre-resize Images (v. 2.3.0 released)
Post by: ala on August 24, 2018, 02:54:34 pm
Quote
Teseo please help me to fix this thanks
@Sophia_OS  your web url please?
Title: Re: [Plugin] Pre-resize Images (v. 2.3.0 released)
Post by: Aficionado on September 11, 2018, 03:24:13 pm
This is from my debug.log

[11-Sep-2018 12:23:07 Europe/London] PHP Warning:  array_slice() expects parameter 1 to be array, string given in /home/oc-content/plugins/preResize_images/reorder_functions.php on line 33

[11-Sep-2018 12:23:07 Europe/London] PHP Warning:  array_flip() expects parameter 1 to be array, string given in /home/oc-content/plugins/preResize_images/reorder_functions.php on line 49
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: Sophia_OS on September 12, 2018, 03:54:21 am


Teseo please help me to fix this thanks

It is SAD SAD SAD people to bump topics, disrespect the users and developers and everyone. And it is not the first (or last) time.

It is also SAD that the forums are practically unmoderated and no care is taken for such bad-behaved and unpolite abusing users as youself.

I asked you several times not to leave comments for my posts. This is my last warning, otherwise i will ask Osclass admins to step in. Please be respectful.
Title: Re: [Plugin] Pre-resize Images (v. 2.3.0 released)
Post by: Sophia_OS on September 12, 2018, 03:58:32 am
Quote
Teseo please help me to fix this thanks
@Sophia_OS  your web url please?

Thank you for replying,  I'm working localhost. If you test it with modern theme you can see what i mean. Please download modern theme from osclass website. Thanks.
Title: Re: [Plugin] Pre-resize Images (v. 2.2.1 released)
Post by: Aficionado on September 12, 2018, 12:38:28 pm

I asked you several times not to leave comments for my posts. This is my last warning, otherwise i will ask Osclass admins to step in. Please be respectful.

Please keep the warnings for your self. Feel free to contact whoever you want. You better learn to behave and be helpful in this community and leave the attitude for your home.
Title: Re: [Plugin] Pre-resize Images (v. 2.3.0 released)
Post by: teseo on September 22, 2018, 03:09:31 pm
Hi everyone, out for a while, sorry.

First, a few days ago someone reported an issue with newest Osclass 3.8.0, warning about plugin uncompatibility. Usually, when a new Osclass version is released, plugins on the Market are automatically marked as compatible with it, but something went wrong this time, so I was forced to do it manually for Pre-resize 2.3.0. Problem is that I didn't know that this little change means that the latest plugin version is deactivated on the market until Osclass team revision, so right now the downloadable version is the old 2.2.1 :(

Anyway, I've replaced now v 2.3.0 with v. 2.3.1, addressing the problem pointed out by @Aficionado...

This is from my debug.log

[11-Sep-2018 12:23:07 Europe/London] PHP Warning:  array_slice() expects parameter 1 to be array, string given in /home/oc-content/plugins/preResize_images/reorder_functions.php on line 33

[11-Sep-2018 12:23:07 Europe/London] PHP Warning:  array_flip() expects parameter 1 to be array, string given in /home/oc-content/plugins/preResize_images/reorder_functions.php on line 49

...and fixing another bug with Delete link on mobile view. So it will be this 2.3.1 what should be available for download once the Osclass team gives the green light.

Hi @teseo,

First of all thank you very much for your effort and excellent plugin.  ;)

After updating to the latest version I have problems updating images in ad. I use the Amazon S3 plugin to save the images outside.

It seems that the images are renamed in application but in Amazon S3 they are left with the old name and then they are not found by url in frontend web
I think it's more Amazon S3 plugin problem and I have to add the hook "uploaded_file" on it

I have detected some errors in - function przi_reorder_photos_process would have to check if $new_order is array - if(is_array ($new_order))

Do you know how it would be best to fix the Amazon S3 plugin?

Would not it be easier to have a column in the table, such as "resource_order" instead of increasing index and renaming the files? Later sort or select images by this order?

Thanks

I understand your issue, but I cannot guarantee compatibility with any 3rd party plugins and less when they require an API key to paid external services. Now, I would be willing to do this task if you (or some other person interested) share temporarily your Amazon API key with me while I program the thing. If you're interested leave your mail address so I could reach you (PM are disabled in the forum).

About this:

Quote
Would not it be easier to have a column in the table, such as "resource_order" instead of increasing index and renaming the files? Later sort or select images by this order?

Yes, that would have been my preferred option, but unfortunately in this case that approach would require a lot of modifications on theme files.

Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.3.0 released)
Post by: Sophia_OS on October 02, 2018, 12:43:35 am
[quote
author=teseo
[/quote]

Please fix this:
In mobile, after dropping the images, "Delete" and "Make primary image" dosent work. Nothing happen when you touch them.
Thanks
Title: Re: [Plugin] Pre-resize Images (v. 2.3.0 released)
Post by: beginner on October 09, 2018, 01:38:34 pm
Hi, is possible to have the same function "Make primary image" when users and admin item editing ? Regards
Title: Re: [Plugin] Pre-resize Images (v. 2.3.0 released)
Post by: leito on October 30, 2018, 12:49:14 am
When I edit the ad from the administrator the following problems arise!

What is the reason for this error with the plugin and how to solve it?
/plugins/preResize_images/reorder_functions.php on line 38
/plugins/preResize_images/reorder_functions.php on line 51
Title: Re: [Plugin] Pre-resize Images (v. 2.3.0 released)
Post by: buninsan on November 01, 2018, 07:59:48 pm
Hello!
Sorry, I'm using Google translator.
There were problems with the plugin after the last update.
After the image is deleted, a link to an already non-existent image remains!
administrator can not delete the link to the deleted image!
(http://i.piccy.info/i9/0f5c573c2827dcccfe2efb3536f08912/1541091767/7866/1279379/2018_11_01_185653.png) (http://[URL=http://piccy.info/view3/12736714/b287f4a9784ff2a3a6e65d3fbc28ab60/)(http://i.piccy.info/a3/2018-11-01-17-02/i9-12736714/278x277-r/i.gif) (http://i.piccy.info/a3c/2018-11-01-17-02/i9-12736714/278x277-r)

(http://i.piccy.info/i9/d2816b31df48bef2aaa7188677a72dfd/1541092080/10625/1279379/2018_11_01_185829.png) (http://piccy.info/view3/12736729/7123bd9033328248796ad2826bb66b05/)(http://i.piccy.info/a3/2018-11-01-17-08/i9-12736729/547x440-r/i.gif) (http://i.piccy.info/a3c/2018-11-01-17-08/i9-12736729/547x440-r)

I had to roll back the plugin on Version: 2.3.0
Title: Re: [Plugin] Pre-resize Images (v. 2.3.0 released)
Post by: Aficionado on November 02, 2018, 04:18:45 pm
Not fixed in recent update:

[02-Nov-2018 12:51:15 Europe/London] PHP Warning:  array_slice() expects parameter 1 to be array, string given in /home/oc-content/plugins/preResize_images/reorder_functions.php on line 38

[02-Nov-2018 12:51:15 Europe/London] PHP Warning:  array_flip() expects parameter 1 to be array, string given in /home/oc-content/plugins/preResize_images/reorder_functions.php on line 51

Title: Re: [Plugin] Pre-resize Images (v. 2.3.0 released)
Post by: Aficionado on November 06, 2018, 02:56:03 am
Also:

Code: [Select]
jquery-3.3.1.min.js:2 Uncaught Error: Cannot find template script at ID 'qq-template'!
    at j (jquery.fineuploader.min.js:7)
    at new qq.Templating (jquery.fineuploader.min.js:7)
    at new qq.FineUploader (jquery.fineuploader.min.js:7)
    at n (jquery.fineuploader.min.js:3)
    at w.fn.init.t (jquery.fineuploader.min.js:3)
    at HTMLDivElement.<anonymous> (jquery.fineuploader.min.js:3)
    at Function.each (jquery-3.3.1.min.js:2)
    at w.fn.init.each (jquery-3.3.1.min.js:2)
    at w.fn.init.e.fn.fineUploader (jquery.fineuploader.min.js:3)
    at HTMLDocument.<anonymous> (new:599)
Title: Re: [Plugin] Pre-resize Images (v. 2.3.0 released)
Post by: p206ab on January 08, 2019, 08:22:58 pm
I'm having problem with the latest version.
I mean the plugin works fine and all, the drag and drop functionality for the users is nice, but what I noticed is, that once I edit the advert inside admin panel, the order of the images changes once I click Save (Update listing). Why is this so?  :o
Title: Re: [Plugin] Pre-resize Images (v. 2.3.0 released)
Post by: Swanpro on January 15, 2019, 01:55:02 am
Hi Teseo,
Your plugin is a must have and it works very well with bender but not with my theme, even with the coding provided. Images are elongated to a point you cant see what it is.
Does someone had this problem and know how to solve it ? Thank you.
I'm on 3.8 using Eva theme.
Title: Re: [Plugin] Pre-resize Images (v. 2.3.0 released)
Post by: leito on March 03, 2019, 08:30:03 pm
Not fixed in recent update:

[02-Nov-2018 12:51:15 Europe/London] PHP Warning:  array_slice() expects parameter 1 to be array, string given in /home/oc-content/plugins/preResize_images/reorder_functions.php on line 38

[02-Nov-2018 12:51:15 Europe/London] PHP Warning:  array_flip() expects parameter 1 to be array, string given in /home/oc-content/plugins/preResize_images/reorder_functions.php on line 51

I have the same problem, amateur did you find a solution to the problem?
Title: Re: [Plugin] Pre-resize Images (v. 2.3.0 released)
Post by: david92 on March 25, 2019, 11:19:16 pm
Hi ,
I am using SAHARA theme and I have intalled and configured Pre-resize plugin but it doesn't work. When I try to post an ad with an image of about 4.5 MB, it is saved as 1.3 MB with Pre-resize but when I try to post the ad this is the error I get:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 13968 bytes) in /homepages/43/d766855380/htdocs/oc-includes/osclass/classes/ImageProcessing.php on line 75


Please Can I get some help? Thanks