A Mods Pagination - Not Redirecting

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

Moderator: Moderators


A Mods Pagination - Not Redirecting

Postby complexity » Mon Jan 05, 2009 6:04 pm

I'm using this mod, http://www.phpbb.com/community/viewtopi ... 5&start=75, which creates a pagination in profiles.

The link is suppose to look like this....

http://revolutionforums.org/memberlist. ... 43&start=5

but with phpBB-seo, it looks like

http://www.illestlyrics.com/phpBB3/prof ... page5.html

Code: Select all
      $pagination_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$user_id");

      $template->assign_vars(array(
         'DELETE_IMG'       => $user->img('icon_post_delete', 'DELETE_POST'),
         'S_WALL_ALLOWED'      => (!$foe && $wall_active && $auth->acl_get('u_wall')),
         'S_WALL_OWN'      => ($user_id == $user->data['user_id']),
         'S_WALL_EMPTY'      => $wall_empty,
         'S_WALL_ACTION'         => append_sid("{$phpbb_root_path}wall.$phpEx", 'mode=post&u=' . $user_id),
         'PAGINATION'   => generate_pagination($pagination_url, $total_comments, WALL_MAX_DISPLAY, $start),
         'PAGE_NUMBER'   => on_page($total_comments, WALL_MAX_DISPLAY, $start),
         'TOTAL_COMMENTS'   => ($total_comments == 1) ? $user->lang['LIST_COMMENT'] : sprintf($user->lang['LIST_COMMENTS'], $total_comments)
      ));


Any help would be greatly appreciated, I'll make sure to post the solution in the thread as well.

Just so you know, I am backlinking, http://www.illestlyrics.com/phpBB3/

Thank you. :shock:
complexity
 
Posts: 15
Joined: Fri Nov 09, 2007 3:28 am

Advertisement

Postby SeO » Tue Jan 06, 2009 12:44 pm

Well, it's pretty good that you do not need to to anything to have these rewritten, it's just that you need to adapt the rewriterule a bit to handle the pagination as well.

In your .htaccess you must have something like :
Code: Select all
# PROFILES THROUGH USERNAME
RewriteRule ^profile/([^/]+)/?$ memberlist.php?mode=viewprofile&un=$1 [QSA,L,NC]


Replace it with :
Code: Select all
# PROFILES THROUGH USERNAME
RewriteRule ^membre/([^/]+)/?(page([0-9]+)\.html)?$ memberlist.php?mode=viewprofile&un=$1&start=$3 [QSA,L,NC]


Then, you'll need to adapt the zero dupe a bit to allow the use of this extra GET param, in memberlist.php, add :
Code: Select all
      $phpbb_seo->seo_opt['zero_dupe']['start'] = $phpbb_seo->seo_chk_start( $start, $config['topics_per_page'] );


before :
Code: Select all
      $phpbb_seo->seo_opt['zero_dupe']['redir_def'] = array(

Note that you will need to replace :
Code: Select all
$config['topics_per_page']

with the proper value (should be 5 in your case, but there could be a config value to use instead to connect the mod with the eventual acp settings) in the above.
Then, you'd need to add :

Code: Select all
         'start' => array('val' => $phpbb_seo->seo_opt['zero_dupe']['start'], 'keep' => true),

after :
Code: Select all
         'u' => array('val' => $user_id, 'keep' => true, 'force' => true),


Ultimately, you'd need to replace :
Code: Select all
         $this->url = $this->seo_url['user'][$this->get_vars['u']] . $this->seo_ext['user'];

with
Code: Select all
         $this->rewrite_pagination_page();
         $this->url = $this->seo_url['user'][$this->get_vars['u']] . $this->start;


in phpbb_seo/phpbb_seo_class.php. Be careful, this will only work for the type of rewrite you're currently using, the fix in phpbb_seo_class.php would not be the same with memberxx.html as profile url for example.

But besides, it should work ;)
SeO
Admin
Admin
 
Posts: 6035
Joined: Wed Mar 15, 2006 9:41 pm

Postby complexity » Tue Jan 06, 2009 6:52 pm

Perfect!

I was half way there on my own, but never would have got it in a million years.

Thank you very much.
complexity
 
Posts: 15
Joined: Fri Nov 09, 2007 3:28 am

Postby darjana » Wed Jan 07, 2009 10:43 am

:o

The mod cannot be downloaded from phpbb, it return 404, do you have the mod? can you share with me?

thanks! :arrow:
darjana
 
Posts: 39
Joined: Fri Feb 01, 2008 10:25 am

Postby complexity » Sun Jan 11, 2009 8:20 pm

Look through the last page.
complexity
 
Posts: 15
Joined: Fri Nov 09, 2007 3:28 am

Re: A Mods Pagination - Not Redirecting

Postby complexity » Sat Jul 11, 2009 10:51 pm

Upping. The first edit in phpBB_seo doesn't exist anymore.

Latest version of everything.
complexity
 
Posts: 15
Joined: Fri Nov 09, 2007 3:28 am

Re: A Mods Pagination - Not Redirecting

Postby dcz » Fri Jul 17, 2009 8:30 am

What code change are you talking about exactly ? The .htaccess one or the phpbb_seo_class.php one ?
Both should be the same.
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: 19930
Joined: Fri Apr 28, 2006 9:03 pm

Re: A Mods Pagination - Not Redirecting

Postby complexity » Wed Jul 22, 2009 12:35 am

"'start' => array('val' => $phpbb_seo->seo_opt['zero_dupe']['start'], 'keep' => true),"

That line. I tried it, and had no luck.
complexity
 
Posts: 15
Joined: Fri Nov 09, 2007 3:28 am

Re: A Mods Pagination - Not Redirecting

Postby dcz » Sat Jul 25, 2009 9:11 am

Did you put this :
Code: Select all
      $phpbb_seo->seo_opt['zero_dupe']['start'] = $phpbb_seo->seo_chk_start( $start, $config['topics_per_page'] );

before :
Code: Select all
      $phpbb_seo->seo_opt['zero_dupe']['redir_def'] = array(
         'mode' => array('val' => 'viewprofile', 'keep' => true),
         'u' => array('val' => $user_id, 'keep' => true, 'force' => true),
      );


Because there are two occurrences of :
Code: Select all
      $phpbb_seo->seo_opt['zero_dupe']['redir_def'] = array(


in memberlist.php.

++
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: 19930
Joined: Fri Apr 28, 2006 9:03 pm

Re: A Mods Pagination - Not Redirecting

Postby complexity » Sat Jul 25, 2009 7:14 pm

No. I guess the only change that I didn't make it again was changing the topics_per_page, which is very essential.

Thank you very much. I hope someone else besides just me finds this useful.

:mrgreen:
complexity
 
Posts: 15
Joined: Fri Nov 09, 2007 3:28 am


Return to Advanced SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 30 guests


 
cron