GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Dynamic pagination? (https://gfy.com/showthread.php?t=864962)

acctman 10-27-2008 04:10 PM

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 10-27-2008 04:36 PM

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>


fris 10-27-2008 04:36 PM

http://www.google.com/search?hl=en&q...ination+script


All times are GMT -7. The time now is 11:14 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc