Digg Style Pagination Class
Based on the modular version for the pagination, now I have created a version easier to implement, using classes for PHP version 4. The implementation is simple, is necessary to include the class with a require or an include. We defined basic properties for pagination such as an amount of elements to paginate, elements by page, page to which the element "page" will be sent, you need a CSS style and finally we generate the pagination to show it.
If you're looking for how to paginate your SQL query? This other entry is for you: How to paginate your SQL querys.
- include(ABSPATH.'/includes/pagination.class.php');
- /*
- Now you can work with de pagination class
- */
- Download Version 0.4.1 (2008-04-11)
- Added getOutput() function.
- Version 0.4 (2007-10-21)
- Added class next and prev to next and prev buttons.
- Bug fix
- Version 0.3.3 (2007-10-05)
- Possibility to set 0 as the current page (no page selected). Back and Next buttons won't be shown.
- Version 0.3.2 (2007-09-19)
- Changed round to ceil (line 122)
Version 0.3.1(2007-08-23)Changed ceil to round (line 122)
- Version 0.3 (2007-07-10)
- Added the URL friendly functionality.
- Version 0.2 (2007-06-15)
- show an error and description if the function was called wrongly.
- Sends & instead of ? if the current file has vars in $_GET
- can change the name of the parameter ?page=
- there is no necessary to calculate in a manual way the pagination ($class->calculate()), is automatically when you show it the first time
- and others functionalities
- Version 0.1 (2007-05-27)
- First version
Dowload and unrar where you will work with the class. For the CSS, you can take one fromthis list.
If you forget a parameters to show or calculate the pagination. The class will show you a error to remember that. by example:
- $p=new pagination();
- $p->show();
the results:
It is necessary to specify the limit of items to show per page ($class->limit(10))
by default, the target of the pagination link is the same file where the paginations is showed. you can change it. using $class->target(file)
- $p = new pagination;
- $p->items(1000);
- $p->limit(10);
- $p->target("?foo=var");
- $p->show();
You can change the name of the parameter that brings the current page value. Using the $class->parameterName("p") you will see how the links changes the target to ?p=X instead of ?page=X
- $p = new pagination;
- $p->items(1000);
- $p->limit(10);
- $p->currentPage(1);
- $p->parameterName("p");
- $p->show();
Defining the pagination on its basic way, specifying an amount of items, limits of items by page, the pointed file by the pagination and the number of the present page.
- $p = new pagination;
- $p->Items(1000);
- $p->limit(5);
- $p->target("paginator.php");
- $p->currentPage(2);
- $p->show();
Defining in 1 the amount of adjacent pages to the present page.
- $p = new pagination;
- $p->Items(1000);
- $p->limit(5);
- $p->target("paginator.php");
- $p->currentPage(50);
- $p->adjacents(1);
- $p->show();
Defining in 3 the amount of adjacent pages to the present page.
- $p = new pagination;
- $p->Items(1000);
- $p->limit(5);
- $p->target("paginator.php");
- $p->currentPage(50);
- $p->adjacents(3);
- $p->show();
Defining in 4 the amount of adjacent pages to the present page.
- $p = new pagination;
- $p->Items(1000);
- $p->limit(5);
- $p->target("paginator.php");
- $p->currentPage(50);
- $p->adjacents(4);
- $p->show();
Activating the functionality to show the pages amount.
- $p = new pagination;
- $p->Items(1000);
- $p->limit(5);
- $p->target("paginator.php");
- $p->currentPage(6);
- $p->showCounter(true);
- $p->show();
Changing the text of the navigation tags and removing the icons.
- $p = new pagination;
- $p->Items(1000);
- $p->limit(5);
- $p->target("paginator.php");
- $p->currentPage(7);
- $p->nextLabel('<strong>Siguiente</strong>');//changing next text
- $p->prevLabel('<strong>Anterior</strong>');//changing previous text
- $p->nextIcon('');//removing next icon
- $p->prevIcon('');//removing previous icon
- $p->show();
Removing the text of the navigation tags.
- $p = new pagination;
- $p->Items(1000);
- $p->limit(5);
- $p->target("paginator.php");
- $p->currentPage(8);
- $p->nextLabel('');
- $p->prevLabel('');
- $p->show();
Changing the icons of the navigation tags
- $p = new pagination;
- $p->Items(1000);
- $p->limit(5);
- $p->target("paginator.php");
- $p->currentPage(9);
- $p->nextIcon('►');
- $p->prevIcon('◄');
- $p->show();
Removing the text of the navigation tags and changing the icons.
- $p = new pagination;
- $p->Items(1000);
- $p->limit(5);
- $p->target("#");
- $p->currentPage(10);
- $p->nextLabel('');//removing next text
- $p->prevLabel('');//removing previous text
- $p->nextIcon('►');//Changing the next icon
- $p->prevIcon('◄');//Changing the previous icon
- $p->show();
Changing the div class (<div class="class">Pagination</div>) that surrounds the pagination (to manipulate many CSS styles)
- $p = new pagination;
- $p->Items(1000);
- $p->limit(5);
- $p->target("#");
- $p->currentPage(11);
- $p->changeClass("jogger");
- $p->show();
- $p->changeClass("tres");
- $p->show();
- $p->currentPage(14);
- $p->changeClass("meneame");
- $p->show();
To use the URL friendly, we need to execute the function $p->urlFriendly();. So we need to add to the $p->target("#"); the placeholder % where we need the page numbers. If we need to change the placeholder, we can do it send it the desired char as parameter to the function $p->urlFriendly('[...]');, and to the $p->target("#[...]");.
- $p = new pagination;
- $p->Items(1000);
- $p->limit(5);
- $p->currentPage(14);
- $p->urlFriendly();
- $p->target("#page/%/");//#page/1/
- $p->show();
- $p->urlFriendly('[...]');
- $p->target("#pagina/[...]/");//#pagina/1/
- $p->show();
- $p->urlFriendly(false);
- $p->target("#");//#page=1
- $p->show();
Mis Algoritmos » Blog Archive » Some styles for your pagination
2007-05-27 19:34:43
[...] Algoritmos El acordeón que todos necesitamos… « WP Digg Style Pagination Plugin Digg Style Pagination Class [...]
Mis Algoritmos
2007-05-27 19:45:21
<strong>How to create a digg and sabros.us style pagination with PHP</strong>
[Demo] [WP-Digg Style Pagination Plugin] [Some Styles for your pagination]
I made a few modifications to the sabros.us’s pagination script, inspired by the original created by strangerstudios.com, it needs a detail, turn it into a dynamic ...
JL
2007-05-28 15:45:29
Oye, en el momento que haces click sobre una de las paginas, te refresca la página agregando la línea "?page=n" (parámetro por GET) pero si yo intento utilizarla dentro de una página que ya utiliza el GET hace falta que ponga el ampersan (&) y agregue "page=n". De lo contrario no se podrá utilizar en páginas que ya tengan parámetros.
Victor De la Rocha
2007-05-31 07:54:13
@JL de hecho olvidé ese punto, le adicionaré ese detalle.
Mis Algoritmos » Blog Archive » WP Digg Style Pagination Plugin
2007-06-01 20:06:59
[...] If you wish to use the pagination in some of your systems programmed by own account you can use the Digg Style Pagination Class. A version easier to implement, using classes for PHP version 4. The implementation is simple, is [...]
LM
2007-06-06 09:19:51
Hi,
A question.....
How can we change the value of parameter that brings the current page value ?
E.G :
Instead of using, page=1, page=2.....page=n......
I would like to use page=20, page=40,page=60,page=80....
(the query is too complicated to change so this is the only way to display each items....)
thanks for the answer
Victor De la Rocha
2007-06-06 13:24:11
@LM you can add <strong>$id *= 10;</strong> to the <strong>get_pagenum</strong> function:
[php num=2]function get_pagenum_link($id){
$id *= 10;
if(strpos($this->target,'?')===false)
return "$this->target?$this->parameterName=$id";
else
return "$this->target&$this->parameterName=$id";
}[/php]
LM
2007-06-07 01:45:38
Great !
Thanks.
I get another trouble.... :-)
Well, it's working perfectly with the id incremented... but the pagination is still frozen on the page 1 even if you click on page 2,3,4,5,6......,n
and of course the button Next and previous doesn't work.......
Any idea ????
Muchas gracias....
Victor De la Rocha
2007-06-07 10:08:21
@LM <del datetime="2007-06-07T15:09:05+00:00">ok, I'm understand that. I will try to find a solution to your problem.</del>
The <strong>$_GET['page']</strong> value for <strong>$class->currentPage()</strong> value, you need divide it by 10.
[php num=2]if(isset($_GET['page'])){
$page = $_GET['page'] / 10;
$p->currentPage($page);
}else
$p->currentPage(2);[/php]
LM
2007-06-07 10:51:22
Thanks....
Where Do I need to modify in the pagination.class.php ?
Victor De la Rocha
2007-06-07 12:34:44
@LM You don't need to modify the pagination.class.php (only <a href="#comment-5027" rel="nofollow">this</a>). It only need to call the currentPage function with a value divided by 10.
[php num=4-8]$p = new pagination;
$p->items(1000);
$p->limit(10);
if(isset($_GET['page'])){
$page = $_GET['page'] / 10;
$p->currentPage($page);
}else
$p->currentPage(1);
$p->show();[/php]
LM
2007-06-08 04:30:30
Great !!
it works goods....
Thanks
Mis Algoritmos » Blog Archive » How to paginate your SQL querys
2007-06-10 03:19:56
[...] Mis Algoritmos Hi :) « Digg Style Pagination Class [...]
Uri
2007-06-24 08:51:50
Hey,
I'm getting an error with the include of the pagination.class.php (it works only in the same folder)
Error:
"Fatal error: Cannot instantiate non-existent class: pagination in......"
is there something i need to add in the pagination.class.php to solve that?
tnx
Victor De la Rocha
2007-06-24 11:50:58
"Fatal error: Cannot instantiate <strong>non-existent class</strong>: pagination in......"
You need to include the class.
chrispian
2007-07-26 10:19:07
Line 122 reads:
$lastpage = ceil($this->total_pages/$this->limit);
Using ceil you often get an extra blank page at the end. I changed it to
$lastpage = round($this->total_pages/$this->limit);
And it works perfectly.
Matun
2007-08-14 07:45:00
Victor,
I find your pagination class adorable! I am a newbie in php and it seems I can't get it working :~(
I have a project for which I coded other kind of pagination (every single page number displays, no matter how many results there are!) which didn't suit my needs. Now I tried to fire up your navigation class but it doesn't work for me. I don't know how can I call it the right way because it always displays my first 10 rows from a database and nothing happens. Can you propose a solution maybe? How does your class know what rows it needs to displays when some other page from your pagination class is called?
Kevin
2007-08-16 19:53:49
I got the class working for general test purposes, but need help configuring it to friendly urls. Say the address is www.mysite.com/archive/site-news If they click the 2nd page it takes them to www.mysite.com/archive/site-news?page=2 but I want it to read www.mysite.com/archive/site-news/2 Can someone help with this?
Kevin
2007-08-16 23:45:17
Well I sort of got it to work, I used:
$p->urlFriendly();
$p->target('%');
But this only works when the ending '/' is on the url. There has to be a way that works for both, right?
Victor De la Rocha
2007-08-17 19:07:45
:)
[php]$p->urlFriendly('[...]');
$p->target("http://mysite.com/archive/site-news/[...]/");[/php]
Kevin
2007-08-18 02:20:36
Thank you very much, you have an awesome class and thanks for sharing and helping so many!!
Wes
2007-08-19 04:36:01
"Line 122 reads:
$lastpage = ceil($this->total_pages/$this->limit);
Using ceil you often get an extra blank page at the end. I changed it to
$lastpage = round($this->total_pages/$this->limit);
And it works perfectly."
$lastpage = floor($this->total_pages/$this->limit);
works better
Di
2007-08-21 07:03:21
Thanks verymatch for this paging class!
Gawain
2007-08-30 14:51:17
I've got the script mostly working but I'm getting hung up on one aspect. With $p->limit(10) queries that return 15 or more rows work perfectly, however on queries that return less than 15 rows the pagination is not displayed. I'd expect that to happen with less than 10 rows only.
Am I doing something wrong, or do I need to adjust something within the class?
Thanks!
G
Alex
2007-09-01 23:26:40
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.
Jason Coleman
2007-09-02 09:34:44
This is great. Que excellente.
This class implementation looks great, and the way to go for folks comfortable with classes.
What plugin are you using to show code in your posts? I'm looking for a good one.
Victor De la Rocha
2007-09-04 07:04:51
Hola @<strong>Monsef</strong>, ¿Que version del plugin estas utilizando?Este problema fue solucionado en la última version de la classe (<a href="http://www.mis-algoritmos.com/wp-content/uploads/pagination.class031.rar" rel="nofollow">la 0.3.1</a>). Intenta descargandola, si siguen los problemas, me dejas un mensaje :)
@<strong>Alex</strong>: Maybe :)
Hi <strong>Jason Coleman</strong> I use the <a href="http://bluesome.net/post/2005/08/18/50/" rel="nofollow">Exec-PHP Plugin</a>.
WP Digg Style Pagination Plugin V 1.0
2007-09-09 13:07:19
[...] pagination class [...]
Mike Grishaver
2007-09-10 15:18:05
Nice class.
I also found an issue when dealing with the last page. For example, if I have 21 items, with a limit of 10 items per page, I should get 3 pages.
However, I am only getting 2 pages.
Looking at the code, you have a function called round, this only rounds up if the number is above .5. So it'll round up correctly if you have 25 items, to show 3 pages. But if 21 items, only gives 2 pages.
I changed the function from "round" to "ceil" to round up to the next integer and now it works.
http://www.php.net/manual/en/function.ceil.php
Victor De la Rocha
2007-09-11 22:53:52
hmm @Mike Grishaver which is <a href="#comment-8936" rel="nofollow">the solution</a>? =S
Monsef
2007-09-12 08:51:49
Hola
Hay mas error en tu classe , beuno 1 error no functiona correctamente con el FreindlyUrl , mustra paginas blancas he probado meter floor o ceil pero sgue iguale 3) cuando selectiona una pagina siempre se muesra la pagina 1 como selectionada asi que no coje la pagina selectionada si tenemos el urlRewriter activado , proba lo
si tienes alguna solucion por fa ayudanos
Gracias :D
Victor De la Rocha
2007-09-12 10:11:08
Uff, tienes razón y lo siento pero, no puedo darle gusto al mundo entero. Me contradije pero pues, no veo aún una manera mas simple de hacerlo.
Además, mucho ojo! <strong>Esto no es un plugin</strong> ¡ES UNA CLASE en todo su esplendor! su uso es SIMPLE: lo incluyes en tu scripts y te apoyas de ella para trabajar con alguna de tus aplicaciones. Jamás mencioné que esto fuera un plugin y tampoco que estuviera basado en otro plugin.
Si por alguna razón la paginación de consultas no fuese TU fuerte, intenté describir <a href="http://www.mis-algoritmos.com/2007/06/10/how-to-paginate-your-sql-querys/" rel="nofollow">un ejemplo</a> apoyándome de la clase =S
bahodir
2007-09-26 12:23:06
Any example how to use with MySQL queries?
Thnx.
Victor De la Rocha
2007-09-26 19:13:09
yes @bahodir, you can read <a href="http://www.mis-algoritmos.com/2007/06/10/how-to-paginate-your-sql-querys/" rel="nofollow">this</a>
Como hacer un Buscador con Ajax
2007-10-17 03:11:08
[...] Aquí [...]
Paginación para Wordpress y tus scripts en PHP
2007-10-20 09:22:05
[...] Digg style pagination class [...]
marko
2007-11-23 06:40:28
Thank you very much for your great script, works like a charm and easy to use. 5/5 :)
Paul
2007-11-24 23:23:52
need help
Hi...I am using your pagination class and I need your help. Pagination is working ok when I open the page first time but when I click on page links like 1,2,3,4 ....it says page can not be displayed. I am passing variables with data between pages using URL. When I put my cursor on these links 1,2,3,4,...etc, it doesn't show variables are attached to the url string. like in status bar it shows "http://localhost/filename.php?page=2". If I use another pagination it shows "http://localhost/filename.php?page=2Field=test1find=test2...". Here field and find are variables and test1 and test2 are values given to the variables.Do I need to change some code in the pagination class? Thanks for your nice pagination.
Paul
2007-11-25 09:49:36
sorry another pagination is like "http://localhost/filename.php?page=2&Field=test1&find=test2".
Thanks
Paul
2007-11-25 15:19:13
Hi
I am able to pass the parameters with url and pagination is working fine but it doesn't change the records. It just stays at page one and numbers at pagination get changed. Any help?
Thanks
Alex
2007-11-26 09:17:53
Hello...I am using limit 10 and your pagination is working fine but its showing results starting from 11(i.e. pagination link 1 starts from 11 to 20, pagination link 2 shows 21 to 30 and so on) and the last page is blank. I tried Floor or round at line 122 but it doesn't help me. I need your help.
thanks
Luiz
2007-12-11 06:46:25
Same to me.
I have 25 limit. And I have one blank page at last, chage to "round" or "floor" I dont get last results.
WaFi
2007-12-28 12:51:20
I need Example very simple ... Can you do That ?
(use select of table name of database)
Plz ....
I watting You ..
Andre Medeiros
2008-01-18 11:27:12
On line 148 of your class, it reads:
-----------------------------8page adjacents * 2)){
-----------------------------8<-----------------------------
I got a result, with 20 pages, on the 4th page, with something like:
< 1 2 ... 3 4 5 (etc)
In order to solve this, change the "if" statement to:
-----------------------------8page adjacents * 2)){
-----------------------------8<-----------------------------
Other than that, excelent job!
Tybek
2008-01-19 05:26:50
Hi, Thankyou for the class.
I made a modification to one function in your class in order for it to be xhtml compliant since I had problems getting it validated. Basically I added htmlspecialchars(). It now validates properly.
New function follows:
function get_pagenum_link($id){
if(strpos($this->target,'?')===false)
if($this->urlF)
return str_replace($this->urlF,$id,$this->target);
else
return "$this->target?$this->parameterName=$id";
else
return htmlspecialchars("$this->target&$this->parameterName=$id");
}
Deep
2008-02-07 23:34:35
Did I tell you, your code simply rocks.. I was waiting for this kind of pagination class and finally found it :)
turboliux blog » Blog Archive » Pamoka. Diegiam Wordpress puslapių numeravimą
2008-02-12 10:04:17
[...] įvairiausių šio kodo variacijų, tačiau siūlau rinktis paprastesnį. Galimi du instaliavimo variantai, arba jums teks šitą [...]
Renzoster
2008-03-04 10:22:37
Thanks for this script
gabriel
2008-04-09 12:46:31
muy bueno lo tuyo!
Jared
2009-05-11 23:58:34
Thanks for the code, I was just about ripping my hair out trying to write it myself :)
Victor De la Rocha
2009-05-12 00:08:49
You're welcome ;)
Ramon Fincken
2009-06-01 13:05:53
Excellent!
Not only a perfect pagination but also surrounding items and SEO possibilities!
Greg
2009-06-21 02:16:23
There is a bug in the class when on the third page of a sequence longer than 7 if using an adjacent value of 1.
It displays: 1 2 ... 2 3 4 ... 5 6
Instead of: 1 2 3 4 5 ...
To fix this, you need to adjust the code at this line:
if ($page < 1 + ($adjacents * 2) {
... and change it to:
if ($page < 1 + ($adjacents * 2) || ($adjacents == 1 && $page == 3)) {
Me
2009-08-09 00:14:09
Hello Greg. I had that bug too. And your solution was very good.
But the change is: if ($this->page < 1 + ($this->adjacents * 2) || ($this->adjacents == 1 && $this->page == 3)) {
You forgot to put the "$this" ;) Even so, thanks for solving that bug.
----------
And Victor, thanks very much for your class. Its adorable! Great work!!
Howie
2009-08-25 00:45:54
I cant make the url friendly pagination work. The page is stagnant and data is not getting refreshed.
$p->urlFriendly('[...]');
$p->target("http://www.mydomain.com/test_pagination.php/[...]/");
Another point is, how can i pass more than one variable via pagination using user friendly url?
Howie
2009-08-25 08:30:50
Hi,
Can anyone please suggest, how i can use more than one parameters or user defined parameters. I am using user friendly pagination and it is working fine but cant send more than one variables. This is my present code.
$p->urlFriendly('[...]');
$p->target("http://www.mydomain.com/test-pagination-[...].html");
Thanks ,
Howie
sdarknot
2009-09-04 18:23:47
esta bueno el tutorial buen trabajo man xD ....
sdarknot
2009-09-04 19:48:46
ah me olvidaba podrias poner tambien el archivo index.php esk no se su estructura pues si no es muxa molestia desde ya gracias xD....
Rinto
2009-09-09 00:30:01
Please help me ..
how do we this pagination when listing values from mysql db
I don't have any idea
alfredo
2009-09-28 13:42:49
Hola!, estoy tratando de usar esta clase con CodeIgniter y me sale el siguiente error:
A PHP Error was encountered
Severity: 8192
Message: Function eregi() is deprecated
Filename: libraries/pagination.php
Line Number: 57
Podrías actualizar esta clase para las nuevas versiones de PHP?
Gracias de antemano!
Victor De la Rocha
2009-11-08 22:12:58
@alfredo: Si sigues interesado, podrías hacerlo tu mismo. Cambiar el eregi por preg_match :)
Peter Browne
2009-11-27 17:39:10
Thought I might share my entire solution for paginating html files in a folder, works perfectly, just change the directory to suit!
<?
include('pagination.class.php');
function dirList ($directory){
// create an array to hold directory list
$results = array();
// create a handler for the directory
$handler = opendir($directory);
// keep going until all files in directory have been read
while ($file = readdir($handler)) {
sort($results, SORT_NUMERIC);
// if $file isn't this directory or its parent,
// add it to the results array
if ($file != '.' && $file != '..')
$results[] = $file;
}
// tidy up: close the handler
closedir($handler);
// done!
return $results;
}
$directory = 'pages';
$dirarray = (dirList($directory));
$total_pages = count($dirarray);
$items_perpage = 1;
$page = intval($_GET['page']);
if((!$page) || (is_numeric($page) == false) || $page<=0 || $page > ceil($total_pages/$items_perpage)) {
$page = 1; //default
}
$p = new pagination;
$p->Items($total_pages);
$p->limit($items_perpage);
$p->parameterName('page');
$p->adjacents(2);
$p->currentPage($page);
$p->target($_SERVER['PHP_SELF']);
$p->show();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="pagstyle.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?
include("pages/".$_GET[page].".html");
?>
</body>
</html>
V Srinath
2010-01-02 01:35:59
Your Pagination looks good.
$p->adjacents(1);
$p->adjacents(2);
$p->adjacents(3);
adjacents not works. any idea?
mingsas
2010-02-23 06:00:17
The class file has somewrong!
On the line of 75 ,the "echo" mustbe "return".
dRoope
2010-03-05 09:27:37
Verdaderamente ESPECTACULAR :)
Muchas gracias.
gsssss
2010-04-25 09:45:26
how to use with file read function?
victor
2010-06-06 13:17:46
Hola amigos necesito ayuda con la clase de paginacion, kiero ke en ves de hacer los botones de paginacion via href por javascript agregando una funcion pero no me da.. que estoy haciendo mal???
//siguiente button
ESTO SERIA EL ORIGINAL SIN MODIFICACION: if ($this->page < $counter - 1)
//$this->pagination .= "<a href="".$this->get_pagenum_link($next)."" class="next">$n</a>";
-----------------------------------------
ESTO LO KE MODIFICO, PASO EL $this a una variable $jj y se lo agrego a funcion balinks() pero al hacer clic no realiza nada...
{$jj= $this->get_pagenum_link($next);
$this->pagination .= "<a href="#" onclick="javascript:balinks($jj);" class="next">$n</a>";
GRACIAS ESPERO UNA PRONTA AYUDA
Victor De la Rocha
2010-06-06 18:55:11
No se que intentas hacer, pero definitivamente eso que pones no está bien:
Primero, $jj debería ser código javascript, y ahí lo estas imprimiendo como si fuera código php.
Segunda, no es tan simple como lo pones.
Explicate bien, ¿que quieres hacer?
droope
2010-06-17 12:35:42
Hay un bug en esta clase, que hace que cuando no se pasa el parametro $paginacion->currentPage se muestre medio deforme. (puede pasar que $_GET['page'] llegue vacío, por ejemplo)
Quizás podría verse como algo que no es necesario, pero en fin, opté por solucionarlo y compartirlo con ustedes:
http://pastebin.com/5iPWkZ8K
Un saludo,
Droope
Victor De la Rocha
2010-06-18 18:22:15
Muchas gracias Droope.