1 (edited by 2013-05-18 19:47:52)

Topic: Address the full story

How to modify the file show_news.php and /inc/shows.inc.php and lead to links on the page index.php open to the news.php?subaction=showfull&id=1368553200&ucat=8&

index.php titles refer to news.php?...

Please help

Re: Address the full story

Assuming you're not using pop-ups — open /core/core.php and find line 941-944:

            if ($archive)
                $URL  = RWU( 'archreadmore', $PHP_SELF . build_uri('subaction,id,archive,ucat,title,template', array('showfull', $news_arr[0], $archive, $news_arr[NEW_CAT],titleToUrl($news_arr[NEW_TITLE]),$template)) . "&$user_query" );
            else
                $URL  = RWU( 'readmore', $PHP_SELF . build_uri('subaction,id,ucat,title,template', array('showfull', $news_arr[0], $news_arr[NEW_CAT],titleToUrl($news_arr[NEW_TITLE]),$template)) . "&$user_query" );

Replace with

            if ($archive)
                $URL  = $PHP_SELF.RWU( 'archreadmore', $PHP_SELF . build_uri('subaction,id,archive,ucat,title,template', array('showfull', $news_arr[0], $archive, $news_arr[NEW_CAT],titleToUrl($news_arr[NEW_TITLE]),$template)) . "&$user_query" );
            else
                $URL  = $PHP_SELF.RWU( 'readmore', $PHP_SELF . build_uri('subaction,id,ucat,title,template', array('showfull', $news_arr[0], $news_arr[NEW_CAT],titleToUrl($news_arr[NEW_TITLE]),$template)) . "&$user_query" );


-------

For comment links, find in /core/core.php lines 912-915:

        if($archive)
            $URL = RWU( 'archreadcomm', $PHP_SELF . build_uri('subaction,id,ucat,title,template,archive', array('showcomments', $news_arr[NEW_ID], $news_arr[NEW_CAT], titleToUrl($news_arr[NEW_TITLE]))) );
        else
            $URL = RWU( 'readcomm', $PHP_SELF . build_uri('subaction,id,ucat,title,template', array('showcomments', $news_arr[NEW_ID], $news_arr[NEW_CAT], titleToUrl($news_arr[NEW_TITLE]))) );


Replace with

        if($archive)
            $URL = $PHP_SELF.RWU( 'archreadcomm', $PHP_SELF . build_uri('subaction,id,ucat,title,template,archive', array('showcomments', $news_arr[NEW_ID], $news_arr[NEW_CAT], titleToUrl($news_arr[NEW_TITLE]))) );
        else
            $URL = $PHP_SELF.RWU( 'readcomm', $PHP_SELF . build_uri('subaction,id,ucat,title,template', array('showcomments', $news_arr[NEW_ID], $news_arr[NEW_CAT], titleToUrl($news_arr[NEW_TITLE]))) );


In your index.php page, you have an include code. Something like:

<?php
include('./cutenews/show_news.php');
?>

Add a variable declaration $PHP_SELF above the include() line:

<?php
$PHP_SELF = "news.php";
include('./cutenews/show_news.php');
?>

That should do the trick.

3 (edited by 2013-05-21 17:15:21)

Re: Address the full story

Thanks a lot. It was enough to add:

<?php
$PHP_SELF = "news.php";
include('./cutenews/show_news.php');
?>

Posts: 3

Pages 1

You must login or register to post a reply

CutePHP Forums → Problem Solving / Help & Support → Address the full story



The pun_antispam official extension is installed. Copyright © 2003–2009 PunBB.