Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author marchenko.alexandr

    (@marchenkoalexandr)

    Absolutely

    All you need to do is:

    Copy loop-picasa.php into yours theme folder and change it to something like this:

    <p>
    <?php
    $total = count($photos); // number of images
    $per_page = 6; // count of images to show per page
    $current = isset($_GET['picasa_page']) ? max(1, intval($_GET['picasa_page'])) : 1; // current page number
    
    // render pager http://codex.wordpress.org/Function_Reference/paginate_links
    echo paginate_links( array(
    	'format' => add_query_arg('picasa_page', '%#%'),
    	'current' => $current,
    	'total' => round($total / $per_page)
    ) );
    ?>
    </p>
    
    <ul class="embpicasa">
    <?php for($i = $current; $i < $current + $per_page; $i++): $photo = $photos[$i];?>
    	<li>
    		<a title="<?php echo $photo['title']?>" rel="lightbox[<?php echo $id?>]" target="_blank" href="<?php echo $photo['fullsize']?>">
    			<img src="<?php echo $photo['thumbnail']?>" alt="<?php echo $photo['title']?>" />
    		</a>
    	</li>
    <?php endfor;?>
    </ul>

    Will add it to plugins FAQ

    Thread Starter raozkardes

    (@raozkardes)

    I thank you.

    shown in the bottom of the page pagination?

    Plugin Author marchenko.alexandr

    (@marchenkoalexandr)

    No it will be shown at top, if you want to show it also at bottom just copy paste pager pargraph after gallery something like this:

    <?php
    // preparations
    $total = count($photos); // number of images
    $per_page = 6; // count of images to show per page
    $current = isset($_GET['picasa_page']) ? max(1, intval($_GET['picasa_page'])) : 1; // current page number
    ?>
    
    <!-- Top pager -->
    <p>
    <?php
    echo paginate_links( array(
    	'format' => add_query_arg('picasa_page', '%#%'),
    	'current' => $current,
    	'total' => round($total / $per_page)
    ) );
    ?>
    </p>
    <!--/ Top pager -->
    
    <!-- Gallery -->
    <ul class="embpicasa">
    <?php for($i = $current; $i < $current + $per_page; $i++): $photo = $photos[$i];?>
    	<li>
    		<a title="<?php echo $photo['title']?>" rel="lightbox[<?php echo $id?>]" target="_blank" href="<?php echo $photo['fullsize']?>">
    			<img src="<?php echo $photo['thumbnail']?>" alt="<?php echo $photo['title']?>" />
    		</a>
    	</li>
    <?php endfor;?>
    </ul>
    <!-- Top pager -->
    <p>
    <?php
    echo paginate_links( array(
    	'format' => add_query_arg('picasa_page', '%#%'),
    	'current' => $current,
    	'total' => round($total / $per_page)
    ) );
    ?>
    </p>
    <!--/ Gallery -->
    
    <!-- Bottom pager -->
    <p>
    <?php
    echo paginate_links( array(
    	'format' => add_query_arg('picasa_page', '%#%'),
    	'current' => $current,
    	'total' => round($total / $per_page)
    ) );
    ?>
    </p>
    <!--/ Bottom pager -->

    Feel free to experiment with your template

    Thread Starter raozkardes

    (@raozkardes)

    paging can not be displayed in the right place. I want to display pagination at the bottom of the page.

    Thank you for your help and understanding.

    Plugin Author marchenko.alexandr

    (@marchenkoalexandr)

    just style it as you need

    add position:relative to page container
    and position:absolute;bottom:0;left:0

    Thread Starter raozkardes

    (@raozkardes)

    position:relative
    position:absolute;bottom:0;left:0

    style code where you figure out how to get it.

    style.css loop-picasa.php

    Plugin Author marchenko.alexandr

    (@marchenkoalexandr)

    can you post your site link, otherwise i can’t help you acomplish your needs

    Thread Starter raozkardes

    (@raozkardes)

    Hi, site link http://nikferim.com/nikferli/?p=1624

    another plugins,kpicasa gallery pagination demo, http://nikferim.com/nikferli/?p=1647

    Plugin Author marchenko.alexandr

    (@marchenkoalexandr)

    Try to add to your styles.css following:

    .embpicasa {
        display: block;
        clear: both;
        overflow: hidden;
    }
    Thread Starter raozkardes

    (@raozkardes)

    Thank you. It was like I wanted. Participate in a more stylish look with CSS paging. Hope to see you for the next version.
    Thank you for your help.

    Thread Starter raozkardes

    (@raozkardes)

    Paged 1 Clicking the page does not open. No problem with the transition to the other pages. 1 does not jump to the page. One solution is to be found?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘pagination’ is closed to new replies.