Dynamic pagination?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • acctman
    Confirmed User
    • Oct 2003
    • 2840

    #1

    Dynamic pagination?

    does anyone have an example of a dynamic pagination where the page doesn't change but the content does when you select page links.

    this code display all user favorite images on one page. just your basic query but the template script handles all the messy stuff behind the scenes
    Code:
    <!--[Loop Start QUERY:SELECT * FROM $favstable LEFT JOIN $membtable ON m_id=f_fav LEFT JOIN $picstable ON f_fav=i_user WHERE f_user=$en[m_id] AND i_status=2]-->
    
    <a href='<%dir%>view/<%m_user%>.html'>
    <img src='<%dir%>images/small/<%f_fav%>-<%i_id%>.jpg' border=1></a>
    <a href='<%dir%>view/<%m_user%>.html'>
    <%m_user%></a>
    
    <!--[Loop End]-->
    so if anyone has a ajax type pagination script i can use please let me know.
  • quantum-x
    Confirmed User
    • Feb 2002
    • 6863

    #2
    I must admit I have no idea what you're talking about, but hey, here's some pagination code I use.

    Does the nice 1, 2, 3 .... 98, 99,100 thing.
    Good luck (??)

    PHP Code:
    <?
    
     $start        =    $_start;
     $pCount    =    $_count;
     $pages        =    ceil($_items/$pCount);
     $curPage    =    $start/$pCount;
    
    ?>
    <div class="pages">Pages: <? if ($curPage == 0) { ?><img src="/images/arrow_back_off.png" border="0" /><? } else { ?><a href="<?=$_link?><?=($start-$pCount)?>/"><img src="/images/arrow_back.png" border="0" /></a><? } ?> <? if ($pages < 8) { for($i=0;$i<$pages;$i++) { ?><? if ($i==$curPage) { ?><span class="highlight"><?=($curPage+1)?></span><? } else {?><a href="<?=$_link?><?=($i*$pCount)?>/"><?=($i+1)?></a> <? } } } else { if($curPage > 2) { for($i=0;$i<3;$i++) { ?><a href="<?=$_link?><?=($i*$pCount)?>/"><?=($i+1)?></a> <? } ?> ... <? }; for($i=(($curPage > 2)?($curPage):0);$i<((($curPage+8)>=$pages)?$pages:($curPage+8));$i++) { ?><? if ($i==$curPage) { ?><span class="highlight"><?=($curPage+1)?></span> <? } else { ?><a href="<?=$_link?><?=($i*$pCount)?>/"><?=($i+1)?></a> <? } } ?>....<? for($i=($pages-3);$i<$pages;$i++) { ?><a href="<?=$_link?><?=($i*$pCount)?>/"><?=($i+1)?></a> <? } } ?><? if ($curPage >= ($pages-1)) { ?><img src="/images/arrow_forward_off.png" border="0" /><? } else { ?><a href="<?=$_link?><?=($start+$pCount)?>/"><img src="/images/arrow_forward.png" border="0" /></a><? } ?> </div>
    Last edited by quantum-x; 10-27-2008, 03:38 PM.
    PrettyInCash.com - BoozedGFs.com - TeenGFs.com - JizzGFs.com- MilfUploads.com -

    Comment

    • fris
      Too lazy to set a custom title
      • Aug 2002
      • 55679

      #3
      http://www.google.com/search?hl=en&q...ination+script
      Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

      Comment

      Working...