WordPress.org

Forums

File Gallery
Pagination fix (11 posts)

  1. alx359
    Member
    Posted 3 years ago #

    When activating pagination [1.7-RC2] there was a bug and what it seems some debugging code displaying as negative pages (-2,-1,0) which were breaking the script when clicked.

    file-gallery\includes\templating.php ~li 872:

    // left side
    //// [alx359]
    if( 0 < $current )
    //if( 1 < $current )
    ////
    {
    $current--;

    And again: ~li 907:

    //// [alx359]
    /*
    		// leftovers
    		while( 1 < $limit )
    		{
    
    			array_unshift($out, str_replace('<a ', '<a class="page"', _wp_link_page($c)) . $c . '</a>');
    
    			$c--;
    			$limit--;
    		}
    */
    ////
  2. Aesqe
    Member
    Plugin Author

    Posted 3 years ago #

    @alx359: thank you for all your fixes and bug reports, they help a lot! :)

    For this bug, the fix is simple - on line 902 in templating.php, instead of this:

    while( 1 < $limit )

    there should be:

    while( 1 < $limit && 0 < $c )

    I'm swamped with other work and can't tell when 1.7 is coming out, but as WP 3.2 is here and there are some "real" bugs that need to be fixed, I hope to get to it within next few days.

    Thanks again!

  3. alx359
    Member
    Posted 3 years ago #

    Hi Aesque,

    Glad to be of help. Can confirm that your fix works, and looks better :-).

    Great news 1.7 final is coming so soon!

  4. Jennifer
    Member
    Posted 3 years ago #

    amazing plugin. exactly what i've been looking for and thank you so much.

    maybe i missed it somewhere, but how do i turn on pagination? i am linking to "attachment page" and on the attachment page, i would like to have pagination. this means that there is a next and previous links, correct?

    also, i have my settings to show full size image on the attachment page, but it is showing a smaller image instead.

    is there information somewhere on customizing the "attachment page"?

    thank you again!

  5. Jennifer
    Member
    Posted 3 years ago #

    also, i have 12 images total in my gallery, so i set my "limit" variable to 12. this did insert pagination to true and limit to 12, but on my attachment page, there is still no pagination. maybe i need to do the code fix above? here is my tag:

    [gallery size="medium" limit="12" paginate="true" order="ASC" orderby="menu_order"]

    would still love to know how to include "full" size image on the attachment page. i have this set in my media settings, but it is still liking to the medium image.

    would also love more info on customizing the attachment page - previous, next links, centering image, etc.

    thank you again!

  6. Jennifer
    Member
    Posted 3 years ago #

    more info - i looked for:

    while( 1 < $limit )

    in the file-gallery/includes/templating.php file and it is not there. maybe this fix has already been included in my current version 1.6.5.6?

  7. Aesqe
    Member
    Plugin Author

    Posted 3 years ago #

    @Jennifer:

    i am linking to "attachment page" and on the attachment page, i would like to have pagination. this means that there is a next and previous links, correct?

    Actually no :) Pagination is for gallery content only.

    File Gallery has nothing to do with single attachment pages, but your theme does. So if you want to have previous / next attachment links, you would have to edit the "attachment.php" file in your theme's directory.

    Hope this helps :)

  8. Aesqe
    Member
    Plugin Author

    Posted 3 years ago #

    also, to answer your last question, 1.6.X versions of the plugin do not have the pagination bug because they use a different pagination function :)

  9. Jennifer
    Member
    Posted 3 years ago #

    @Aesque you are so so helpful! thank you so much for your quick responses.

    i created a "file gallery" plus floatbox and it works perfectly http://www.thelooksforless.com/2011/08/15/fall-2011-lookbooks-missoni-for-target-pics/ i tried lightbox, fancybox, thickbox and colorbox, but floatbox worked so well and was so easy to implement. it's also fully customizable.

    my question is, is there a way to combine floatbox with an attachment page? for example, i would like to show all of my thumbnails on my post using file gallery, when a user clicks on a thumbnail, it starts my floatbox slideshow, but I'd love to show an attachment page in the floatbox window so i can include the image and other html.

    is there an easy way to do this?

    thanks again for everything! you are so helpful and your plugin is amazing!

  10. WorkPressed
    Member
    Posted 3 years ago #

    Hi

    I have a page with the following gallery code

    [gallery size="gallery-thumbnail" link="file" limit="9" paginate="true" orderby="rand"]

    I have 22 images attached to the page indicated by the file-gallery plugin

    I have set the limit to 9 and paginate to true but have no next/previous option. Am I missing something or does paginate only work on post galleries?

    Would love to get this working on pages if anyone can point me in the right direction it would be very much appreciated.

    WordPress Version 3.2.1

  11. Aesqe
    Member
    Plugin Author

    Posted 3 years ago #

    @WorkPressed: it should work all the same regardless of the post type.

    Which version of the plugin are you using?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • File Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic