1 (edited by 2014-11-26 13:44:55)

Topic: << Previous Next >> Pagination Problem (2.0.2+last update from GitHub)

Hi all..
I try to include more then once code in same Index.php file.
Here is my code just for test to be clear:

index.php

<!DOCTYPE html><!-- HTML5 -->
<html lang="bg-BG" dir="ltr">
    <head>
        <title>News Test</title>
        <meta charset="utf-8" />
        
    </head>
    <body>
    <div>
    
        <div>
                <?PHP
                    //$static = TRUE;
                    $template = "Temp1";
                    $category = "1";
                    $number = 2;
                    include("../page/news/show_news.php");
                    ?>
        </div>
        <div>
                <?PHP
                    //$static = TRUE;
                    $template = "Temp2";
                    $category = "2";
                    $number = 2;
                    include("../page/news/show_news.php");
                    ?>
        </div>
        <div>
                <?PHP
                    //$static = TRUE;
                    $template = "Temp3";
                    $category = "3";
                    $number = 2;
                    include("../page/news/show_news.php");
                    ?>
        </div>
    </div>
    </body>
</html>

There are 3 diferent templetes and 3 diferent categories.

Here is how this look like:
https://cutephp.com/forum/uploads/monthly_11_2014/post-137054-1416946204.jpg

And when click Next >> happens this:
https://cutephp.com/forum/uploads/monthly_11_2014/post-137054-1416946211.jpg

Show 1st news in all includes.


What I want to do is when click next>> or << Previous in 1st include to change information only there.

<?PHP
                    //$static = TRUE;
                    $template = "Temp1";
                    $category = "1";
                    $number = 2;
                    include("../page/news/show_news.php");
                    ?>

What is idea of this code. My idea is when i have 3 difrent news includet in one page to show in independent place.
When i click next or pr.. to change information only in first include and all other to stays the same.
I update cutenews to a last version but nothing.
I play with this //$static = TRUE; but same result.
I search in all forum posts but i cant find answer.

Sorry for my question but i'm new in php and cutenews.
Please I hope somone can help me https://cutephp.com/forum/style_emoticons/default/smile.gif

Re: << Previous Next >> Pagination Problem (2.0.2+last update from GitHub)

Does anyone have any idea how to fix it ?

Re: << Previous Next >> Pagination Problem (2.0.2+last update from GitHub)

In the current version of CuteNews you cannot have more then one instance of news displayed on one page using show_news.php. This is due to the fact that GET and POST requests are processed  simultaneously and equally in all variants of show_news.php. Simply put, after clicking the Next >> or << Previous the variables become the same for all instances, which results in displaying three identical news columns.
We have taken this issue into account and in the next version of CuteNews there wiil be the possibility to create more than one instance on a page.

Best regards,
CN Support team

Re: << Previous Next >> Pagination Problem (2.0.2+last update from GitHub)

In the current version of CuteNews you cannot have more then one instance of news displayed on one page using show_news.php. This is due to the fact that GET and POST requests are processed  simultaneously and equally in all variants of show_news.php. Simply put, after clicking the Next >> or << Previous the variables become the same for all instances, which results in displaying three identical news columns.
We have taken this issue into account and in the next version of CuteNews there wiil be the possibility to create more than one instance on a page.

Thnx for answer Support_Team.
I hope there will be fix soon. And will be announced in this post too https://cutephp.com/forum/style_emoticons/default/smile.gif

I think there is simple way to be fixed. When I include rss, show_archives, search there is no conflict with show_news.
If there is templete like  rss, show_archives, search but with name like show_snews(s-second),  show_tnews(t-third),  show_fnews(f-fourth)
I am not a specialist only offer hope I helped.
This is the most well-made News machine.
My admiration of everyone working on the project CuteNews.