Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Grupporetina

    (@grupporetina)

    Any news about this problem? Thanks

    Thread Starter Grupporetina

    (@grupporetina)

    We made another fix for the image from url. If you try to use and image from another wordpress using its url you got the same error “Image doesn’t exists”. We fix also the image from asp urls.

    So change:

    elseif ( preg_match('/^http/i', $url)) {
     $jsondata['result'] = 'ok';
     $jsondata['url'] = $url;
     return $jsondata;
     }

    with:

    elseif ( preg_match('/^http/i', $url_img)) {
    			$jsondata['result'] = 'ok';
    			$jsondata['url'] = $url_img;
    			return $jsondata;
    		}

    Hope this will help too ??

    Thread Starter Grupporetina

    (@grupporetina)

    We have found the error in the file wp-content/plugins/knews/includes/resize_img.php
    This file try to save the image but the path was wrong.
    The original file was:

    if (is_file($wp_dirs['basedir'] . $url)) {
                                       $size = getimagesize($wp_dirs['basedir'] . $url);
                                       if ($size[0]==$width && $size[1]==$height) {
    
                                                   $jsondata['result'] = 'ok';
                                                   $jsondata['url'] = $wp_dirs['baseurl'] . $url;
                                                   return $jsondata;
                                       }
                            }

    This is our modification to let the insert from url of images work:

    if (is_file( $wp_dirs['basedir'] . $url)) {
                                       $size = getimagesize($wp_dirs['basedir'] . $url);
                                       if ($size[0]==$width && $size[1]==$height) {
    
                                                   $jsondata['result'] = 'ok';
                                                   $jsondata['url'] = $wp_dirs['baseurl'] . $url;
                                                   return $jsondata;
                                       }
                            }
                            elseif ( preg_match('/^http/i', $url)) {
                                       $jsondata['result'] = 'ok';
                                       $jsondata['url'] = $url;
                                       return $jsondata;
                            }

    This modification consider the image url only and it’s not saved in the file system.

    Hope this help for a fix ??

Viewing 3 replies - 1 through 3 (of 3 total)