Different pages - page break FIX

Report bugs and errors in this forum.

Different pages - page break FIX

Postby DarkSlim » Mon Nov 02, 2009 4:39 pm

If you have different pages that show your news and you want
each to be able to use the "page break" option working well (dividing one post to multiple pages)
you will need to modify it so the pages links will not link to the your "home page" automaticly
and it can be done like this:

find:
Code: Select all
         if ($page_count > 1){
            $output = str_replace('[page-link]', '', $output);
            $output = str_replace('[/page-link]', '', $output);

            for ($i = 1; $i < $page_count + 1; $i++){
               if (($page and $page == $i) or ($allow_full_story and !$page and $i == 1)){
                  $pages .= ' <b>'.$i.'</b> ';
               } else {


Now we are talking on the one row under that, it starts with "$pages .= ' <a href=""

Change it to:

Code: Select all
$pages .= ' <a href="'.$PHP_SELF.'?id='.$row[id].'&page='.$i.'">'.$i.'</a> ';


Or if you are using friendly urls (rufus) you can use this instead:
Code: Select all
$pages .= ' <a href="'.$PHP_SELF.'?title='.$row[url].'&page='.$i.'">'.$i.'</a> ';


It worked for me (plus for some reason there was an "?page" instead of "&page" over there
(source files) which needed to be fixed too, hope it helps someone :)
User avatar
DarkSlim
 
Posts: 296
Joined: Thu Aug 06, 2009 4:18 pm
Location: IL

Return to Bugs and errors



Who is online

Users browsing this forum: No registered users and 1 guest

cron