• Hi There.

    Is there any workaround to make the ngg showing only 1 thumbnail but not seperating the gallery into multiple pages?
    I’d like to show the first thumbnail only, but inside the thickbox there should be next and prev buttons to skip through the whole gallery.

    Tried to reduce the number of thumbs via the admin interface, but then the pagination appears (which should easily be killed by css) BUT the’re is no prev/next at the the thickbox.

    Any ideas?
    Help would be great! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter soundofsirens

    (@soundofsirens)

    OK. I found a quick and dirty solution! ??

    in nggfunctions.php
    add $i = 1; to line 330 before foreach ($picturelist as $picture) {

    Then go to line 346 and add id=”unique’ . $i++ . ‘” to the div ngg-gallery-thumbnail.

    This outputs <div id=”unique1″ class=”ngg-gallery-thumbnail”…><div id=”unique2″ class=”ngg-gallery-thumbnail”…><div id=”unique3″ class=”ngg-gallery-thumbnail”…> ans so one.

    Now switch to your theme’s css-file and add following lines:
    .ngg-gallery-thumbnail {display:none; height:0px;}
    #unique1 {display:block; height:your thumbnail height in px;}

    et voila! ??

    Yes that did the trick, but it increase the loading time

    Thread Starter soundofsirens

    (@soundofsirens)

    don’t think so. it only hides all thumbs except the first one…
    (and as i mentioned before: “quick and dirty” – i know)

    ??

    I took a different approach here –

    I set Options -> Gallery -> “Number of images per page” to 1, then commented out line 312 in nggfunctions.php like so:

    //$navigation = nggallery::create_navigation($page, $total, $maxElement);)

    In this way, only 1 thumbnail loads.

    Edit: Should have read more carefully, I didn’t realize you still wanted the thickbox to page. I’ll look into this for a way to do it without hiding thumbnails.

    Soundsofsiren,

    Can you cut and paste excerpts of your code becase I did not exactly know what you mean by:
    Then go to line 346 and add id=”unique’ . $i++ . ‘” to the div ngg-gallery-thumbnail.

    Also, where on the theme css file should I add the following lines:
    .ngg-gallery-thumbnail {display:none; height:0px;}
    #unique1 {display:block; height:your thumbnail height in px;}

    Thanks for your help. I have been trying to figure this out for a long time.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Nextgen-Gallery] – Showing only one thumbnail but no pagination’ is closed to new replies.