27 Responses to “Paginate Your Site Like Digg”
Leave a Reply
Categories
- Artwork (1)
- Browsers (2)
- Business (1)
- Client Work (4)
- CSS (3)
- Design (6)
- Development (2)
- Entrepreneurship (5)
- Humor (1)
- Interactive 8ball (3)
- Mobile Web (1)
- New Projects (4)
- News (5)
- PHP (4)
- Tutorial (1)
- Uncategorized (1)
- Web (13)
- WineLog (3)
Archives




July 7th, 2006 at 4:20 pm
[…] I hope this helps those who were interested. Please post any questions or comments concerning the code at the Stranger Studios blog post on the demo. Thanks. […]
August 23rd, 2006 at 7:36 am
Any simple way to integrate this into Wordpress? I’ve been trying but have run into a lot of error messages.
October 11th, 2006 at 12:24 am
Hrmmm, this saves a hell out of my time. I’m planning to write similar like this. Thanks Jason!
Jason
(yes, i’m jason too)
November 28th, 2006 at 6:28 pm
[…] Paginate your site like-digg […]
December 27th, 2006 at 3:19 am
Nice, this is useful! I’ve ported a version to Perl, which I’ll email to you.
December 29th, 2006 at 1:13 pm
[…] Earlier in the year, I wrote a tutorial on how to create pagination similar to Digg’s. The article focused on the basic algorithm for displaying the pagination, and there was definitely some opportunity for improvement in its implementation. […]
January 16th, 2007 at 2:42 pm
Great code!!!
I was tring to use it in my site, but the ” page nav buttons ” did not show up.
The listed iterms are fine. any hint?
BTW seems not work when I check the page source.
Thanks
March 8th, 2007 at 6:29 pm
Hi!
I have problem vith this script “undefined variable $page”!
So i add >>>if (isset($_GET[’page’])){$page=$_GET[’page’];}else{$page=0;}0)
$start = ($page - 1) * $limit;
……..
Regards
March 12th, 2007 at 8:14 pm
[…] La creación de esta plugin de paginación fue basada en la versión modular creada a partir de la original creada por strangerstudios.com. […]
March 31st, 2007 at 12:08 am
[…] This is ASP based pagination script, similiar to Digg.com pagination. The credit goes to Jason Coleman who written this script in PHP and I simply converted this into ASP. I have attached screenshot this will help you to see how it looks like. […]
April 12th, 2007 at 9:09 pm
[…] I’ve been on a bit of a digg kick lately and I like how they handle paging so I decided to create a GridView control that uses custom paging similar to digg’s. The algorithm is based on this post. As far as html output goes, this should be fairly close to the actual output on digg and I’m using digg’s stylesheet in the demo. […]
May 14th, 2007 at 3:40 pm
Hey, great script!
One note for people working with php and not being an expert, I had a small issue come up where it thought the numbers were part of the variable. I had to change the code slightly…
FROM:
$pagination .= “1“;
$pagination .= “2“;
TO:
$pagination .= “1“;
$pagination .= “2“;
May 16th, 2007 at 12:41 pm
Brad, they look the same to me. Can you explain the change?
If I had more time I would take a look at the code to see what you were talking about.
May 17th, 2007 at 4:28 am
Cool stuff!
Got any Javascript version of this?
June 18th, 2007 at 2:18 pm
Thanks so much to you digg, you are a sweet man. I am trying to use your pagination system on my website.It look so nice, that i am going to change all what i had.
One more again thanks…You can just see the system here www.icom7.com
July 3rd, 2007 at 11:45 am
Some people are finding out that you may have to declare the variables passed in through the URL at the top of your code. (my server settings allow me to just access them directly)
You can add some code like the following to the top:
$page = $_REQUEST[’page’];
Rinse and repeat for any other variables you’re passing around.
August 17th, 2007 at 10:12 am
Hi Jason,
I have not taken this live on my site yet, I am just testing at this
point…..
But, I have a question… I have a var, search, in a form that calls this page. The script seems to execute fine, but it is completely empty even when I make a selection that should yield ~150 results.
Any ideas on what I could be doing wrong?
Thanks,
Jim
August 17th, 2007 at 10:46 am
Hi, Jim. I’d need to see more of your code to help you out. My guess is there is some error in your SQL query. Make sure that the variable passed by your form really has something in it. Do an “echo $search” at the top of the script. If you aren’t seeing what you should, make sure you are setting the variable (needed on some servers) like so “$search = $_REQUEST[’search’];”.
Good luck. Feel free to email me for more help.
August 17th, 2007 at 11:41 am
Hello again Jason,
The vars are being passed properly. I placed a print statement in the script to verify this.
My question is what var should have the search term in it?
I tried search to no avail….
August 25th, 2007 at 8:08 pm
Could someone please send me a reference of a simple page that impliments this script with just a few pictures on it. I’m really new to this stuff and can not figure it out. I want to use it on my site - imediadotcom.com
August 25th, 2007 at 8:11 pm
sorry, i also don’t use sql.
September 2nd, 2007 at 12:30 am
The digg style solution here is great. Do you know how to incorporate this into Movable Type 4? I see that you have a Wordpress solution. It’d be great if this could also work in MT4. Thanks.
September 2nd, 2007 at 10:32 am
I’m not as familiar with Movable Type and its plugins. You can hit up Mis-Algoritmos here:
http://www.mis-algoritmos.com/2007/05/27/digg-style-pagination-class/
btw, that’s an interesting class implementation. It’s pretty sweet. I know though that when I was first learning PHP, classes were almost always over kill for me and confused me a bit. If this is you, take a look at some of the older code.
However, if you are already familiar with classes and/or a PHP expert already who is looking to save time, take a look at that class and use it.
December 19th, 2007 at 8:38 am
I am having troubles implementing the digg style pagination system into my project. http://www.superwebcamgirls.com can anyone help me with a simple more detailed code.
March 3rd, 2008 at 4:34 am
The only thing I had to add at the beginning was:
if(isset($_REQUEST[”page”])) {
$page = $_REQUEST[”page”];
} else if(isset($_POST[”page”])) {
$page = $_POST[”page”];
} else if(isset($_GET[”page”])) {
$page = $_GET[”page”];
}
after I made the connection to the DB.
You can see it at work:
http://www.axewar.com/topaxe.php5
March 19th, 2008 at 9:26 pm
Thanks for this excellent piece of script!! Easy to implement and works like a charm!
March 19th, 2008 at 10:33 pm
Mahesh,
Looks great on your site. Very nice site also, btw. I should probably add your code to the top of my implementation. It’s only needed if you don’t use the register_globals. However, if you do register globals, this code doesn’t hurt.
Sander, glad it worked out for you.