| ||||
Respuesta: Paginacion de Resultados Ok estaba mal, creo que este si: Código PHP:
__________________ la la la |
| ||||
Respuesta: Paginacion de Resultados A VER AHORA Código PHP:
__________________ la la la |
| ||||
Respuesta: Paginacion de Resultados ok cuando buscas asegurate que los filtros que les pongas, haya varios registros, sino no habrá paginacion, fijate en la variable $limite = 5; esos es la cantidad de productos que se mostrará por paginacambialo a 1 a ver que pasa porque si no hay mas de 5 no habrá otra página pa ver , se entiende? .
__________________ la la la |
| ||||
Respuesta: Paginacion de Resultados cambia esto <?php if (isset($_GET['pagina'])){paginacion();} ?> por esto <?php paginacion(); ?> abajo dentro de la td con eso debetrría funcionar
__________________ la la la |
| |||
Respuesta: Paginacion de Resultados Me aparecio el paginado !!!!! Cambia de pagina todo, pero es como que no funciona del todo bien. Se mezclan los contenidos. Por ejemplo de un articulo hay 5 cosas y muestra las 5 cosas y siguen apareciendo otros articulos.... Se puede solucionar? Gracias truman ! |
| |||
Respuesta: Paginacion de Resultados Cuando abris el catalogo aparecen todos los productos TODOS... (La idea era que aparezcan solo 4 y vayas pasando de pagina) Con el paginador abajo y cuando le das siguiente ahi empiezan a pasar de 4 en 4. Y bueno despues con las busquedas lo mismo aparecen todos los productos y si pones siguiente empiezan a pasar de 4 en 4 pero todos los registros no los que busque. Alguna solucion ?????? GRACIAS !! |
| |||
Respuesta: Paginacion de Resultados Y por qué no usas la clase para paginaciones kpaginate, es muy fácil de usar, seguro te funciona.
__________________ Páginas web de alta calidad y hechas a la medida. |
| |||
Respuesta: Paginacion de Resultados Me pueden ayudar a insertar kpaginate a mi codigo ? En este momento es el siguiente: Código PHP: |
| |||
Respuesta: Paginacion de Resultados Código PHP: Saludos!
__________________ Páginas web de alta calidad y hechas a la medida. |
| |||
Respuesta: Paginacion de Resultados Me dice esto con ese codigo: * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ class kpaginate{ private $ends = 2 ; private $show = 10 ; private $num_pgs = 0 ; private $total_items = 0 ; private $items_pg = 0 ; private $pg = 0 ; private $prefix = 'kpg' ; private $start = 0 ; private $stop = 0 ; private $getvars = array() ; private $without_numbers = false ; private $customvar = '' ; public static $correlative = 0 ; function __construct(){ self::$correlative++ ; $this->getvars = $_GET ; } public function withoutNumbers($bool){ $this->without_numbers = $bool ; } public function getLimit(){ return array(($this->pg * $this->items_pg), $this->items_pg) ; } public function setTotalItems($total_items){ $this->total_items = intval($total_items) ; if($this->items_pg > 0){ $this->setNumPages() ; if($this->customvar != '') $this->setCustomPage() ; else $this->setPage($this->getvars[$this->prefix][self::$correlative]) ; } } public function setItemsPerPage($items_pg){ $this->items_pg = intval($items_pg) ; if($this->total_items > 0){ $this->setNumPages() ; if($this->customvar != '') $this->setCustomPage() ; else $this->setPage($this->getvars[$this->prefix][self::$correlative]) ; } } private function setNumPages(){ $this->num_pgs = ceil($this->total_items / $this->items_pg) ; } private function setCustomPage(){ $pg = 0 ; $getstr = '' ; parse_str($this->customvar, $ctmout) ; while(is_array($ctmout)){ $getstr .= '[\'' . current(array_keys($ctmout)) . '\']' ; $ctmout = current(array_values($ctmout)) ; } eval('$pg = intval($this->getvars' . $getstr . ') ; ') ; if($pg > 0 && $pg < $this->num_pgs) $this->pg = $pg ; else $this->pg = 0 ; } private function setPage($pg){ $pg = intval($pg) ; if($pg > 0 && $pg < $this->num_pgs) $this->pg = $pg ; else $this->pg = 0 ; } private function createPageLink($pg){ $pg = intval($pg) - 1 ; if($this->pg == $pg) return ' class="selected" ' ; if($this->customvar != ''){ $customurl = urldecode(http_build_query($this->getvars) . '&' . $this->customvar . '=' . $pg) ; parse_str($customurl, $urlout) ; $lnk = 'href="?' . urldecode(http_build_query($urlout)) . '"' ; } else{ $this->getvars[$this->prefix][self::$correlative] = $pg ; $lnk = 'href="?' . urldecode(http_build_query($this->getvars)) . '"' ; } return $lnk ; } public function setCustomVar($varname = ''){ if(trim($varname) != '') $this->customvar = trim(strval($varname)) ; } private function calculateBuffers(){ $this->left = $this->right = ceil($this->show / 2) ; $this->start = ($this->pg + 1) - $this->left ; $this->stop = ($this->pg + 1) + $this->right ; if($this->start < 1){ $this->start = 1 ; $this->stop = $this->show + 1 ; if($this->stop > $this->num_pgs) $this->stop = $this->num_pgs ; } if($this->stop > $this->num_pgs){ $this->stop = $this->num_pgs ; $this->start = ($this->stop - $this->show) ; if($this->start < 1) $this->start = 1 ; } $this->start += $this->ends ; $this->stop -= $this->ends ; } public function paginate(){ if($this->total_items > $this->items_pg){ echo '' ; echo '' ; if($this->without_numbers == false){ if($this->num_pgs <= $this->show){ for($i = 1 ; $i <= $this->num_pgs ; $i++) echo '' ; } else{ $this->calculateBuffers() ; for($i = 1 ; $i <= $this->ends ; $i++) echo '' ; if($i != $this->start) echo '' ; for($i = $this->start ; $i <= $this->stop ; $i++) echo '' ; if($i != ($this->num_pgs - ($this->ends - 1))) echo '' ; for($i = ($this->num_pgs - ($this->ends - 1)) ; $i <= $this->num_pgs ; $i++) echo '' ; } } echo '' ; echo ' pg > 0 ? $this->createPageLink($this->pg) . ' class="back" ' : ' class="backdis" ') . '> createPageLink($i) . ' class="normal">' . ($i) . ' createPageLink($i) . ' class="normal">' . ($i) . ' ... createPageLink($i) . ' class="normal">' . ($i) . ' ... createPageLink($i) . ' class="normal">' . ($i) . ' pg < $this->num_pgs - 1 ? $this->createPageLink($this->pg + 2) . ' class="next" ' : ' class="nextdis" ') . '> ' ; } } } ?> y tira un error ( ! ) Fatal error: Class 'kpaginate' not found in C:\wamp\www\Suspension Norte\kpaginate.php on line 129 LINEA 129: $kpaginate = new kpaginate ; |
| |||
Respuesta: Paginacion de Resultados No puedo creerlo!!!!! tan rápido le quitaste los créditos!!!!!!!!!!, bueno... al problema. Puede que tu servidor web no esté interpretando correctamente el código por el nombre del archivo (no es un caso común, depende de la configuración de tu servidor y php). Intenta cambiando el nombre del archivo: class.kpaginate.php ->kpaginate.php y luego también cambia el nombre en el include (línea 4 aproximadamente). las primeras líneas te quedarán algo así: Código PHP: Saludos!
__________________ Páginas web de alta calidad y hechas a la medida. |
| |||
Respuesta: Paginacion de Resultados la primera línea del archivo class.kpaginate.php (que si lo renombraste ahora se llama kpaginate.php) tiene esto :
Código PHP:
agregale el php luego y unido, que te quede así:Ver original
Código PHP:
Ver original intenta y avisame.
__________________ Páginas web de alta calidad y hechas a la medida. |
| |||
Respuesta: Paginacion de Resultados Ahi me funciono anda todo bien pero en el medio de la pagina me aparece un error ( ! ) Notice: Undefined index: kpg in C:\wamp\www\Suspension Norte\paginate.php on line 79 Linea 79 del paginate.php: $this->setPage($this->getvars[$this->prefix][self::$correlative]) ; ANDA TODO PERFECTO SOLO FALTARIA QUE DESAPAREZCA ESTE ERROR! QUE PODEMOS HACER? MUCHAS GRACIAS |
| |||
Respuesta: Paginacion de Resultados hola gente soy nuevo en la comunidad y googleando encontre este foro tengo el mismo problema que bbrian me funciona todo perfecto el kpaginator pèro en el medio aparece ese error ( ! ) Notice: Undefined index: kpg in C:\wamp\www\Suspension Norte\paginate.php on line 79 Linea 79 del paginate.php: $this->setPage($this->getvars[$this->prefix][self::$correlative]) ; nadie tiene una solucion ?? lo necesitooooo gracias |
| |||
Respuesta: Paginacion de Resultados Por qué no comentan su problema en el lugar de donde sacaron el código?
__________________ Páginas web de alta calidad y hechas a la medida. |
| |||
Respuesta: Paginacion de Resultados ahi comente en http://www.aprender-a-programar.com/ pero por lo que veo en tu firma... no es tu blog ? |
| |||
Respuesta: Paginacion de Resultados jajaja, mirá mandame el código de la clase kpaginate por favor, ya lo había arreglado y eliminé el archivo sin querer. y para conseguirlo de nuevo tendría que esperar hasta el lunes!!!, la clase, el demo y la imagen pls.
__________________ Páginas web de alta calidad y hechas a la medida. |
Etiquetas: |