Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-27-2008, 04:10 PM   #1
acctman
Confirmed User
 
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
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.
acctman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-27-2008, 04:36 PM   #2
quantum-x
Confirmed User
 
quantum-x's Avatar
 
Join Date: Feb 2002
Location: ICQ: 251425 Fr/Au/Ca
Posts: 6,863
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 at 04:38 PM..
quantum-x is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-27-2008, 04:36 PM   #3
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,219
http://www.google.com/search?hl=en&q...ination+script
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.