• Hi there,

    I have been using this plugin for some time now. I’ve just started using the extended template feature, but am facing a major roadblock.

    The thumbnail sizes are being limited to 91×68, which is very tiny. The page where I am displaying the gallery needs to be somewhere in the ballpark of 355×240.

    After searching around a bit for a filter the only thing I was able to come across was another thread explaining how to hack up the core files to achieve this.

    As we all know (or should know) hacking up core files within a plugin or theme is a pretty bad idea as it will cause some serious issues when updating to the next release.

    Searching through some of the folders, I can see that the thumbnail is dynamically generated along with the original image size. When I test the contents of the $gallery variable using print_r($gallery), I can see that the thumbnail URL (previewurl) is being passed within the array, but the original image size IS NOT.

    The only way I was able get things working using the original image size was to add in a simple str_replace function inside of the image SRC, to replace the 91×68 image size with my full image size.

    Code:

    <img class="gallery_image" alt="<?php echo esc_attr($gallery->title); ?>" src="<?php echo nextgen_esc_url( $gallery->previewurl ); ?>"/>

    As you can see the $gallery->previewurl is passed into the src attribute of the image. But the original url is unavailable inside of this array. Can we add the original URL as well so we can use that if we so choose?

    In the meantime, my fix looks like this:

    <img class="gallery_image" alt="<?php echo esc_attr($gallery->title); ?>" src="<?php echo nextgen_esc_url(str_replace( '91x68-00f0w010c011r110f110r010t010' , '355x240x100-00f0w010c010r110f110r010t010' , $gallery->previewurl ) ); ?>"/>

    Thanks,
    Evan

    https://www.ads-software.com/plugins/nextgen-gallery/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Evan Herman

    (@eherman24)

    Also, is there any where I can make a pull request (github, bitbucket) to possibly add the changes in my self? I know this is a much wanted feature.

    Edit: Whoops, think I found it : https://bitbucket.org/photocrati/nextgen-gallery/pull-requests

    Thanks,
    Evan

    Plugin Contributor photocrati

    (@photocrati)

    @evan Herman – Please feel free to make pull requests. The repository on BitBucket you are referencing would be the place to do it.

    Also to note, the template system is from NextGEN Legacy (version 1.19.13 and older) days and in some cases not all of the options that can be set to do what you are describing are passed to the NextGEN Legacy templates.

    I would suggest carrying on with the custom template path you have started down at this time.

    Thanks!

    – Cais.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Extended Template Image Sizes’ is closed to new replies.