• Resolved worddresser

    (@worddresser)


    Hello. I’ve been searching for an answer on how to customize the appearance of galleries beyond CSS changes (although eventually I’ll get to that to) for about 4 days now and have read and tried just about everything with no luck.

    I tried selecting a template during the imagebrowser gallery creation process in the back end (with the hopes that I could target the file used and alter it) as in the video mentioned here: http://www.nextgen-gallery.com/using-templates-in-nextgen-gallery-2-0/

    But my images disappeared. (navigation and everything else was still there)

    I also tried directly altering the file: nextgen_basic_imagebrowser.php

    That didn’t do anything.

    I’ve tried creating a folder in my child theme called “ngggallery” with the hopes of overriding files there that would keep customization intact but the gallery in the plugins folder wouldn’t even recognize, and what the heck is adding gallery.php supposed to do anyway?

    http://snippets.webaware.com.au/howto/creating-a-custom-gallery-template-for-nextgen-gallery/

    That’s the link with the directions I tried.

    How can I achieve what I’m after? I want to edit the php file that generates each instance of the imagebrowser gallery (and hopefully, eventually others). I’d like to do this by overriding with a child file in my child theme folder to keep customization intact when updates happened.

    I”ve seen countless posts of people asking the same question, yet nobody seems to have a solution that works.

    PLEASE HELP.

    https://wordpress.org/plugins/nextgen-gallery/

Viewing 15 replies - 1 through 15 (of 20 total)
  • Hello,

    i can talk just about my personal experience,i have been strugglying with that a lot,was used to have a custom template back in 1.9 but after the 2.0 update the only praticable solution i’ve managed to find was to edit 3 file:

    • \wp-content\plugins\nextgen-gallery\products\photocrati_nextgen\modules\nextgen_basic_album\templates\extended.php
    • \wp-content\plugins\nextgen-gallery\products\photocrati_nextgen\modules\nextgen_basic_gallery\templates\thumbnails\index.php
    • \wp-content\plugins\nextgen-gallery\products\photocrati_nextgen\modules\nextgen_basic_imagebrowser\templates\nextgen_basic_imagebrowser.php

    Then if u set your displaying setting accordling you are going to obtain your result, sadly everytime they release an update you are forced to remake the replace again, and let me say it: its a pain. Until it wont be an easier way to do this ill just stick with this solution. That’s very sad anyways since i worked hard to integrate my custom template with all the plugins im using w/o touching their code, this is the ONLY exception

    Plugin Contributor photocrati

    (@photocrati)

    @sirion89 – Thanks for your input on this.

    @worddresser – If you are using custom templates and a Child-Theme then it would be best for you to save those custom templates under the following location:

    ../wp-content/themes/< your child-theme >/nggallery/

    Please note, the “template” system this applies to are the NextGEN Legacy templates that are found under ../wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/view/ … you cannot use the current NextGEN Gallery display code in the same manner.

    Thanks!

    – Cais.

    Thread Starter worddresser

    (@worddresser)

    This all helps immensely. Thank you.

    Plugin Contributor photocrati

    (@photocrati)

    @worddresser – Happy to be of assistance.

    – Cais.

    Thread Starter worddresser

    (@worddresser)

    Alright. I’ve already got the templates showing up in the gallery display settings drop down, so I’m on the path to customization.

    Q: How long will legacy functionality be supported? I read somewhere that despite the tooltip warning that it’s not recommended, the plan is that they will be supported for some time. is that the case? thanks again.

    Thread Starter worddresser

    (@worddresser)

    actually. I spoke too soon.

    Images are not displaying. I ran into this problem earlier. Do I have to regenerate the gallery? or?

    Here’s the page:

    http://davidlook.net/2015/portfolio/76/nggallery/image/img_3975/

    Plugin Contributor photocrati

    (@photocrati)

    @worddresser – We do not have a specific end-of-support timeline for NextGEN Legacy functionality and the NextGEN Legacy template “system” will likely be moved into something for future friendly before it is dropped from the plugin.

    As to the missing images, does the standard ImageBrowser (read: blank) template work correctly?

    – Cais.

    Thread Starter worddresser

    (@worddresser)

    HI Cais,

    All i did was drop all image browser templates mentioned in this thread into the my child theme nggallery folder.

    the only change I made was to imagebrowser.php

    just to see if the file in the child theme folder was being read, i moved the <h3> image title tag to the bottom of the image.

    Please advise, and thanks for you help!

    Plugin Contributor photocrati

    (@photocrati)

    @worddresser – Where are you setting the template for the display? Are you using the customization panel of the IGW when inserting the display, or did you just change the default template under Gallery > Gallery Settings > NextGEN Basic ImageBrowser?

    Either way, could you possibly link to a screen snippet showing which one(s) you are using?

    Thanks!

    – Cais.

    Thread Starter worddresser

    (@worddresser)

    Not sure what you’re asking me to screen, but took a guess it’s what template I’m using? So here is a shot of that:

    http://davidlook.net/2015/gallery.png

    and here is the final output:

    http://davidlook.net/2015/portfolio/76/nggallery/image/img_3975/

    Just a note that the gallery was created before I switched the template to the legacy php file in the child theme folder (as shown in my screen shot)

    Plugin Contributor photocrati

    (@photocrati)

    @worddresser – OK … that does help some for the template choice. What happens if you use the default template (read: blank … you may need to manually delete the choice you are using now)?

    – Cais.

    Thread Starter worddresser

    (@worddresser)

    http://davidlook.net/2015/portfolio/new-upload-test/

    that’s a new gallery made with the default template. it’s all good.

    Here’s another gallery created using the same template hosted in my child theme folder location

    http://davidlook.net/2015/portfolio/new-upload-of-custom/

    Here is a gallery using the template NextGEN: Imagebrowser.php template selected using the custom gallery display setting drop down menu. Interestingly it doesn’t display images either

    http://davidlook.net/2015/portfolio/224/

    Starting to think it might have something to do with relative paths to the images once the template location is changed?

    Plugin Contributor photocrati

    (@photocrati)

    @worddresser – The “imagebrowser.php” template if more for a reference than to be actually used, the same applies for the “imagebrowser-caption.php” template because the default (blank) template renders the same display.

    If you are trying to use customized templates I would recommend starting with the “captions” template as your best go forward starting point and create a copy to modify and use.

    – Cais.

    Thread Starter worddresser

    (@worddresser)

    OK thanks worked. and I will used that template going forward. thanks!

    Plugin Contributor photocrati

    (@photocrati)

    @worddresser – Great! Thanks for the update.

    – Cais.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘A definitive answer on template customization’ is closed to new replies.