Topic: Individual category x pagination

Hello,

Well, I don't know how to call this, but here is what's happening to me with cn 1.5.3:

When I'm browsing an individual category (ex: /index.php?cid=20) and trying to get on the another page it generates this url "/index.php?start_from=5&ucat=20," but it suddenly shows all articles instead of just the articles that are in the choosen category. But when I rewrite the url to "/index.php?start_from=5&cid=20" it works fine.

So what should I do? It's something wrong with the categories or the pagination?

Re: Individual category x pagination

Could you show your PHP include code here? Thanks.

Re: Individual category x pagination

Do you mean this?

    <?PHP
$number=5;
$only_active=TRUE;
include("news2/show_news.php");
?>

Re: Individual category x pagination

I'm sorry for DP BUT I just tried to update my CN with the files from github and it still doesn't work.

The url "/index.php?ucat=..." simply doesn't work for me, anyone know how to fix it, please?

Re: Individual category x pagination

Hello sorry for the late reply,

First of all if you are displaying your news as individual category, you should include a $category to your include code. Add this,

<?PHP
$number=5;
$only_active=TRUE;
$category = "20";
include("news2/show_news.php");
?>

Where $category is the category ID for the category you wish to display. Give this a try and get back to me.

Re: Individual category x pagination

I have the same issue. Anybody could help us?

Re: Individual category x pagination

test

Re: Individual category x pagination

I've found a solution.

open core/com/allow_active_news.php

replace line 155 with:

$URL = $PHP_SELF . build_uri('category,start_from,archive,subaction,id:comm_start_from', array($ucat, $prev, $url_archive, $subaction, $id));

replace line 178 with:

$URL = $PHP_SELF . build_uri('category,start_from,archive,subaction,id:comm_start_from', array($ucat,$pages_start_from,$url_archive,$subaction,$id));

replace line 198 with:

$URL = $PHP_SELF . build_uri('category,start_from,archive,subaction,id:comm_start_from', array($ucat, $i, $url_archive, $subaction, $id));

Re: Individual category x pagination

I'm having the same problem with the pagination by categories, but I have cutenews 2.0 and all solutions are for previous versions. Someone can help me?

Re: Individual category x pagination

I'm having the same problem with the pagination by categories, but I have cutenews 2.0 and all solutions are for previous versions. Someone can help me?

I went to create a page that contains only an individual category news and it seems to work fine. I am using CuteNews 2.0.

Can you post your PHP code here for me to see?

Re: Individual category x pagination

My code:

<?PHP
   $PHP_SELF ="cutenews/example.php";
   $category ="1";
   include("cutenews/show_news.php");
?>

Re: Individual category x pagination

I was doing some tests and the pagination by categories problem just happens when I use "rewrite engine". When this option is turned off everything works perfectly.

Posts: 12

Pages 1

You must login or register to post a reply

CutePHP Forums → Problem Solving / Help & Support → Individual category x pagination