Why this next_page_link can't work correctly?

89 Views Asked by At

I have a code that basically is a "previous page" and "next page" button. The problem is that 'previous_page' works correctly but 'next_page' not and I don't know why.

Someone see something wrong in this code?

if ($vbulletin->GPC['pagenumber'] > 1) {
    k_add_function(
        $vbphrase['k_showthread_previous_page']
        ,$vbulletin->options['k_previous_page']
        ,"showthread.php?t={$threadinfo['threadid']}&page=" . ($vbulletin->GPC['pagenumber']-1)
        ,$vbphrase['k_showthread']
    );
} else if ($vbulletin->GPC['pagenumber'] < ceil($totalposts / $perpage)) {
    k_add_function(
        $vbphrase['k_showthread_next_page']
        ,$vbulletin->options['k_next_page']
        ,"showthread.php?t={$threadinfo['threadid']}&amp;page=" . ($vbulletin->GPC['pagenumber']+1)
        ,$vbphrase['k_showthread']
    );
}

I was wondering if maybe could be related with my modrewrite url-path which is [forum_title]/index[forum_page].html but the true is that previous_page works so I don't know... I would appreciate some help.

1

There are 1 best solutions below

0
On

I have just seen a potential typo, could this be the problem:

In the prev link you have $vbphrase['kb_showthread'] but in the next link you have $vbphrase['k_showthread'] should the next link also be $vbphrase['kb_showthread']