• Resolved Myst1010

    (@myst1010)


    Sorry my english, I’m using a translator.
    When the post has a very long name, which is common although wrong, it creates files with huge d images and names that generate problems with backup plugins that can not compress these files.

    So if some lines are changed, this problem is avoided.
    Below is my modification to correct this problem.

    on line 308 of version 2.4 of the plugin, where it is found:

    $new_filename = urldecode( basename( get_permalink( $post_id ) ) ) . $image_extension;

    switch to:

    $new_filename = urldecode( basename( get_permalink( $post_id ) ) );
    $new_filename = strtolower( sanitize_title( substr( $new_filename, 0, 16 ) ) ) . $image_extension;

    this way the name is created, but with the character limit, which prevents the file is with a very long name, solving the problem.

    In addition also corrects unwanted characters clearing the name of things like @ ( ) and uppercase letters.

    I would like to see this fix in a future version and I hope I helped in some way.

    http://wordpress.org/plugins/video-thumbnails/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Sutherland Boswell

    (@sutherlandboswell)

    I hadn’t considered the length of the file name being a problem, so I’ll include it in a fix I’m already working on.

    Thread Starter Myst1010

    (@myst1010)

    Great news and thanks for listening.

    Plugin Author Sutherland Boswell

    (@sutherlandboswell)

    Version 2.4.1 is out now! Filenames are now limited to 32 characters. Any non-latin characters are removed so you don’t end up with strange names, and the post ID will be used as a fallback.

    Thread Starter Myst1010

    (@myst1010)

    Excellent fix, his approach was much better than suggested.
    I am very please by correcting and your attention to the case presented.

    This is a developer of quality.
    Thank you.

    Plugin Author Sutherland Boswell

    (@sutherlandboswell)

    Thank you, I hope you’ll leave a review!

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

The topic ‘posts with big names – suggested solution’ is closed to new replies.