Loading


Advertisement:

Author Topic: [Plugin] Pre-resize Images (v. 2.1.0 released)  (Read 10123 times)

teseo

  • Hero Member
  • *****
  • Posts: 5641
Re: [Plugin] Pre-resize Images
« Reply #15 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

p206ab

  • Full Member
  • ***
  • Posts: 225
  • No one will read this text with Cameron above :)
Re: [Plugin] Pre-resize Images
« Reply #16 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?

teseo

  • Hero Member
  • *****
  • Posts: 5641
Re: [Plugin] Pre-resize Images
« Reply #17 on: March 04, 2016, 07:30:41 pm »
Hi,

???

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

Regards
« Last Edit: March 04, 2016, 07:33:36 pm by teseo »

p206ab

  • Full Member
  • ***
  • Posts: 225
  • No one will read this text with Cameron above :)
Re: [Plugin] Pre-resize Images
« Reply #18 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();
                         } 
?>

sunshine

  • Newbie
  • *
  • Posts: 40
Re: [Plugin] Pre-resize Images
« Reply #19 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?

teseo

  • Hero Member
  • *****
  • Posts: 5641
Re: [Plugin] Pre-resize Images
« Reply #20 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
« Last Edit: March 04, 2016, 09:21:32 pm by teseo »

sunshine

  • Newbie
  • *
  • Posts: 40
Re: [Plugin] Pre-resize Images
« Reply #21 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.


p206ab

  • Full Member
  • ***
  • Posts: 225
  • No one will read this text with Cameron above :)
Re: [Plugin] Pre-resize Images
« Reply #22 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! ;)

teseo

  • Hero Member
  • *****
  • Posts: 5641
Re: [Plugin] Pre-resize Images
« Reply #23 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

p206ab

  • Full Member
  • ***
  • Posts: 225
  • No one will read this text with Cameron above :)
Re: [Plugin] Pre-resize Images
« Reply #24 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?

teseo

  • Hero Member
  • *****
  • Posts: 5641
Re: [Plugin] Pre-resize Images
« Reply #25 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

p206ab

  • Full Member
  • ***
  • Posts: 225
  • No one will read this text with Cameron above :)
Re: [Plugin] Pre-resize Images
« Reply #26 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 ;)

teseo

  • Hero Member
  • *****
  • Posts: 5641
Re: [Plugin] Pre-resize Images
« Reply #27 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:



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

Syed

  • Jr. Member
  • **
  • Posts: 98
Re: [Plugin] Pre-resize Images
« Reply #28 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).

teseo

  • Hero Member
  • *****
  • Posts: 5641
Re: [Plugin] Pre-resize Images
« Reply #29 on: March 14, 2016, 12:57:22 pm »
Hi,

Confirmed. What theme are you using?

Regards