Viewing 12 replies - 1 through 12 (of 12 total)
  • Open following file:
    /products/photocrati_nextgen/modules/nextgen_basic_gallery/templates/tumpnails/index.php

    Scoll to the bottom of the file and see that after each pagination there is one command:
    <br style="clear: both" />

    It pretty much adds 100 linebreaks if your gallery had 100 pages. It was easy to fix, but I do not have my code handy in the moment. ??

    Thread Starter luckestz

    (@luckestz)

    So where is “clear: both” I have to fix this way: “clear: 100” ?

    Thread Starter luckestz

    (@luckestz)

    I tryed this, all huge spaces top and bottom was removed, but now the columns are wrong.

    How to fix it?

    Thread Starter luckestz

    (@luckestz)

    There are 286 pics at the gallery, 6 coluns and 10 rows. So the gallery was spit in 5 pages, in each page this huge space moves, at the page 1 its on bottom, page 2 bottom and top, page 3 bottom.

    I tried do manage the ngggalery.css but can′t solve.

    The solution to edit the index.php solve only on the page 1 of the gallery, on other pages the space continues.

    here are an example:

    https://www.spruemaster.com/blog/2012/05/letecke-muzeum-kbely/

    Thank you

    Hey Lucke

    i found some time to look back into my code:

    Here’s the original:

    <?php if ($number_of_columns > 0 || newlinesWritten > 0): ?>
                <?php if ((($i + 1) % $number_of_columns) == 0 ): ?>
                    <br style="clear: both" />
                <?php endif; ?>
            <?php endif; ?>

    And here is my minor change:

    <?php if (!isset($image->hidden) && !$image->hidden): ?>
            <?php if ($number_of_columns > 0 || newlinesWritten > 0): ?>
                <?php if ((($i + 1) % $number_of_columns) == 0 ): ?>
                    <br style="clear: both" />
                <?php endif; ?>
            <?php endif; ?>
    <?php endif; ?>

    This should work as intended ??

    Thread Starter luckestz

    (@luckestz)

    Axel Perschmann, you are my hero!!

    This solve my problem ?? ??

    Thank you!

    even better:

    only add following line above the code.
    <?php if ( $image->hidden ) continue; ?>

    Thread Starter luckestz

    (@luckestz)

    Thank you Axel, so just to confirm will be like this:

    <?php if ( $image->hidden ) continue; ?>
            <?php if ($number_of_columns > 0 || newlinesWritten > 0): ?>
                <?php if ((($i + 1) % $number_of_columns) == 0 ): ?>
                    <br style="clear: both" />
                <?php endif; ?>
            <?php endif; ?>
    <?php endif; ?>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Original:

    <?php if ($number_of_columns > 0): ?>
                <?php if ((($i + 1) % $number_of_columns) == 0 ): ?>
                    <br style="clear: both" />
                <?php endif; ?>
            <?php endif; ?>
    
    	<?php endfor ?>

    Correct:

    <?php if ( $image->hidden ) continue; ?>
            <?php if ($number_of_columns > 0): ?>
                <?php if ((($i + 1) % $number_of_columns) == 0 ): ?>
                    <br style="clear: both" />
                <?php endif; ?>
            <?php endif; ?>
    
    	<?php endfor ?>

    there was only one line of code missing. ??

    Thread Starter luckestz

    (@luckestz)

    Hello Axel,

    Thank you so much, this solve my problem.

    Best regards.

    Thread Starter luckestz

    (@luckestz)

    Here I′m again, this solution was working to all updates, but this last one does not work.

    Some help please.

    Tks!

    Plugin Contributor photocrati

    (@photocrati)

    @lucke.stz – The following has been submitted as a possible fix but it has not been fully tested so please be very careful if you attempt this as we cannot guarantee anything about the code

    The fix needs to be done in the file:
    wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/templates/thumbnails/index.php

    Line number 85 contains the following content:
    <br style="clear: both" />

    This should be changed to:

    <?php if( (($current_page-1)*$images_per_page < $i+1) && ($i+1 <= ($current_page)*$images_per_page)) { ?>
         <br style="clear: both" />
    <?php } ?>

    Please let us know if this helps sort out the issue.

    Thanks!

    – Cais.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Huge space on top and bottom of a gallery’ is closed to new replies.