The pagination links don't work

phpBB3 SEO Advanced mod Rewrite support forum.
This mods performs URL rewriting for phpBB, injecting forums and topic titles in their URLs.

Moderator: Moderators

The pagination links don't work

Postby tybi » Sun Dec 23, 2007 7:16 pm

Hi,

first of all - Guys, you rock!!! This premod for Gold phpBB3 is great.

But still... the pagination links don't work when I remove the .html from the URLs. Please, have a look: http://forum.seochat.sk/sem-marketing-pre-vyhladavace/

The pagination link is rewritten well, but the page does not show anything: http://forum.seochat.sk/ludia-zatial-ad ... t4/page10/

Thank you guys and MERRY CHRISTMAS!
tybi
 
Posts: 28
Joined: Sun Nov 04, 2007 3:41 pm

Advertisement

Postby dcz » Sun Dec 23, 2007 7:47 pm

You need to generate a new .htaccess after you change the suffixes.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21429
Joined: Fri Apr 28, 2006 9:03 pm

Postby tybi » Mon Dec 24, 2007 12:52 pm

Arrrrrr :? , I forgot to do that :D

Thanks.
tybi
 
Posts: 28
Joined: Sun Nov 04, 2007 3:41 pm

Postby TomaS » Tue Dec 25, 2007 11:47 am

i have this problem too.but only in viewforum
Pagination dont work it give me doent exist error 404. Where can be problem?
bad url cashing, .htaccsess,...?And i have install mod again it wasnt update
phpBB podpora-slovak phpBB support
slovenský preklad pre phpbb3-slovak translate for phpBB3
predaj a kupa domeny, marketing a internetove podnikanie- Slovak domain center
TomaS
PR2
PR2
 
Posts: 229
Joined: Fri Jun 08, 2007 1:22 am

Postby SeO » Tue Dec 25, 2007 3:25 pm

So, is it working now ?

Looks like you as well needed to generate a new .htaccess ;)
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby TomaS » Tue Dec 25, 2007 7:17 pm

no it doesnt. I have brand new instalation becuase som problem whit update so i need it install again.Everythinks work perfeckt but only for example here
http://www.phpbb3.sk/forum/phpbb3-podpora.html when you cluick on pagination show 404 error so i dnot know where can be mistake.I have looked again on viewforum code wich i have added but it is ok just like in install guide so that is coreckt is it possible that in installation is error in viewforum pagination?Try this someone else?In viewtopic works good only in viewforum
thx for help and some idea how to fix it
phpBB podpora-slovak phpBB support
slovenský preklad pre phpbb3-slovak translate for phpBB3
predaj a kupa domeny, marketing a internetove podnikanie- Slovak domain center
TomaS
PR2
PR2
 
Posts: 229
Joined: Fri Jun 08, 2007 1:22 am

Postby dcz » Wed Dec 26, 2007 2:20 pm

I see, actually, pagination is not rewritten at all.

I think you made some mistake while updating the includes/functions.php and the includes/functions_display.php files (functions generate_pagination and topic_generate_pagination).

Please double check.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21429
Joined: Fri Apr 28, 2006 9:03 pm

Postby TomaS » Wed Dec 26, 2007 4:40 pm

No everythink looks fine
Code: Select all
#
#-----[ FIND ]------------------------------------------
#

/**
* Generate topic pagination
*/
function topic_generate_pagination($replies, $url)
{
   global $config, $user;

#
#-----[ AFTER, ADD ]------------------------------------------
#

   // www.phpBB-SEO.com SEO TOOLKIT BEGIN
   global $phpbb_seo, $phpEx;
   // www.phpBB-SEO.com SEO TOOLKIT END
and
Code: Select all
#
#-----[ FIND ]------------------------------------------
#

function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = false, $tpl_prefix = '')
{
   global $template, $user;

#
#-----[ AFTER, ADD]------------------------------------------
#

   // www.phpBB-SEO.com SEO TOOLKIT BEGIN
   global $phpbb_seo, $phpEx;
   // www.phpBB-SEO.com SEO TOOLKIT END

this is coreckt
only here
Code: Select all
#
#-----[ FIND ]------------------------------------------
#

   }
   else
   {
      $pagination = '';
   }

#
#-----[ BEFORE, ADD ]------------------------------------------
#

      // www.phpBB-SEO.com SEO TOOLKIT BEGIN
      if (is_object($phpbb_seo) && strpos($pagination, '.' . $phpEx) === FALSE) {
         static $pagin_find = array( '`(\.[a-z0-9]+)([\w\#$%&~.\-;:=,?@+]*)&start=([0-9]+)`i', '`/([\w\#$%&~.\-;:=,?@+]*)&start=([0-9]+)`i' );
         static $pagin_replace = array();
         if (empty($pagin_replace)) {
            $pagin_replace = array( $phpbb_seo->seo_delim['start'] . '\\3\\1\\2', '/' . $phpbb_seo->seo_static['pagination'] . '\\2' . $phpbb_seo->seo_ext['pagination'] .'\\1' );
         }
         $pagination = str_replace( '&start=0', '', $pagination );
         $pagination = preg_replace( $pagin_find, $pagin_replace, $pagination );
      }
      // www.phpBB-SEO.com SEO TOOLKIT END
if i add it too close to }
else
{ show me error so i added there one line
phpBB podpora-slovak phpBB support
slovenský preklad pre phpbb3-slovak translate for phpBB3
predaj a kupa domeny, marketing a internetove podnikanie- Slovak domain center
TomaS
PR2
PR2
 
Posts: 229
Joined: Fri Jun 08, 2007 1:22 am

Postby TomaS » Thu Dec 27, 2007 10:52 pm

i have copied files (function and functions_display.php) from your premod pack but it is same.No change.I think mistake must be here in those 2 files but where?DCZ did you try it this situation if is it work?on viewforum?
phpBB podpora-slovak phpBB support
slovenský preklad pre phpbb3-slovak translate for phpBB3
predaj a kupa domeny, marketing a internetove podnikanie- Slovak domain center
TomaS
PR2
PR2
 
Posts: 229
Joined: Fri Jun 08, 2007 1:22 am

Postby dcz » Fri Dec 28, 2007 10:00 am

Grr, this is indeed a bug !!

It was tricky to find out, because it only conserns domains with ".php" in it, such as -www.phpbb3.sk or phpbb3.phpbb-seo.net !

I had not tested pagination on such domains, my fault, sorry.

Anyway, here is the fix, which will lead us to an update very soon :
Code: Select all
#
#-----[ OPEN ]------------------------------------------
#

includes/functions.php

#
#-----[ FIND ]------------------------------------------
#

   // www.phpBB-SEO.com SEO TOOLKIT BEGIN
   $prev =  ($on_page == 1) ? '' : $base_url . "{$url_delim}start=" . (($on_page - 2) * $per_page);
   $next = ($on_page == $total_pages) ? '' : $base_url . "{$url_delim}start=" . ($on_page * $per_page);
   if (is_object($phpbb_seo) && strpos($page_string, '.' . $phpEx) === FALSE) {
      static $pagin_find = array();
      static $pagin_replace = array();
      static $prev_find = array();
      if (empty($pagin_replace)) {
         $pagin_find = array('`(\.[a-z0-9]+)([\w\#$%&~\-;:=,?@+]*)(&|\?)start=([0-9]+)`i', '`/([\w\#$%&~\-;:=,?@+]*)(&|\?)start=([0-9]+)`i' );
         $pagin_replace = array( $phpbb_seo->seo_delim['start'] . '\\4\\1\\2', '/' . $phpbb_seo->seo_static['pagination'] . '\\3' . $phpbb_seo->seo_ext['pagination'] . '\\1' );
         $prev_find = array($phpbb_seo->seo_delim['start'] . '0', $phpbb_seo->seo_static['pagination'] . '0' . $phpbb_seo->seo_ext['pagination']);
      }
      $page_string = str_replace($url_delim . 'start=0', '', $page_string);
      $page_string = preg_replace($pagin_find, $pagin_replace, $page_string);
      $prev = preg_replace($pagin_find, $pagin_replace, $prev);
      $prev = str_replace($prev_find, '', $prev);
      $next = preg_replace( $pagin_find, $pagin_replace, $next);
   }
   $template->assign_vars(array(
      $tpl_prefix . 'BASE_URL'   => $base_url,
      'A_' . $tpl_prefix . 'BASE_URL'   => addslashes($base_url),
      $tpl_prefix . 'PER_PAGE'   => $per_page,
      $tpl_prefix . 'PREVIOUS_PAGE'   => $prev,
      $tpl_prefix . 'NEXT_PAGE'   => $next,
      $tpl_prefix . 'TOTAL_PAGES'   => $total_pages)
   );
   // www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ REPLACE WITH ]------------------------------------------
#

   // www.phpBB-SEO.com SEO TOOLKIT BEGIN
   $prev =  ($on_page == 1) ? '' : $base_url . "{$url_delim}start=" . (($on_page - 2) * $per_page);
   $next = ($on_page == $total_pages) ? '' : $base_url . "{$url_delim}start=" . ($on_page * $per_page);
   if (is_object($phpbb_seo)) {
      static $pagin_find = array();
      static $pagin_replace = array();
      static $prev_find = array();
      if (empty($pagin_replace)) {
         $pagin_find = array('`(\.(?!' . $phpEx . ')[a-z0-9]+)([\w\#$%&~\-;:=,?@+]*)(&|\?)start=([0-9]+)`i', '`/([\w\#$%&~\-;:=,?@+]*)(&|\?)start=([0-9]+)`i' );
         $pagin_replace = array( $phpbb_seo->seo_delim['start'] . '\\4\\1\\2', '/' . $phpbb_seo->seo_static['pagination'] . '\\3' . $phpbb_seo->seo_ext['pagination'] . '\\1' );
         $prev_find = array($phpbb_seo->seo_delim['start'] . '0', $phpbb_seo->seo_static['pagination'] . '0' . $phpbb_seo->seo_ext['pagination']);
      }
      $page_string = str_replace($url_delim . 'start=0', '', $page_string);
      $page_string = preg_replace($pagin_find, $pagin_replace, $page_string);
      $prev = preg_replace($pagin_find, $pagin_replace, $prev);
      $prev = str_replace($prev_find, '', $prev);
      $next = preg_replace( $pagin_find, $pagin_replace, $next);
   }
   $template->assign_vars(array(
      $tpl_prefix . 'BASE_URL'   => $base_url,
      'A_' . $tpl_prefix . 'BASE_URL'   => addslashes($base_url),
      $tpl_prefix . 'PER_PAGE'   => $per_page,
      $tpl_prefix . 'PREVIOUS_PAGE'   => $prev,
      $tpl_prefix . 'NEXT_PAGE'   => $next,
      $tpl_prefix . 'TOTAL_PAGES'   => $total_pages)
   );
   // www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ OPEN ]------------------------------------------
#

includes/functions_display.php

#
#-----[ FIND ]------------------------------------------
#

      // www.phpBB-SEO.com SEO TOOLKIT BEGIN
      if (is_object($phpbb_seo) && strpos($pagination, '.' . $phpEx) === FALSE) {
         static $pagin_find = array( '`(\.[a-z0-9]+)([\w\#$%&~.\-;:=,?@+]*)&start=([0-9]+)`i', '`/([\w\#$%&~.\-;:=,?@+]*)&start=([0-9]+)`i' );
         static $pagin_replace = array();
         if (empty($pagin_replace)) {
            $pagin_replace = array( $phpbb_seo->seo_delim['start'] . '\\3\\1\\2', '/' . $phpbb_seo->seo_static['pagination'] . '\\2' . $phpbb_seo->seo_ext['pagination'] .'\\1' );
         }
         $pagination = str_replace( '&start=0', '', $pagination );
         $pagination = preg_replace( $pagin_find, $pagin_replace, $pagination );
      }
      // www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ REPLACE WITH ]------------------------------------------
#

      // www.phpBB-SEO.com SEO TOOLKIT BEGIN
      if (is_object($phpbb_seo) ) {
         static $pagin_find = array();
         static $pagin_replace = array();
         if (empty($pagin_find)) {
            $pagin_find = array( '`(\.(?!' . $phpEx . ')[a-z0-9]+)([\w\#$%&~\-;:=,?@+]*)&start=([0-9]+)`i', '`/([\w\#$%&~\-;:=,?@+]*)&start=([0-9]+)`i' );
            $pagin_replace = array( $phpbb_seo->seo_delim['start'] . '\\3\\1\\2', '/' . $phpbb_seo->seo_static['pagination'] . '\\2' . $phpbb_seo->seo_ext['pagination'] .'\\1' );
         }
         $pagination = str_replace( '&start=0', '', $pagination );
         $pagination = preg_replace( $pagin_find, $pagin_replace, $pagination );
      }
      // www.phpBB-SEO.com SEO TOOLKIT END


Sorry for that.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21429
Joined: Fri Apr 28, 2006 9:03 pm

Postby TomaS » Fri Dec 28, 2007 11:25 am

first:thx for fix that dcz now it is working great it is a such fantastic mod Image
second:it you have not to excuse to me :shock: i found only little bugsik in you great mod and one member show that wasnt work.But it was only little mistake and everythink now look fine :wink:
phpBB podpora-slovak phpBB support
slovenský preklad pre phpbb3-slovak translate for phpBB3
predaj a kupa domeny, marketing a internetove podnikanie- Slovak domain center
TomaS
PR2
PR2
 
Posts: 229
Joined: Fri Jun 08, 2007 1:22 am

Postby dcz » Fri Dec 28, 2007 4:21 pm

I'm sorry for me too ;)

Many releases to do again :roll:

The good thing is, very few domains are concerned (including ".php"), the funny thing is this version could not be used on phpbb.com :lol:

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21429
Joined: Fri Apr 28, 2006 9:03 pm

Postby TomaS » Fri Dec 28, 2007 6:33 pm

dcz wrote:
Many releases to do again :roll:

sorry for that :lol:
and why it wount be use in phpbb.com?why they dont use seo mod?
phpBB podpora-slovak phpBB support
slovenský preklad pre phpbb3-slovak translate for phpBB3
predaj a kupa domeny, marketing a internetove podnikanie- Slovak domain center
TomaS
PR2
PR2
 
Posts: 229
Joined: Fri Jun 08, 2007 1:22 am

Postby dcz » Sat Dec 29, 2007 12:15 pm

Was just mentioning they would be among the few to be bugged, since their domain name www.phpbb.com includes ".php".

I kind of understand why they do not do much SEO, because they need to use their script and they want it universal (url rewriting isn't since you need extra server modules).

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21429
Joined: Fri Apr 28, 2006 9:03 pm


Return to Advanced SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 13 guests